我已经购买了受信任的证书来签署我的小程序,以防止Oracle JRE的最新版本(1.7.0.51)引入警告和问题。
一切正常,除了使用也使用外部jar的applet(特别是axis2-1.5.4.jar)
我也用我的新证书对此罐子进行了签名,但是我总是获得:
java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/axis2/databinding/ADBBean
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.instantiateApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/axis2/databinding/ADBBean
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.access$100(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.axis2.databinding.ADBBean
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 42 more
在applet加载期间。怎么了?
更新:这是我的小程序代码。
<object width="200" height="200" code="AeDPeA2WS.class" CODEBASE="/<path>/AeDPeA2WS/$FILE" name="AeDPeA2WS">
<param name="CODEBASE" value="/<path>/AeDPeA2WS/$FILE">
<param name="code" value="AeDPeA2WS.class">
<param name="name" value="AeDPeA2WS">
<PARAM NAME="MAYSCRIPT" VALUE="true">
<param name="archive" value="AeDPeA2WS.jar,axis2-kernel-1.4.1.jar,axis2-1.5.4.jar,activation-1.1.jar,axiom-api-1.2.10.jar,axis-wsdl4j-1.2.jar,backport-util-concurrent-3.1.jar,axiom-dom-1.2.10.jar,axiom-impl-1.2.10.jar,commons-codec-1.4.jar,commons-httpclient-3.1.jar,commons-logging-1.1.1.jar,mail-1.4.jar,neethi-2.0.4.jar,woden-api-1.0M8.jar,XmlSchema-1.4.3.jar">
更新2
我试图隔离代码的每个部分,并逐步添加它。我发现问题出在我声明此方法时:
private Base64Binary setMTOMEncoding (DataHandler dh) {
Base64Binary bb = new Base64Binary();
bb.setBase64Binary( dh );
ContentType_type0 ct = new ContentType_type0();
ct.setContentType_type0( dh.getContentType() );
bb.setContentType( ct );
return bb;
}
是以这种方式定义的:
public static class Base64Binary implements org.apache.axis2.databinding.ADBBean{
......
这给了我一个例外:任何想法?
最佳答案
找到解决方案。我错过了添加外部罐子来体现这一点:
Trusted-Library: true