Hello:

When I try to build my repository using the build-torque.xml target
project-ojb-repository-classpath, I get several errors in the velocity
log:

2003-09-20 11:28:04,859 - Starting Jakarta Velocity v1.3.1
2003-09-20 11:28:04,859 - RuntimeInstance initializing.
2003-09-20 11:28:04,859 - Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
2003-09-20 11:28:04,859 - Trying to use logger class
org.apache.velocity.runtime.log.AvalonLogSystem
2003-09-20 11:28:04,859 - Couldn't find class
org.apache.velocity.runtime.log.AvalonLogSystem or necessary supporting
classes in classpath. Exception : java.lang.NoClassDefFoundError:
org/apache/log/format/Formatter
2003-09-20 11:28:04,859 - Trying to use logger class
org.apache.velocity.runtime.log.SimpleLog4JLogSystem
2003-09-20 11:28:04,859 - Using logger class
org.apache.velocity.runtime.log.SimpleLog4JLogSystem
2003-09-20 11:28:04,869 - Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
2003-09-20 11:28:04,879 - Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2003-09-20 11:28:04,879 - ClasspathResourceLoader : initialization
starting.
2003-09-20 11:28:04,879 - ClasspathResourceLoader : initialization
complete.
2003-09-20 11:28:04,889 - ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
2003-09-20 11:28:04,889 - Default ResourceManager initialization
complete.
2003-09-20 11:28:04,889 - Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
2003-09-20 11:28:04,899 - Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
2003-09-20 11:28:04,899 - Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
2003-09-20 11:28:04,909 - Loaded System Directive:
org.apache.velocity.runtime.directive.Include
2003-09-20 11:28:04,909 - Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
2003-09-20 11:28:05,019 - Created: 20 parsers.
2003-09-20 11:28:05,019 - Velocimacro : initialization starting.
2003-09-20 11:28:05,019 - Velocimacro : adding VMs from VM library
template : VM_global_library.vm
2003-09-20 11:28:05,029 - ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.
2003-09-20 11:28:05,029 - Velocimacro : error using  VM library template
VM_global_library.vm :
org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'VM_global_library.vm'
2003-09-20 11:28:05,029 - Velocimacro :  VM library template macro
registration complete.
2003-09-20 11:28:05,029 - Velocimacro : allowInline = true : VMs can be
defined inline in templates
2003-09-20 11:28:05,029 - Velocimacro : allowInlineToOverride = false :
VMs defined inline may NOT replace previous VM definitions
2003-09-20 11:28:05,029 - Velocimacro : allowInlineLocal = false : VMs
defined inline will be  global in scope if allowed.
2003-09-20 11:28:05,029 - Velocimacro : messages on  : VM system will
output logging messages
2003-09-20 11:28:05,029 - Velocimacro : autoload off  : VM system will
not automatically reload global library macros
2003-09-20 11:28:05,029 - Velocimacro : initialization complete.
2003-09-20 11:28:05,029 - Velocity successfully started.
2003-09-20 11:28:05,430 - ResourceManager : found
ojb/repository/Control.vm with loader
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2003-09-20 11:28:05,460 - ResourceManager : found
ojb/repository/MainRepository.vm with loader
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2003-09-20 11:28:05,460 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = ojb/repository/MainRepository.vm [line 16,column 15] :
$ojbPlatform is not a valid reference.
2003-09-20 11:28:05,460 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = ojb/repository/MainRepository.vm [line 17,column 17] :
${jdbcLevel} is not a valid reference.
2003-09-20 11:28:05,460 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = ojb/repository/MainRepository.vm [line 21,column 13] :
$databaseDriver is not a valid reference.
2003-09-20 11:28:05,460 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = ojb/repository/MainRepository.vm [line 23,column 18] :
$database is not a valid reference.
2003-09-20 11:28:05,460 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = ojb/repository/MainRepository.vm [line 24,column 14] :
$databaseName is not a valid reference.
2003-09-20 11:28:05,460 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = ojb/repository/MainRepository.vm [line 26,column 15] :
$databaseUser is not a valid reference.
2003-09-20 11:28:05,520 - ResourceManager : found
ojb/repository/Repository.vm with loader
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2003-09-20 11:28:05,540 - Left side ($col.size) of '!=' operation has
null value. Operation not possible. ojb/repository/Repository.vm [line
62, column 24]

I defined the database references in my mysql.profile and set the
profile to mysql in build.profile.

Here is my complete build.xml file if you need it:
<project name="OjbJdoTest" default="makeRepository"
basedir="c:/Dev/OjbJdoTest">

  <property file="build.properties"/>
  <property file="mysql.profile"/>

  <property name="javalibs" location="c:/JavaLibs" />
  <property name="ojbDir" location="${javalibs}/db-ojb-1.0.rc4" />
  <property name="build-torque" location="${ojbDir}/build-torque.xml" />
  <property name="xdocletDir" location="${javalibs}/xdoclet-1.2b3" />
  <property name="ojbDocletJar"
location="${javalibs}/db-ojb-1.0.rc4/lib/xdoclet-ojb-module-1.2b3-dev.ja
r" />
  <property name="jdoriDir" location="${javalibs}/jdori-1_0" />

  <path id="build-classpath">
    <fileset dir="${ojbDir}/lib">
      <include name="*.jar"/>
     </fileset> 
    <fileset dir="${xdocletDir}/lib">
      <include name="*.jar"/>
     </fileset> 
    <fileset dir="${jdoriDir}/src">
      <include name="*.jar"/>
     </fileset> 
     <pathelement location="${ojbDocletJar}" />
  </path> 

  <target name="clean">
    <delete dir="build"/>
    <delete dir="lib"/>
    <delete file="velocity.log"/>
  </target>

  <target name="prepare" depends="clean">
    <mkdir dir="lib"/>
    <copy todir="lib">
      <fileset dir="${ojbDir}/lib"/>
    </copy>
  </target>
  
  <target name="processOjbDoclets" depends="prepare">
    <taskdef name="ojbdoclet"
classname="xdoclet.modules.ojb.OjbDocletTask"
classpathref="build-classpath"/>
    <ojbdoclet destdir="build">
      <fileset dir="src">
        <include name="persistent/*.java"/>
       </fileset> 
      <ojbrepository destinationFile="repository_user.xml"/>
      <torqueschema databaseName="ojbJdoTest"
destinationFile="project-schema.xml"/>
    </ojbdoclet>
  </target> 

  <target name="processJdoDoclets" depends="processOjbDoclets">
    <taskdef name="jdodoclet"
classname="xdoclet.modules.jdo.JdoDocletTask"
classpathref="build-classpath"/>
    <jdodoclet destdir="build">
      <fileset dir="src">
        <include name="persistent/*.java"/>
      </fileset> 
      <jdometadata jdospec="1.0" generation="class"/>
    </jdodoclet>
  </target> 

  <target name="enhancePersistentClasses" depends="processJdoDoclets">

    <pathconvert property="enhancerFiles" pathsep=" ">
      <path id="enhancerFiles">
        <fileset dir="classes">
          <include name="persistent/*.class"/>
        </fileset> 
        <fileset dir="build">
          <include name="persistent/*.jdo"/>
        </fileset> 
      </path> 
    </pathconvert>
    <java fork="yes" failonerror="yes"
      classname="com.sun.jdori.enhancer.Main"
classpathref="build-classpath">
      <arg line="-v -f -d build/classes ${enhancerFiles}" />
    </java>
  </target> 

  <target name="makeDbSchema" depends="enhancePersistentClasses">
    <ant dir="." antfile="${build-torque}"
target="project-sql-classpath">
      <property name="schemaDirectory" value="build"/>
      <property name="outputDirectory" value="build"/>
    </ant>
  </target>

  <target name="makeRepository" depends="makeDbSchema">
    <ant dir="." antfile="${build-torque}"
target="project-ojb-repository-classpath">
      <property name="schemaDirectory" value="build"/>
      <property name="outputDirectory" value="build"/>
    </ant>
  </target>

</project>

Any ideas?

Thanks,
        Neil.


--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by 
17% or more in 6 months or less! => http://newsletter.JAMMConsulting.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to