启动我的网络启动应用时遇到问题。我通过外部Jar获取ClassNotFoundException,但是这个jar在我的jnlp中正确定义,并且它的路径也可以正确访问。
这是异常的痕迹:
13:05:05.848 [Thread-18] ERROR c.o.b.xml.XMLApplicationBuilder - Error instantiating:
java.lang.reflect.InvocationTargetException: null
at sun.reflect.GeneratedConstructorAccessor25.newInstance(Unknown Source) ~[na:na]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.ontimize.builder.xml.XMLApplicationBuilder.instance(XMLApplicationBuilder.java:602) [ontimize-core-5.8.0.jar:na]
at com.ontimize.builder.xml.XMLApplicationBuilder.instance(XMLApplicationBuilder.java:588) [ontimize-core-5.8.0.jar:na]
at com.ontimize.builder.xml.XMLApplicationBuilder.buildFormManager(XMLApplicationBuilder.java:737) [ontimize-core-5.8.0.jar:na]
at com.ontimize.builder.xml.XMLApplicationBuilder.buildApplication(XMLApplicationBuilder.java:383) [ontimize-core-5.8.0.jar:na]
at com.ontimize.gui.ApplicationLauncher$StartedThread.run(ApplicationLauncher.java:74) [ontimize-core-5.8.0.jar:na]
Caused by: java.lang.NoClassDefFoundError: com/ontimize/gui/BasicInteractionManager
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_131]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[na:1.8.0_131]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0_131]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[na:1.8.0_131]
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_131]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131]
at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_131]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[na:1.8.0_131]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0_131]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[na:1.8.0_131]
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_131]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131]
at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:411) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_131]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[na:1.8.0_131]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0_131]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[na:1.8.0_131]
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_131]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131]
at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_131]
at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_131]
at com.ontimize.gui.manager.BaseFormManager.init(BaseFormManager.java:485) ~[ontimize-core-5.8.0.jar:na]
at com.ontimize.gui.FormManager.init(FormManager.java:321) ~[ontimize-core-5.8.0.jar:na]
at com.ontimize.gui.manager.BaseFormManager.<init>(BaseFormManager.java:410) ~[ontimize-core-5.8.0.jar:na]
at com.ontimize.gui.FormManager.<init>(FormManager.java:282) ~[ontimize-core-5.8.0.jar:na]
... 8 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.ontimize.gui.BasicInteractionManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
... 55 common frames omitted
这是我的jnlp:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://host2:8085/gestiontributaria/" href="launch.jnlp">
<security>
<all-permissions />
</security>
<resources>
<java version="1.7+" initial-heap-size="32m" max-heap-size="256m" />
<jar href="webstart/gestiontributaria-client-0.0.1-SNAPSHOT.jar" main="true" download="eager" />
<jar href="webstart/gestiontributaria-common-0.0.1-SNAPSHOT.jar" download="eager"/>
<jar href="webstart/ontimize-core-5.8.0.jar" download="lazy"/>
</resources>
<application-desc main-class="org.gestiontributaria.client.ClientLauncher">
<argument>org/gestiontributaria/client/conf/labels.xml</argument>
<argument>org/gestiontributaria/client/clientapplication.xml</argument>
<argument>-conf</argument>
<argument>org/gestiontributaria/client/conf/defaultXMLConfigurationParameters.xml</argument>
<argument>-Dcom.ontimize.locator.ReferenceLocator.Port=49015</argument>
<argument>-Dcom.ontimize.locator.ReferenceLocator.Hostname=servidoraplicaciones2</argument>
<argument>-Dcom.ontimize.util.rmitunneling.cgipath=/gestiontributaria/rmitunneling/rmi</argument>
<argument>-Dcom.ontimize.util.rmitunneling.port=8085</argument>
<argument>-Dcom.ontimize.util.rmitunneling.debug=false</argument>
<argument>-Dcom.ontimize.gui.lafclassname=com.ontimize.plaf.OntimizeLookAndFeel</argument>
<argument>-Dcom.ontimize.gui.lafstyle=com/ontimize/plaf/style/brown_style.css</argument>
</application-desc>
</jnlp>
所有的罐子都在gestiontributaria / webstart /中,所有罐子都是用相同的认证签名的。我的jnlp在gestiontributaria /.
ontimize-core-5.8.0.jar已下载,我可以在java控制面板的资源上看到它。
我使用tomcat 8.5部署战争。
有人对这个问题有所了解吗?