Re: JUnit and Classpath
Re: JUnit and Classpath
- Subject: Re: JUnit and Classpath
- From: Frédéric JECKER <email@hidden>
- Date: Tue, 05 Aug 2008 10:24:17 +0200
Hi,
I digged one more day and found that this error was caused by a static
initializer of one of the bundle's class.
I reordered the classpath, and now it works fine.
I'd also thank chuck for a previous post where all is clearly explained :
http://lists.apple.com/archives/webobjects-dev/2007/Nov/msg00699.html
Regards
Fred
Frédéric JECKER a écrit :
Hi list,
I made a simple Junit test case in one of my framework, which only
loads a model an tries to read an EO and writes another one.
In the setUp method, I load the model, and updates its connexion
dictionnary.
The test keeps on failing on the EOUtilities.createAndInsertObject,
stating that a classcastexception occured.
This method returns an EOGenericRecord instead of my object (which
extends EOGenericRecord).
When changing createAndInsertObject to a new() followed by an
EOEditingContext(), another error comes up stating that no class
description was
found for my Entity.
The "Practical Webobjects" books says that I should update the run
config's classpath and add the build/.../resources/java directory.
This ends up with another error :
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
com.webobjects.foundation._NSUtilities._searchForClassInPackages(_NSUtilities.java:374)
at
com.webobjects.foundation.NSBundle.searchForClassInBundles(NSBundle.java:1002)
at
com.webobjects.foundation.NSBundle.searchAllBundlesForClassWithName(NSBundle.java:988)
at com.webobjects.foundation.NSBundle.access$300(NSBundle.java:208)
at
com.webobjects.foundation.NSBundle$1._searchForClassWithName(NSBundle.java:373)
at
com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:344)
at
com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:291)
at
com.webobjects.eoaccess.EOModel._setEntityForEntityNameClassName(EOModel.java:1242)
......
It's like EO can't find the class associated to my entity (I checked
typos... nothing (i use veogen/mike's templates)
Any ideas ??
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden