Re: java.lang.NoClassDefFoundError: com/thoughtworks/xstream/io/HierarchicalStreamDriver

From: Mike Kienenberger (mkienen..mail.com)
Date: Wed Mar 08 2006 - 14:29:23 EST

  • Next message: Tore Halset: "Re: Modeler Icons contribution"

    Ok. I was unable to make launch4j work until I pointed to the jar
    files inside the launch4j install path. Pointing to a copy of the
    jars in cayenne-ant/lib/windows/launch4j-2.1.1 generated errors as
    follows. This appears to be because the path created to the
    executables is mangled (these aren't valid mangled windows directory
    names -- the real directory is
    E:\workspace311\cayenne-ant\lib\windows, aka E:\WORKSP~2\CAYENN~2.)

    ========================
    Caused by: java.io.IOException: CreateProcess:
    E:\WORKSP%7e2\CAYENN%7e2\lib\windows\launch4j-2.1.1\bin\windres.exe
    --preprocessor=type -J rc -O coff -F pe-i386
    D:\DOCUME~1\mlk\LOCALS~1\Temp\launch4j18467rc
    D:\DOCUME~1\mlk\LOCALS~1\Temp\launch4j18468o error=3
    ========================

    Using this piece of ant code appears to build.

    ========================
    <property name="launch4j.dir" value="E:\W2k\Launch4j"/>

    <taskdef name="launch4j"
      classname="net.sf.launch4j.ant.Launch4jTask"
                        classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar"
    />
    ========================

      Unfortunately, the executable created doesn't appear to actually
    launch, which is weird. Trying to start it using a bat file didn't
    work either:

    ========================
    set JAVA_HOME=E:\W2k\jdk1.5.0_06
    set PATH=%java_home%\bin
    CayenneModeler
    ========================

    On 3/8/06, Mike Kienenberger <mkienen..mail.com> wrote:
    > On 3/8/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > > Also I suspect that even if you fix the win-path-ref issue, you'd
    > > still need a Windows specific version of Launch4J as there is some
    > > native code involved in building the .exe
    >
    > Yes, I just realized that my "fix" was pointing at the linux directory.
    > I've installed windows launch4j 2.1.1. I've copied it over into
    > lib/windows/launch4j-2.1.1 mirroring what was done for mac/linux.
    >
    > One thing I noticed was that the mac/linux versions don't contain
    > demo/head_src/src/web and a bunch of the top-level files. Was this
    > intentional? I checked the file sizes, and the "missing" pieces in
    > 2.1.1 were only a fraction of the size of the copied pieces, so I
    > decided to copy over everything.
    >
    > The build still failed with the xstream NoClassDefFoundError, but I
    > know that xstream is one of the jar files delivered with 2.1.1, so I
    > hopefully will be able to solve this.
    >
    > I also noticed that launch4j is GPL'd software. We're going to have
    > to figure out how to remove this during incubation. We can probably
    > put it down as an optional system requirement for doing certain
    > releases.
    >



    This archive was generated by hypermail 2.0.0 : Wed Mar 08 2006 - 14:29:25 EST