Re: Help: Newbie getting started (log4j error)

From: Ulrich Köster (ulric..bjectstyle.org)
Date: Wed Apr 30 2003 - 05:04:29 EDT

  • Next message: Ulrich Köster: "[ANN] WOLips release 1.0.1"

    Hi Ashley,

    I think there is no version of log4j in the classpath :-) Eclipse
    manages the classpath for each project, which means you can have
    log4j-1.X for one project and log4j-2.X for another project.
    Nevertheless you have to include the lib in the classpath. Here is a
    short how to:

    Create a folder 'lib' in your HelloWorld project.
    Copy the log4j_1.X into it.
    Right click on the project in Eclipse and select refresh.
    Again choose from the project context menu the item properties.
    Navigate to JavaBuildPath.
    Under the 'library' tab click add jar and choose log4j.
    Close the properties window.
    Open the build.xml file.
    Locate the line:
                            <lib dir=".">
                                    <include name="Add .jar's that should be copied in the woa."/>
                                    <exclude name="**/*.woa/**"/>
                            </lib>
    And change it to:
                            <lib dir=".">
                                    <include name="lib/*.jar"/>
                                    <exclude name="**/*.woa/**"/>
                            </lib>

    The change in the build.xml makes sure that the lib gets in the woa and
    the app classpath. Which means you can deploy the app without coping
    any jars. This stuff is also available in the WOLips help. :-)

    Ulrich

    Am Mittwoch, 30.04.03 um 10:37 Uhr schrieb Ashley Aitken:

    > Hello Ulrich,
    >
    > Thank you for your prompt reply. I am always amazed at the
    > productivity
    > and helpfulness of people like yourself who must be incredibly busy.
    >
    > I have done quite a bit with WO but this is my first try with Eclipse
    > and WOLips/WOProject (latest downloads). There was no earlier version
    > of WOLips installed etc.
    >
    > The log4j-1.2.8.jar was in /Library/WebObjects/Extensions and not
    > /Library/Java/Extensions. I swapped that around but still not luck.
    >
    > Create a fresh HelloWorld project. Build the project.
    >
    > Still the error as before.
    >
    > Do WOLips work with this version of Log4J?
    >
    > Using Java 1.4.1
    >
    > Do you think there is some other version of Log4J somewhere in the
    > CLASSPATH?
    >
    > Thanks again.
    >
    > Cheers,
    > Ashley.
    >
    >
    >
    >>>> Ulrich Köster <ulric..bjectstyle.org> 04/30/03 16:11 PM >>>
    > Hi Ashley,
    >
    > is this your first try with WOLips or tried you another version of
    > WOLips before?
    >
    > About your log4j problem. Could you try to refresh/rebuild your
    > projects. Make sure you don't have multible versions installed. Take a
    > look at /Library/Java/Extensions/
    >
    >
    > Ulrich
    >
    >
    > Am Mittwoch, 30.04.03 um 09:10 Uhr schrieb Ashley Aitken:
    >
    >> Howdy All,
    >>
    >> Firstly, thanks to all those who have put in the time and effort to
    >> build WOProject and WOLips. Its a great achievement and will no doubt
    >> help WO.
    >>
    >> I'm just getting started. I installed as directed and then tried to
    >> build a project. Didn't work with SYS_NEXT_ROOT undefined causing
    >> errors.
    >>
    >> I defined that as /System (I am doing this on Mac OS X) with Eclipse
    >> Preferences and now it gets further.
    >>
    >> The problem I get now seems to be with Log4J (but I can't see any of
    >> the
    >> project code calling it etc. The error is:
    >>
    >> BUILD FAILED: java.lang.VerifyError: (class:
    >> org/apache/log4j/LogManager, method: <clinit> signature: ()V)
    >> Incompatible argument to function
    >>
    >> I've checked on the version of Log4J installed, it was 1.2.4 (I think)
    >
    >> I
    >> upgraded that to 1.2.8, but there are a number of log4j.jar files
    >> around
    >> the place (not sure I got the right one).
    >>
    >> I am new to Eclipse and WOLips so I am sure it is probably a simple
    >> fix.
    >> Any suggestions or pointers most appreciated. I am on Mac OS X
    > using
    >> latest Eclipse and WOLips downloads.
    >>
    >> Thanks in advance!
    >>
    >> Cheers,
    >> Ashley.
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Apr 30 2003 - 05:04:12 EDT