[jnc-users] Null PointerException at java.net.URLClassLoader.getPermissions
Status: Beta
Brought to you by:
soapy
|
From: Keith B. <kei...@fl...> - 2009-11-22 15:36:11
|
Hi,
I made some good progress compiling an app I've written, I came across a few errors during the first few iterations of compilation. I've been able to resolve most problems I came across by adding missing dependencies (jar files) for various packages I'm using.
However I've come to a particular problem that I'm really stumped with and would appreciate any help anyone could offer.
I've compiled my app using normal methods through the UI and compilation and packing seems successful. However when I run the app (windows or linux, both behave the same and return the same errors) I was initially getting this error:
[root@tserver tmp]# ./linux
Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.log4j.xml.DOMConfigurator
at java.lang.Class.initializeClass(linux)
at java.lang.Class.newInstance(linux)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux)
at org.apache.log4j.LogManager.<clinit>(linux)
at java.lang.Class.initializeClass(linux)
at org.apache.log4j.LogManager.getLogger(linux)
at org.apache.log4j.Logger.getLogger(linux)
at com.flare.applications.FileSquirrel.App.main(linux)
Caused by: java.lang.ClassNotFoundException: org.xml.sax.ErrorHandler not found in gnu.gcj.runtime.SystemClassLoader{urls=[], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at gnu.gcj.runtime.SystemClassLoader.findClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at java.lang.Class.initializeClass(linux)
...8 more
I added the libgcj jar to the classpath:
export CLASSPATH=/tmp/libgcj-4.3.0.jar
And now I'm getting this error:
[root@tserver tmp]# ./linux
Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.log4j.xml.DOMConfigurator
at java.lang.Class.initializeClass(linux)
at java.lang.Class.newInstance(linux)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux)
at org.apache.log4j.LogManager.<clinit>(linux)
at java.lang.Class.initializeClass(linux)
at org.apache.log4j.LogManager.getLogger(linux)
at org.apache.log4j.Logger.getLogger(linux)
at com.flare.applications.FileSquirrel.App.main(linux)
Caused by: java.lang.NullPointerException
at java.net.URLClassLoader.getPermissions(linux)
at java.security.SecureClassLoader.getProtectionDomain(linux)
at java.security.SecureClassLoader.defineClass(linux)
at java.net.URLClassLoader.findClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at gnu.gcj.runtime.SystemClassLoader.findClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at java.lang.ClassLoader.loadClass(linux)
at java.lang.Class.initializeClass(linux)
...8 more
This has me really stumped and any help would be greatly appreciated.
Keith |