On 2011-09-20, at 9:50 PM, Paul Hoadley wrote:
> On 21/09/2011, at 12:47 PM, Chuck Hill wrote:
> 
>>>>>>> Are the frameworks embedded in that bundle?
>>>>>> 
>>>>>> Yes.
>>>>> 
>>>>> You could try loading them from there instead.  Just grab all the paths 
>>>>> to jar files under Contents/Frameworks.
>>>> 
>>>> I'll try that shortly.
>>> 
>>> I added:
>>> 
>>> <fileset dir="${dest.dir}/${project.name}.woa/Contents/Frameworks">         
>>>                                                                             
>>>                                     
>>> <include name="**/*.jar" />                                                 
>>>                                                                             
>>>                                   
>>> </fileset>
>>> 
>>> as a child of a <classpath> element in the <junit> task.  It certainly 
>>> picked up all the expected JARs (including JavaMemoryAdaptor) and threw 
>>> them on the classpath, but I'm still not seeing the bundles loaded by 
>>> NSBundle.  NSBundle.frameworkBundles().count() still returns 9 on the 
>>> command line, and 29 in Eclipse.
>> 
>> This just gets stranger and stranger.
> 
> I'm banking on that translating to "I find your problem fascinating and plan 
> to stick around until it's solved."

I was leaning more to running way and regretting I ever mentioned it.  :-P


>>> One thing I'm _not_ doing is any of the "app initialisation"-type things 
>>> here:
>>> 
>>> http://wiki.objectstyle.org/confluence/display/WO/Testing-JUnit+and+TestNG
>>> 
>>> Nor am I extending ERXTestCase.  I'm just following Henrique's samples here:
>>> 
>>> http://hprange.github.com/wounit/usage.html
>>> 
>>> (Henrique—I assume neither of those things above are necessary, right?)
>> 
>> That you are getting some bundles suggests that it is not.  Usually calling 
>> NSBundle.mainBundle() and NSBundle.allBundles() triggers the bundle loading. 
>>  frameworkBundles() should trigger these but you might want to call them 
>> yourself just for laughs.
> 
> No laughs.  Didn't help.
> 
>> I am not seeing how they could be on the classpath and not detected as 
>> bundles.  Your build is not stripping anything out of the built .framework 
>> bundles, it is?
> 
> No, just copying them.
> 
>> If you 
>> cd WT2.woa
>> ./WT2
>> does the app run and find any of the bundles?
> 
> Yep, runs and finds them all.


Wow.  The only thing that I can think of right now is that it _is_ something to 
do with WOTest.  I just can't imagine what.  Is ERJars on your classpath?



Chuck

-- 
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