Am 15.10.2008 um 16:04 schrieb Lachlan Deck:
> Hey Lars,
>
> On 15/10/2008, at 10:51 AM, Lars Sonchocky-Helldorf wrote:
>
>> when trying to launch a Maven based WOApplication inside Eclipse
>> 3.4 / WOLips 3.4.5503 on a Windows XP machine which HASN'T
>> WebObjects installed at first I got some null pointer exception
>> which had something to do with not being able to read certain
>> environment variables (I had a stacktrace on it inside the error
>> log view in Eclipse but my co-worker did hit the clear button when
>> trying to work the problem out while I was at lunch :-(
>
> :-)
>
>> After that I could never reproduce it, even when deleting the
>> environment variables and restarting the machine). Before I went
>> to lunch we tried to set the environment variables mentioned in
>> <http://wiki.objectstyle.org/confluence/display/WOL/Installing
>> +WebObjects-WOLips+on+Windows> to the following values to see what
>> happens:
>>
>> NEXT_ROOT=C:\Apple
>> WEBOBJECTS_JAVA_EXTENSIONS=%JAVA_HOME%\lib\ext
>> WEBOBJECTS_JAVA_HOME=%JAVA_HOME%
>>
>> However, the NPE went away and the following came up:
>>
>>
>> [2008-10-14 16:58:1 CEST] <main> <WOResourceManager> Unable to
>> locate the "JavaWebObjects" bundle
>> [2008-10-14 16:58:1 CEST] <main> Unable to initialize WOProperties
>> for reason: Cannot find JavaWebObjects framework !
>> java.lang.IllegalStateException: Unable to locate the
>> "JavaWebObjects" bundle
>> <...>
>> Caused by: java.lang.IllegalStateException: Unable to locate the
>> "JavaWebObjects" bundle
>> at
>> com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourc
>> eAsStream(WOResourceManager.java:131)
>
> All this is doing is looking for the JavaWebObjects bundle having
> been already loaded during started. i.e., it's calling
> NSBundle.bundleForName("JavaWebObjects") which in turn looks up an
> NSDictionary and is getting null in return... so it decides to
> throws an error.
>
>> What makes me wonder is that even when launching a Maven based
>> WOApplication a static WO installation seems to be required and
>> referred (environment variables).
>
> I don't believe that's true.
hmm, at least the NPE in the Eclipse WOApps launcher went away after
setting the NEXT_ROOT env for the first time. This could - of course
- be completely unrelated.
>
>> Shouldn't it work out of the box without any WO installed at the
>> machine at all (and loading all the dependencies from the
>> local .m2/repository instead)
>
> Well, I'm going to ask the thing that seems too obvious first
> (sorry, you didn't mention anything about it, so I have to ask).
> Have you declared those jars as dependencies in your pom file?
> i.e.,
> <dependencies>
> <dependency>
> <artifactId>JavaWebObjects</artifactId>
> <groupId>com.apple.webobjects</groupId>
> <version>5.4.2</version>
> </dependency>
> etc
> </dependencies>
Our project structure looks like this:
TankDiskAll
|
+ Applications
| + TankDiskServer
| | |
| | \ pom.xml
| |
| + TankDiskAdmin
| | |
| | \ pom.xml
| |
| \ pom.xml <- JavaWebObjects-5.4.2.jar is defined here like above
|
+ Frameworks
| + TankDiskData
| | |
| | \ pom.xml
| \ pom.xml
\ pom.xml <- this is the parent POM
and the project builds now (after switching to the 2.0.16-SNAPSHOT
version of maven-wolifecycle-plugin like Henrique suggested.)
But the exception during the launch attempt remains …
>
>> Is this a bug or a misconception on my side?
>
> Not sure yet.
>
>> The ant.* files look like this (note the windows style backslashes!):
>
> Have you tried regex-replacing the backslashes for forwards?
Tried that too, no consequences so far (still getting exactly the
same exception)
>
> with regards,
> --
>
> Lachlan Deck
>
Thanks,
Lars
This archive was generated by hypermail 2.0.0 : Wed Oct 15 2008 - 11:30:50 EDT