Menu

Dependent projects not included properly

Help
2008-04-21
2013-05-20
  • James Barron

    James Barron - 2008-04-21

    Hello. I just installed this plugin and am trying to use if for the first time. I'm using Eclipse 3.2.2 on Mac 10.5.2. I'm trying to package an application project that relies on 3 other Eclipse projects and a few third-party libraries. When I create the fat jar, Eclipse shows the following error message in the command line:

    java.io.FileNotFoundException: /Users/barronj/osx_10_4/java_projects/RtnetPP/TempFatjarBuildDir_erase_me/doc/one-jar-license.txt (Not a directory)

    Followed by a long stack trace.

    When I try to run the jar, I get the following error:

    Exception in thread "main" java.lang.NoClassDefFoundError: com/gpssolutions/util/ParameterChangeListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
        at com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:693)
        at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:599)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at com.simontuffs.onejar.Boot.run(Boot.java:300)
        at com.simontuffs.onejar.Boot.main(Boot.java:159)

    This project needs to include 3 others. There should be three jar files for three dependent projects. One is missing and another is improperly named. Only one has the correct name and contents. The improperly named one is the one that should have the above missing class definition. Instead, it actually contains the contents of one of the other needed projects. When pressing "next" in the "Build Fat Jar" window, the File-List contains the truly missing project jar four times, the correctly named project twice, and the misnamed one only once. I've tried deselecting duplicates in various ways without success. In some cases, even when a project is selected, no jar is created for it in the fat jar. And the misnamed one always remains misnamed.

    Here is an outline.
    GPSSlib          -> All projects need this. It is not present but its name is applied to another.
    InputFiles       -> Requires GPSSlib. It has correct name and contents.
    RtnetInputEditor -> Requires GPSSlib and InputFiles. Mislabeled GPSSlib consistently.

    I usually generate these three with jardesc files.

    Thank you for your help.

     
    • Ferenc Hechler

      Ferenc Hechler - 2008-07-22

      Hello James,

      which version of Fat-Jar do you use?
      Deselect the one-jar option.
      Do not deselect any libs on the second Page.
      Do you still have problems?

      Best regards,

          feri

       

Log in to post a comment.