RE: [SOLVED] What does NSBundle.mainBundle() need?
RE: [SOLVED] What does NSBundle.mainBundle() need?
- Subject: RE: [SOLVED] What does NSBundle.mainBundle() need?
- From: Chuck Hill <email@hidden>
- Date: Tue, 11 Nov 2003 09:37:49 -0800
I had a similar problem working on something else. My guess (and it is
only a guess) is that when you do not fork the classes on the classpath are
loaded in such a way that Class.forName fails when used by a class
previously loaded to attempt to load a class newly loaded. I'm pretty sure
that NSBundle uses Class.forName.
Chuck
At 11:37 AM 11/11/2003 +0100, Erlandsson Martin wrote:
>Thanks for your help.
>None of your suggestions solved the problem, but they gave me a new angle.
>I discovered that all I had to do was to add 'fork="yes"' to the junit
task. I don't get why this makes any difference though. The fact that Junit
starts in a JVM of its own should not make any difference, should it?
>
>/Martin
>
>
>
>
>
>
>> -----Original Message-----
>> From: Chuck Hill [mailto:email@hidden]
>> Sent: den 10 november 2003 19:30
>> To: email@hidden
>> Cc: Erlandsson Martin
>> Subject: Re: What does NSBundle.mainBundle() need?
>>
>> If that does not work also check that the current working directory is
>> the App.woa that you are working with.
>>
>>
>> Kaj Hejer wrote:
>>
>> > At 17:15 +0100 10-11-03, Erlandsson Martin wrote:
>> >
>> >> Hi List.
>> >>
>> >> I am trying to create an NSBundle with the static creation method
>> >> mainBundle(). It works fine in my IDE (JBuilder), but when I try to run
>> >> it through ANT, I get an "ExceptionInInitializerError", caused by a null
>> >> reference in a method called "LoadUserAndBundleProperties" in NSBundle.
>> >>
>> >> I have tried to set up all system properties and paths the same way in
>> >> both environments, but I just can't find what is missing when I run
>> >> through ANT. What is the absolute minimum of data needed by NSBundle to
>> >> create an instance? Any other thoughts?
>> >>
>> >> /Martin
>> >>
>> >>
>> >> --------- Details: -----------------------
>> >>
>> >> The following simple unit test passes when run in JBuilder, but causes
>> >> an error when I run it with ANT.
>> >>
>> >> (TestGeneralTests.java:44) NSBundle bundle = NSBundle.mainBundle();
>> >> (TestGeneralTests.java:45) assertNotNull(bundle);
>> >
>> >
>> >
>> > Hi!
>> >
>> > Try to add the following line:
>> >
>> > WOApplication.primeApplication(
>> > NSBundle.mainBundle().bundlePath(), "Application");
>> >
>> >
>> > -Kaj :)
>> > _______________________________________________
>> > webobjects-dev mailing list | email@hidden
>> > Help/Unsubscribe/Archives:
>> > http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> > Do not post admin requests to the list. They will be ignored.
>>
>> --
>>
>> Chuck Hill email@hidden
>> Global Village Consulting Inc. http://www.global-village.net
>>
>> Progress is the mother of all problems.
>> - G. K. Chesterton
>A
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.