db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Lee <brucelee_1...@yahoo.com.au>
Subject Tutorial 5
Date Thu, 13 Jan 2005 23:22:23 GMT
 
The JDO Tutorial contains the following advice:

"Now compile the sources, setup the test database and
perform bytecode enhancement by executing

ant with-jdori prepare-tutorials enhance-jdori

from the ojb toplevel directory."

but of these targets only enhance-jdori exists. It
would be nice if this could be changed to reflect the
current build.xml




Moreover, running this target produces (for me):

<...normal build process omitted...>

enhance-jdori:
[java] Enhancer: options
[java] verbose = true
[java] quiet = false
[java] forceWrite = true
[java] noWrite = false
[java] sourcePath = null
[java] destinationDirectory = build/classes/
[java] propertiesFileName = null
[java] doTiming = false
[java] classNames = {
[java] }
[java] jdoFileNames = {
[java] src/java/org/apache/ojb/tutorial5/Product.jdo
[java] }
[java] classFileNames = {
[java]
build/classes//org/apache/ojb/tutorial5/Product.class
[java] }
[java] zipFileNames = {
[java] }
[java] dumpClass = false
[java] noAugment = false
[java] noAnnotate = false
[java] JDO ENHANCER: using file:
file:/X:/src/java/ojb2/build/classes/org/apache/ojb/tutorial5/Product.class
[java] Class Locator: using class files: {
[java]
build/classes//org/apache/ojb/tutorial5/Product.class
[java] }
[java] JDO ENHANCER: using file:
file:/X:/src/java/ojb2/src/java/org/apache/ojb/tutorial5/Product.jdo
[java]
---------------------------------------------------------------------------
[java] JDO ENHANCER: Enhancer: enhancing classfile ...
[java] JDO ENHANCER: scanning class
org.apache.ojb.tutorial5.Product
[java] JDO ENHANCER: not found resource:
META-INF/package.jdo
[java] JDO ENHANCER: not found resource:
WEB-INF/package.jdo
[java] JDO ENHANCER: not found resource: package.jdo
[java] JDO ENHANCER: not found resource:
org/package.jdo
[java] JDO ENHANCER: not found resource:
org/apache/package.jdo
[java] JDO ENHANCER: not found resource:
org/apache/ojb/package.jdo
[java] JDO ENHANCER: not found resource:
org/apache/ojb/tutorial5/package.jdo
[java] JDO ENHANCER: found resource:
org/apache/ojb/tutorial5/Product.jdo
[java] com.sun.jdori.enhancer.util.InternalError:
assertion failed: cannot find class file for class:
org/apache/ojb/tutorial5/Product
[java] at
com.sun.jdori.enhancer.util.Assertion.affirm(Unknown
Source)
[java] at
com.sun.jdori.enhancer.meta.model.EnhancerMetaDataJDOModelImpl.declareField(Unknown
Source)
[java] at
com.sun.jdori.enhancer.core.Analyzer.scanFields(Unknown
Source)
[java] at
com.sun.jdori.enhancer.core.Analyzer.scan(Unknown
Source)
[java] at
com.sun.jdori.enhancer.core.Controller.scan(Unknown
Source)
[java] at
com.sun.jdori.enhancer.core.Controller.enhanceClass(Unknown
Source)
[java] at
com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile1(Unknown
Source)
[java] at
com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile(Unknown
Source)
[java] at
com.sun.jdori.enhancer.Main.enhanceClassFile(Unknown
Source)
[java] at
com.sun.jdori.enhancer.Main.enhanceInputFiles(Unknown
Source)
[java] at com.sun.jdori.enhancer.Main.process(Unknown
Source)
[java] at com.sun.jdori.enhancer.Main.main(Unknown
Source)
[java] Fatal error while enhancing: JDO ENHANCER: An
internal error occurred while enhancing input class;
detailed message: assertion failed: cannot find class
file for class: org/apache/ojb/tutorial5/Product
[java] aborted with errors.
[java] com.sun.jdori.enhancer.EnhancerFatalError: JDO
ENHANCER: An internal error occurred while enhancing
input class; detailed message: assertion failed:
cannot find class file for class:
org/apache/ojb/tutorial5/Product
[java] at
com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile(Unknown
Source)
[java] at
com.sun.jdori.enhancer.Main.enhanceClassFile(Unknown
Source)
[java] at
com.sun.jdori.enhancer.Main.enhanceInputFiles(Unknown
Source)
[java] at com.sun.jdori.enhancer.Main.process(Unknown
Source)
[java] at com.sun.jdori.enhancer.Main.main(Unknown
Source)
BUILD FAILED: X:\src\java\ojb2\build.xml:187: Java
returned: 1
Total time: 8 seconds



The enhancer reports finding the correct jdo file:

JDO ENHANCER: using file:
file:/X:/src/java/ojb2/src/java/org/apache/ojb/tutorial5/Product.jdo
     [java]
---------------------------------------------------------------------------
     [java] JDO ENHANCER: Enhancer: enhancing
classfile ...
     [java] JDO ENHANCER: scanning class
org.apache.ojb.tutorial5.Product


But also seems to be looking for, and failing to find,
something called package.jdo, and then claims it can't
find the Product class file:

[java] com.sun.jdori.enhancer.util.InternalError:
assertion failed: cannot find class file for class:
org/apache/ojb/tutorial5/Product

Can anybody suggest why this is happening?


Also, build.xml contains the following comment within
the enhance-jdori target:

<!-- One problem with the standard JDORI enhance is
that it only works on single files which means that it
is necessary to invoke the enhancer for any
JDO-persistent class Therefore we cannot provide a
target that enhances all relevant classes, but only a
sample target that shows how to do it -->

Is this still true?

Regards, 
Bruce.



 

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message