maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Brown" <da...@davidwbrown.name>
Subject Re: Maven build assembly manifest executable jar not working
Date Wed, 02 Jul 2008 20:01:16 GMT
Hello Wayne, thanks for the reply. When I read I thought: Of Course! but as you can see below:

C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>java -jar
XSFileUploadApp-1.0.jar
Exception in thread "main" java.lang.NoClassDefFoundError:  com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp
Caused by: java.lang.ClassNotFoundException:  com.fds.ar.apps.util.fileupload.XSFileUploadApp.XSFileUploadApp
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>type ..\src\main\java\com\fds\ar\apps\util\fileupload\XSFileUploadApp\M
ANIFEST.MF
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: dwbrown
Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
Build-Jdk:  1.6.0-b09
Extension-Name: XSFileUploadApp
Specification-Vendor: FA
Implementation-Vendor: FA
Implementation-Title: XSFileUploadApp
Implementation-Version: 1.0-SNAPSHOT
Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp.XSFileUploadApp
Class-Path: XSFileUploadApp-1.0.jar
mode: development
url: http://www.flooddata.com

Wayne Fay wrote ..
> Your Main-Class is wrong...
> 
> You have:
> Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> 
> It seems you need:
> Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp.XSFileUploadApp
> 
> Wayne
> 
> On 7/2/08, David Brown <david@davidwbrown.name> wrote:
> > Hello Wayne, thanks for the speedy and informative reply. You're right this is
> not a Maven issue but I am running mvn in an attempt to get the job done. The results
> of jar tvf XSFileUploadApp.jar and the other operations are included below. TIA
> and please advise, David.
> >
> > **************************************************************************************
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>java
> -jar XSFileUploadApp-1.0.jar
> > Exception in thread "main" java.lang.NoClassDefFoundError:  com/fds/ar/apps/util/fileupload/XSFileUploadApp
> > Caused by: java.lang.ClassNotFoundException:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> >        at java.net.URLClassLoader$1.run(Unknown Source)
> >        at java.security.AccessController.doPrivileged(Native Method)
> >        at java.net.URLClassLoader.findClass(Unknown Source)
> >        at java.lang.ClassLoader.loadClass(Unknown Source)
> >        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> >        at java.lang.ClassLoader.loadClass(Unknown Source)
> >        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> >
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>jar
> tvf XSFileUploadApp-1.0.jar
> >     0 Wed Jul 02 13:30:16 CDT 2008 META-INF/
> >   498 Wed Jul 02 13:30:14 CDT 2008 META-INF/MANIFEST.MF
> >     0 Wed Jul 02 13:30:12 CDT 2008 com/
> >     0 Wed Jul 02 13:30:12 CDT 2008 com/fds/
> >     0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/
> >     0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/
> >     0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/
> >     0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/
> >     0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/XSFileUploadApp/
> >   622 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$1.class
> >  2250 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$MultipartFileUploadFrame$1.class
> >  5307 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$MultipartFileUploadFrame$2.class
> >  5633 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$MultipartFileUploadFrame.class
> >  1690 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp.class
> >     0 Wed Jul 02 13:30:16 CDT 2008 META-INF/maven/
> >     0 Wed Jul 02 13:30:16 CDT 2008 META-INF/maven/com.fds.ar.apps.util.fileupload/
> >     0 Wed Jul 02 13:30:16 CDT 2008 META-INF/maven/com.fds.ar.apps.util.fileupload/XSFileUploadApp/
> >  2123 Wed Jul 02 13:24:50 CDT 2008 META-INF/maven/com.fds.ar.apps.util.fileupload/XSFileUploadApp/pom.xml
> >   134 Wed Jul 02 13:30:16 CDT 2008 META-INF/maven/com.fds.ar.apps.util.fileupload/XSFileUploadApp/pom.properties
> >
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>java
> -jar XSFileUploadApp-1.0.jar
> > Exception in thread "main" java.lang.NoClassDefFoundError:  com/fds/ar/apps/util/fileupload/XSFileUploadApp
> > Caused by: java.lang.ClassNotFoundException:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> >        at java.net.URLClassLoader$1.run(Unknown Source)
> >        at java.security.AccessController.doPrivileged(Native Method)
> >        at java.net.URLClassLoader.findClass(Unknown Source)
> >        at java.lang.ClassLoader.loadClass(Unknown Source)
> >        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> >        at java.lang.ClassLoader.loadClass(Unknown Source)
> >        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> >
> > C:\Documents and Settings\dwbrown\My Documents\dev\java\XSFileUploadApp\target>type
> ..\src\main\java\com\fds\ar\apps\util\fileupload\XSFileUploadApp\M
> > ANIFEST.MF
> > Manifest-Version: 1.0
> > Archiver-Version: Plexus Archiver
> > Created-By: Apache Maven
> > Built-By: dwbrown
> > Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > Build-Jdk:  1.6.0-b09
> > Extension-Name: XSFileUploadApp
> > Specification-Vendor: FA
> > Implementation-Vendor: FA
> > Implementation-Title: XSFileUploadApp
> > Implementation-Version: 1.0-SNAPSHOT
> > Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > Class-Path: XSFileUploadApp-1.0.jar
> > mode: development
> > url: http://www.flooddata.com
> > *************************************************************************************************
> >
> >
> >
> > Wayne Fay wrote ..
> > > Are you sure that file exists in the jar? I've had zero problems
> > > constructing executable jars with Maven.
> > >
> > > Unzip the jar and check things out. Adjust the manifest file and
> > > rezip, then test again, until you get it working. Then you know what
> > > you need to adjust in Maven.
> > >
> > > Wayne
> > >
> > > On 7/2/08, David Brown <david@davidwbrown.name> wrote:
> > > > Hello Maven dev, gurus and users. I have a curious situation where I want
> to
> > > make my Swing App into an executable jar. I went to the Maven guides site:
> http://maven.apache.org/guides/mini/guide-manifest.html
> > > and I used the build snippet displayed below. I inserted the snippet and edited
> > > the MANIFEST.MF as displayed below. Lo-and-behold: it returns the usual (follows)
> > > NoClassDefFoundError when I try to exectue. I have successfully hand built
> executable
> > > jars in the past but I would like to have Maven doing this job. The particulars
> > > follow. TIA and please advise, David.
> > > >
> > > > OS: Ubuntu 2.6.24-17-generic GNU/LINUX
> > > > Arch: i686 SMP
> > > > Error condition:
> > > >
> > > > java -jar XSFileUploadApp-1.0.jar
> > > > Exception in thread "main" java.lang.NoClassDefFoundError:  com/fds/ar/apps/util/fileupload/XSFileUploadApp
> > > > Caused by: java.lang.ClassNotFoundException:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > > >
> > > > MANIFEST.MF:
> > > >
> > > > Manifest-Version: 1.0
> > > > Archiver-Version: Plexus Archiver
> > > > Created-By: Apache Maven
> > > > Built-By: dwbrown
> > > > Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > > > Build-Jdk:  1.6.0-b09
> > > > Extension-Name: XSFileUploadApp
> > > > Specification-Vendor: FA
> > > > Implementation-Vendor: FA
> > > > Implementation-Title: XSFileUploadApp
> > > > Implementation-Version: 1.0-SNAPSHOT
> > > > Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > > > mode: development
> > > > url: http://www.flooddata.com
> > > >
> > > >
> > > > Yet some, not wise, go to the other side of the globe, to barbarous and
unhealthy
> > > regions, and devote ten or twenty years, in that they may live,-that is, keep
> comfortably
> > > warm,- and die in New England at last.
> > > >
> > > > Henry David Thoreau - Walden - 1845
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > Yet some, not wise, go to the other side of the globe, to barbarous and unhealthy
> regions, and devote ten or twenty years, in that they may live,-that is, keep comfortably
> warm,- and die in New England at last.
> >
> > Henry David Thoreau - Walden - 1845
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
Yet some, not wise, go to the other side of the globe, to barbarous and unhealthy regions,
and devote ten or twenty years, in that they may live,-that is, keep comfortably warm,- and
die in New England at last. 

Henry David Thoreau - Walden - 1845


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message