On 2011-09-22, at 12:50 PM, Marius Soutier wrote:

> I had forgotten to fork the jUnit process, so that's resolved now. Apparently 
> the classpath does not get passed through to jUnit unless you fork the 
> process. Makes things a bit slower :(
> 
> But I still have this random strange error where the EO cannot be 
> instantiated because EOF is not ready. I will migrate everything to WOUnit, 
> it works much better.

You can try doing this before running any tests:
NSBundle.mainBundle();
NSBundle.allBundles();
EOModelGroup.defaultGroup();




> On 22.09.2011, at 19:55, Chuck Hill wrote:
> 
>> That sounds more like a classpath problem.  Are you putting the jar in the 
>> built .framework on the classpath, or something else?
>> 
>> 
>> On 2011-09-22, at 3:51 AM, Marius Soutier wrote:
>> 
>>> That error message wasn't exact enough, it was a problem with ERXLocalizer 
>>> being initialized too early (in statics), and now I'm down to this:
>>> 
>>>  [junit] Testcase: net.starhealthcare.sffoundation.model.SFTaskTest:        
>>> Caused an ERROR
>>>   [junit] Unable to get the name of the class to instantiate for the 
>>> adaptor framework JavaJDBCAdaptor. The possible causes for this error are: 
>>> the adaptor framework is not installed on your system, the adaptor 
>>> framework is not linked into your application, or the info dictionary for 
>>> this adaptor is corrupted.
>>>   [junit] java.lang.IllegalStateException: Unable to get the name of the 
>>> class to instantiate for the adaptor framework JavaJDBCAdaptor. The 
>>> possible causes for this error are: the adaptor framework is not installed 
>>> on your system, the adaptor framework is not linked into your application, 
>>> or the info dictionary for this adaptor is corrupted.
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOAdaptor.classForAdaptorNamed(EOAdaptor.java:264)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOAdaptor.adaptorWithName(EOAdaptor.java:287)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOAdaptor.adaptorWithModel(EOAdaptor.java:312)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:624)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.ERXModel.prototypeAttributeNamed(ERXModel.java:315)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOAttribute.<init>(EOAttribute.java:998)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816)
>>>   [junit]   at 
>>> er.extensions.eof.ERXModelGroup.modifyModelsFromProperties(ERXModelGroup.java:1150)
>>>   [junit]   at 
>>> er.extensions.eof.ERXModelGroup.loadModelsFromLoadedBundles(ERXModelGroup.java:278)
>>>   [junit]   at 
>>> er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:147)
>>>   [junit]   at 
>>> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
>>>   [junit]   at 
>>> com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
>>>   [junit]   at 
>>> com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:155)
>>>   [junit]   at 
>>> com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:328)
>>>   [junit]   at 
>>> er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:169)
>>>   [junit]   at 
>>> net.starhealthcare.sffoundation.test.SFModelTestCase.initWO(SFModelTestCase.java:74)
>>>   [junit]   at 
>>> net.starhealthcare.sffoundation.test.SFModelTestCase.initTestCase(SFModelTestCase.java:52)
>>>   [junit]   at 
>>> org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
>>>   [junit]   at 
>>> org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
>>>   [junit]   at 
>>> org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
>>> 
>>> 
>>> On 22.09.2011, at 12:38, Paul Hoadley wrote:
>>> 
>>>> Hi Marius,
>>>> 
>>>> On 22/09/2011, at 7:27 PM, Marius Soutier wrote:
>>>> 
>>>>> I face the same problem when I run my WOUnit tests locally from Ant:
>>>>> 
>>>>>   [junit] Cannot load model named 'SFFoundationEOModel'
>>>>>   [junit] java.lang.IllegalArgumentException: Cannot load model named 
>>>>> 'SFFoundationEOModel'
>>>>>   [junit]         at 
>>>>> com.wounit.rules.AbstractEditingContextRule.loadModel(AbstractEditingContextRule.java:178)
>>>>>   [junit]         at 
>>>>> com.wounit.rules.AbstractEditingContextRule.<init>(AbstractEditingContextRule.java:86)
>>>>>   [junit]         at 
>>>>> com.wounit.rules.AbstractEditingContextRule.<init>(AbstractEditingContextRule.java:98)
>>>>>   [junit]         at 
>>>>> com.wounit.rules.TemporaryEditingContext.<init>(TemporaryEditingContext.java:78)
>>>>>   [junit]         at 
>>>>> net.starhealthcare.sffoundation.model.SFGoalTest.<init>(SFGoalTest.java:15)
>>>> 
>>>> I don't think that is quite the same problem—I'm not having an issue with 
>>>> finding any models.  Is your model in a different framework?  Is that 
>>>> framework on the testing classpath?
>>>> 
>>>> 
>>>> -- 
>>>> Paul.
>>>> 
>>>> http://logicsquad.net/
>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>>> 
>>> This email sent to [email protected]
>> 
>> -- 
>> Chuck Hill             Senior Consultant / VP Development
>> 
>> Practical WebObjects - for developers who want to increase their overall 
>> knowledge of WebObjects or who are trying to solve specific problems.    
>> http://www.global-village.net/products/practical_webobjects
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/products/practical_webobjects







 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to