It's not a secret anymore!*
The moose likes Blatant Advertising and the fly likes I am having a problem in enhancing a .class file for working with JDO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Blatant Advertising
Bookmark "I am having a problem in enhancing a .class file for working with JDO" Watch "I am having a problem in enhancing a .class file for working with JDO" New topic
Author

I am having a problem in enhancing a .class file for working with JDO

RahulS Srivastava
Greenhorn

Joined: May 25, 2005
Posts: 1
I am having a problem in enhancing a class to make it persistence for it to work with JDO. But it is continuously giving the following errors.


Buildfile: build.xml

compile:

xdoclet:
[ojbdoclet] May 26, 2005 11:08:55 AM xdoclet.XDocletMain start
[ojbdoclet] INFO: Running <ojbrepository/>
[ojbdoclet] May 26, 2005 11:08:56 AM xdoclet.XDocletMain start
[ojbdoclet] INFO: Running <torqueschema/>

build:

build_if_with_mainclass:

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/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:/D:/ojb-blank/ojb-blank/build/org/ap
che/ojb/tutorial5/Product.class
[java] Class Locator: using class files: {
[java] build/org/apache/ojb/tutorial5/Product.class
[java] }
[java] JDO ENHANCER: using file: file:/D:/ojb-blank/ojb-blank/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.
do
[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.EnhancerMetaDataJDOModelIm
l.declareField(Unknown Source)
[java] at com.sun.jdori.enhancer.core.Analyzer.scanFields(Unknown Sour
e)
[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
ource)
[java] at com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile1(Unk
own Source)
[java] at com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile(Unkn
wn 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 occurr
d while enhancing input class; detailed message: assertion failed: cannot find
lass file for class: org/apache/ojb/tutorial5/Product
[java] com.sun.jdori.enhancer.EnhancerFatalError: JDO ENHANCER: An interna
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(Unkn
wn 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] aborted with errors.



BUILD FAILED
D:\ojb-blank\ojb-blank\build.xml:226: Java returned: 1

Please answer this problemm asap.
[ May 26, 2005: Message edited by: RahulS Srivastava ]
Eric Lemaitre
Ranch Hand

Joined: Jul 03, 2004
Posts: 538

Hi all !

I am usually much more respectful, but this is not serious Rahuls :

1) You are posting in a totally irrelevant forum ("Blatant Advertising"), the good one is although clearly "Object Relational Mapping" well above this one.

2) You ask for help ASAP, but you are using JDORI reference implementation implying you are doing simple tests, so nothing serious yet, or you would be using kind of LiDO (best commercial JDO implementation), or Kodo, or Hibernate (not JDO but much used), not JDORI which offers poor runtime performances but is perfect for education. So you obviously don't need to hurry at all.

3) The issue is stated in clear near the end of verbose stack trace :
"[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"
Classical CLASSPATH issue, "org/apache/ojb/tutorial5/Product" is not found in CLASSPATH so either you must include it or you state wrong package directory at execution.

You should make some efforts on this point, for these mistakes together make you appear as unprofessionnal. You obviously must learn to read a stacktrace, which would have solved your issue immediately. If this happens often, I suggest you meet a colleage and humbly explain you failed to analyse correctly this stacktrace and ask him to explain you how it should be done, so that you have a chance to understand why you process this bad, and hopefully you will do it correctly afterwards. This was my case not so long ago, so you are not alone.

Best regards.


Eric LEMAITRE
CNAM IT Engineer, MS/CS (RHCE, RHCX, SCJA, SCJP, SCJD, SCWCD, SCBCD, SCEA, Net+)
Free Online Tutorials: http://www.free-tutorials-online.net/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I am having a problem in enhancing a .class file for working with JDO
 
Similar Threads
JDO Enhancer Problems
javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed
Migrating themes & skins from portal version5 to version6
Error in building Installation for my project
Tomcat 5.0.28 giving exception while deploying struts applications