Frameworkjars: A wonder issue?

From: Greg Brown (gsbrow..mich.edu)
Date: Tue Mar 17 2009 - 11:08:47 EDT

  • Next message: Henrique Prange: "Re: Frameworkjars: A wonder issue?"

    Jars and Frameworks: From Release notes WO 5.2.2:

    Typically, WebObjects applications and frameworks exist in a
    directory format. Applications can now optionally
    be built as correct WAR files, instead of stubbed WAR or SSDD, and
    frameworks can be built as JARs
    implemented by the NSJarBundle class. To build an NSJarBundle from a
    framework, set the BUNDLE_AS_JAR
    build property to YES.
    However, to use this option, you have to avoid using file and
    directory paths in your code. In general, it is
    recommended that WebObjects developers use URLs instead of String
    paths. Therefore, in WebObjects 5.2.2,
    all API that takes a String path as an argument has been deprecated,
    and replaced with API that takes a URL
    as an argument. Although all the WebObjects frameworks have been
    modified to use URLs, third party
    frameworks (Wonder? I wonder.) might still use file paths and
    therefore, may not work in the NSJarBundle format.
    Also, in support of servlet management tools, getProperty() was added
    to NSProperties. Use this method
    instead of System.getProperty() to get system properties. This new
    method will nicely fall back to JNDI
    lookups if there are no relevant properties, which makes the
    properties easy to modify or inspect from servlet
    management tools.
    See /Developer/Documentation/WebObjects/Reference/changes.html for
    details on the API changes.

    So the WO code should support frameworkjars if they are in the
    NSJarBundle format; but what about Wonder?

    If I use the latest Eclipse + WOlips + download the frameworkjars
    from http://webobjects.mdimension.com/wonder/ I run into problems.

    1. First, make a Wonder application with "directory frameworks".
    Success, it says "Hello World".

    2. Now, configure the build path, remove the ERExtensions "directory
    framework", and add the frameworkjar downloaded from http://
    webobjects.mdimension.com/wonder/, and change the order so its toward
    the top. Failure, it quits and says:
    > No ERX_MARKER field in NSMutableArray found.
    > This means your class path is incorrect. Adjust it so that
    > ERExtensions come before JavaFoundation.

    Q1. Is this something from the WOlips tools + eclipse environment? or
    is it from the Wonder initialization code?

    The "directory frameworks" have a "con" type classpath entry, and the
    frameworkjars have a "lib" type.

    I hear people do use the wonder frameworkjars, I don't understand
    when they work and when they don't work. It appears they only work
    under certain conditions.

    Thanks

    .classpath file

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
            <classpathentry kind="src" path="Sources"/>
            <classpathentry kind="lib" path="/Volumes/OS9User/DownloadsW/
    wondertestjars/Wonder-latest-FrameworkJars-53/
    ERExtensions-5.0.0.9052.jar"/>
            <classpathentry kind="con" path="WOFramework/ERPrototypes"/>
            <classpathentry kind="con" path="WOFramework/JavaWOExtensions"/>
            <classpathentry kind="con" path="WOFramework/WOOgnl"/>
            <classpathentry kind="con" path="WOFramework/JavaEOAccess"/>
            <classpathentry kind="con" path="WOFramework/JavaEOControl"/>
            <classpathentry kind="con" path="WOFramework/JavaFoundation"/>
            <classpathentry kind="con" path="WOFramework/JavaJDBCAdaptor"/>
            <classpathentry kind="con" path="WOFramework/JavaWebObjects"/>
            <classpathentry kind="con" path="WOFramework/JavaXML"/>
            <classpathentry kind="con"
    path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
            <classpathentry kind="con" path="WOFramework/ERJars"/>
            <classpathentry kind="output" path="bin"/>
    </classpath>



    This archive was generated by hypermail 2.0.0 : Tue Mar 17 2009 - 11:10:22 EDT