JRE 1.7.0_51-b13和签名小程序

时间:2014-03-12 11:48:45

标签: java applet manifest signed-applet

我已经购买了一个可信证书来签署我的applet,以防止上一版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加载期间

。怎么了?

更新:这是我的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{
    ......

这给了我一个例外:任何想法?

1 个答案:

答案 0 :(得分:3)

找到解决方案。我错过了加入外部罐子的表现:

Trusted-Library: true