What does NSBundle.mainBundle() need?
What does NSBundle.mainBundle() need?
- Subject: What does NSBundle.mainBundle() need?
- From: "Erlandsson Martin" <email@hidden>
- Date: Mon, 10 Nov 2003 17:15:45 +0100
- Thread-topic: What does NSBundle.mainBundle() need?
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);
----- Output from ANT: -----
Testcase: testCreateBundle took 0,972 sec
Caused an ERROR
null
java.lang.ExceptionInInitializerError
at
com.mydomain.TestGeneralTests.testCreateBundle(TestGeneralTests.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
Caused by: java.lang.NullPointerException
at
com.webobjects.foundation.NSBundle.LoadUserAndBundleProperties(NSBundle.
java:641)
at
com.webobjects.foundation.NSBundle.<clinit>(NSBundle.java:368)
... 27 more
_______________________________________________
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.