• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
JUnit and Classpath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JUnit and Classpath


  • Subject: JUnit and Classpath
  • From: Frédéric JECKER <email@hidden>
  • Date: Mon, 04 Aug 2008 17:17:02 +0200


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


  • Follow-Ups:
    • Re: JUnit and Classpath
      • From: Frédéric JECKER <email@hidden>
  • Prev by Date: Re: Copying An EO Values
  • Next by Date: Objects marked for delete fall into the updated objects bucket in processRecentChanges
  • Previous by thread: Deployment on Leopard Server using 5.4
  • Next by thread: Re: JUnit and Classpath
  • Index(es):
    • Date
    • Thread