Re: Can't run zipped version of application
Boris Heithecker <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CAL465REZTr3r4WQmFXSufMh-1yavJ8rv2-tkJh6L+mJCiKbV+w@mail.gmail.com> |
If I build a zip, unpack it, and try to run it, I get (right on the console, the splash screen disappears immediately): Exception in thread "main" java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor while loading org.openide.filesystems.FileSystem; see http://wiki.netbeans.org/DevFaqTroubleshootClassNotFound at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:263) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.netbeans.core.startup.CLIOptions.cli(CLIOptions.java:159) at org.netbeans.core.startup.CLIOptions.cli(CLIOptions.java:98) at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234) at org.netbeans.CLIHandler.initialize(CLIHandler.java:519) at org.netbeans.CLIHandler.initialize(CLIHandler.java:384) at org.netbeans.MainImpl.execute(MainImpl.java:193) at org.netbeans.MainImpl.main(MainImpl.java:85) at org.netbeans.Main.main(Main.java:83) Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:278) at org.netbeans.PatchByteCode.patchAsmMethod(PatchByteCode.java:186) at org.netbeans.PatchByteCode.apply(PatchByteCode.java:177) at org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:251) at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:259) ... 10 more Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor starting from org.netbeans.MainImpl$BootClassLoader@1e157985 with possible defining loaders null and declared parents ] at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 16 more Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:222) ... 17 more As I said, file "platform/core/asm-all-5.0.1.jar" is not included in the zipped distribution, however it must be there. There is a regular module org-netbeans-libs-asm.jar in platform/core that has a Class-Path entry pointing to the other jar in it manifest. Boris 2016-02-01 21:03 GMT+01:00 <[email protected]>: > The problem seem to be that > "{nbinstall}/platform/core/asm-all-5.0.1.jar" is not copied into the > zipped target folders. It's a bug. Until it's fixed, I've modified the > "copy-cluster" task in my harness/suite.xml as follows: > > <target name="copy-cluster" ......> > <pathconvert property="cluster.name"> > ..... > </pathconvert> > > <!--Add the following copy task as a workaround to build-zip on > 8.1--> > <copy todir="${dest.dir}/${cluster.name}"> > <fileset dir="${basedir}"> > > <filename name="core/asm-all-5.0.1.jar"/> > </fileset> > </copy> > > <copy todir="${dest.dir}/${cluster.name}"> > ....... > </target> > > I couldn't remove a dependency on module "OWS ASM" which needs the > above file on its class path. >