Re: Problems starting Maven based WOApplication in WOLips 3.4.5503 on Windows XP

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Wed Oct 15 2008 - 10:04:11 EDT

  • Next message: Lars Sonchocky-Helldorf: "Re: WOLips maven-wolifecycle-plugin bug?"

    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
    > .__getJavaWebObjectsResourceAsStream(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.

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

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

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Wed Oct 15 2008 - 10:05:30 EDT