问题描述
applet的init函数如下:publicvoidinit(){super.init()try{StringjndiPath="ManageIndexDAOBean/remote";Propertiesprops=newProperties();/*JBOSS服务器*/props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");props.setProperty("java.naming.provider.url","localhost:1099");props.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");InitialContextctx=newInitialContext(props);ManageIndexDAOdao=(ManageIndexDAO)ctx.lookup(jndiPath);if(dao!=null){}}catch(NamingExceptione){e.printStackTrace();}}调用Applet的html内容如下:<appletcodebase="."code="cn.hz.epower.applet.ManageIndexApplet.class"name="ManageIndexApplet"archive="Client/jbossall-client.jar,Client/jboss-ejb3-client.jar,Client/jboss-aop-jdk50-client.jar,Client/jboss-aspect-jdk50-client.jar,Client/PlanStatManageLocal.jar"width="520"height="240"></applet></body>
解决方案
解决方案二:
最后的APPLET的JDK控制面板提示出错信息如下:security:propertypackage.accessvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.security:propertypackage.accessnewvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.javawssecurity:propertypackage.accessvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.javawssecurity:propertypackage.accessnewvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.javaws,com.sun.deploysecurity:propertypackage.accessvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.javaws,com.sun.deploysecurity:propertypackage.accessnewvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.javaws,com.sun.deploy,com.sun.jnlpsecurity:propertypackage.definitionvaluenullsecurity:propertypackage.definitionnewvaluecom.sun.javawssecurity:propertypackage.definitionvaluecom.sun.javawssecurity:propertypackage.definitionnewvaluecom.sun.javaws,com.sun.deploysecurity:propertypackage.definitionvaluecom.sun.javaws,com.sun.deploysecurity:propertypackage.definitionnewvaluecom.sun.javaws,com.sun.deploy,com.sun.jnlpsecurity:propertypackage.accessvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.javaws,com.sun.deploy,com.sun.jnlpsecurity:propertypackage.accessnewvaluesun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jsssecurity:propertypackage.definitionvaluecom.sun.javaws,com.sun.deploy,com.sun.jnlpsecurity:propertypackage.definitionnewvaluecom.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jssbasic:已添加进度监听程序:sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@19616c7network:没有与未签名的JAR文件有关的证书信息:http://localhost:9090/PlanStatManageWeb/Client/jbossall-client.jarnetwork:找到了高速缓存项[url:http://localhost:9090/PlanStatManageWeb/Client/jbossall-client.jar,版本:null]network:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/Client/jbossall-client.jarnetwork:CleanupThreadused68317usnetwork:正在使用代理DIRECT连接http://localhost:9090/network:http://localhost:9090/PlanStatManageWeb/Client/jbossall-client.jar的响应代码:304network:http://localhost:9090/PlanStatManageWeb/Client/jbossall-client.jar的编码:nullnetwork:断开与http://localhost:9090/PlanStatManageWeb/Client/jbossall-client.jar的连接network:没有与未签名的JAR文件有关的证书信息:http://localhost:9090/PlanStatManageWeb/Client/jboss-ejb3-client.jarnetwork:找到了高速缓存项[url:http://localhost:9090/PlanStatManageWeb/Client/jboss-ejb3-client.jar,版本:null]network:CleanupThreadused4usnetwork:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/Client/jboss-ejb3-client.jarnetwork:http://localhost:9090/PlanStatManageWeb/Client/jboss-ejb3-client.jar的响应代码:304network:http://localhost:9090/PlanStatManageWeb/Client/jboss-ejb3-client.jar的编码:nullnetwork:断开与http://localhost:9090/PlanStatManageWeb/Client/jboss-ejb3-client.jar的连接network:没有与未签名的JAR文件有关的证书信息:http://localhost:9090/PlanStatManageWeb/Client/jboss-aop-jdk50-client.jarnetwork:找到了高速缓存项[url:http://localhost:9090/PlanStatManageWeb/Client/jboss-aop-jdk50-client.jar,版本:null]network:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/Client/jboss-aop-jdk50-client.jarnetwork:http://localhost:9090/PlanStatManageWeb/Client/jboss-aop-jdk50-client.jar的响应代码:304network:http://localhost:9090/PlanStatManageWeb/Client/jboss-aop-jdk50-client.jar的编码:nullnetwork:断开与http://localhost:9090/PlanStatManageWeb/Client/jboss-aop-jdk50-client.jar的连接network:CleanupThreadused3usnetwork:CleanupThreadused3usnetwork:CleanupThreadused3usnetwork:CleanupThreadused4usnetwork:没有与未签名的JAR文件有关的证书信息:http://localhost:9090/PlanStatManageWeb/Client/jboss-aspect-jdk50-client.jarnetwork:找到了高速缓存项[url:http://localhost:9090/PlanStatManageWeb/Client/jboss-aspect-jdk50-client.jar,版本:null]network:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/Client/jboss-aspect-jdk50-client.jarnetwork:http://localhost:9090/PlanStatManageWeb/Client/jboss-aspect-jdk50-client.jar的响应代码:304network:http://localhost:9090/PlanStatManageWeb/Client/jboss-aspect-jdk50-client.jar的编码:nullnetwork:断开与http://localhost:9090/PlanStatManageWeb/Client/jboss-aspect-jdk50-client.jar的连接network:没有与未签名的JAR文件有关的证书信息:http://localhost:9090/PlanStatManageWeb/Client/PlanStatManageLocal.jarnetwork:找到了高速缓存项[url:http://localhost:9090/PlanStatManageWeb/Client/PlanStatManageLocal.jar,版本:null]network:CleanupThreadused3usnetwork:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/Client/PlanStatManageLocal.jarnetwork:http://localhost:9090/PlanStatManageWeb/Client/PlanStatManageLocal.jar的响应代码:304network:http://localhost:9090/PlanStatManageWeb/Client/PlanStatManageLocal.jar的编码:nullnetwork:断开与http://localhost:9090/PlanStatManageWeb/Client/PlanStatManageLocal.jar的连接network:找到了高速缓存项[url:http://localhost:9090/PlanStatManageWeb/cn/hz/epower/applet/ManageIndexApplet.class,版本:null]network:CleanupThreadused3usnetwork:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/cn/hz/epower/applet/ManageIndexApplet.classnetwork:http://localhost:9090/PlanStatManageWeb/cn/hz/epower/applet/ManageIndexApplet.class的响应代码:304network:http://localhost:9090/PlanStatManageWeb/cn/hz/epower/applet/ManageIndexApplet.class的编码:nullnetwork:断开与http://localhost:9090/PlanStatManageWeb/cn/hz/epower/applet/ManageIndexApplet.class的连接basic:小程序已载入。basic:Appletresizedandaddedtoparentcontainerbasic:PERF:AppletExecutionRunnable-applet.init()BEGIN;jvmLaunchdt364241us,pluginInitdt563531us,TotalTime:927772us
解决方案三:
network:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/jndi.propertiesnetwork:正在使用代理DIRECT连接http://localhost:1099/network:未找到高速缓存项[url:http://IBM-PC/crossdomain.xml,版本:null]network:正在使用代理DIRECT连接http://IBM-PC/crossdomain.xmlnetwork:正在使用代理DIRECT连接http://IBM-PC:80/java.security.PrivilegedActionException:java.net.ConnectException:Connectionrefused:connectatjava.security.AccessController.doPrivileged(NativeMethod)atcom.sun.deploy.net.CrossDomainXML.check(UnknownSource)atcom.sun.deploy.net.CrossDomainXML.check(UnknownSource)atsun.plugin2.applet.Applet2SecurityManager.checkConnect(UnknownSource)atjava.net.InetAddress.getLocalHost(UnknownSource)atsun.rmi.transport.tcp.TCPEndpoint.<clinit>(UnknownSource)atsun.rmi.transport.LiveRef.read(UnknownSource)atsun.rmi.server.UnicastRef2.readExternal(UnknownSource)atjava.rmi.server.RemoteObject.readObject(UnknownSource)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atjava.io.ObjectStreamClass.invokeReadObject(UnknownSource)atjava.io.ObjectInputStream.readSerialData(UnknownSource)atjava.io.ObjectInputStream.readOrdinaryObject(UnknownSource)atjava.io.ObjectInputStream.readObject0(UnknownSource)atjava.io.ObjectInputStream.readObject(UnknownSource)atjava.rmi.MarshalledObject.get(UnknownSource)atorg.jnp.interfaces.NamingContext.getServer(NamingContext.java:252)atorg.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1387)atorg.jnp.interfaces.NamingContext.lookup(NamingContext.java:596)atorg.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)atjavax.naming.InitialContext.lookup(UnknownSource)atcn.hz.epower.applet.ManageIndexApplet.init(ManageIndexApplet.java:249)atsun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(UnknownSource)atjava.lang.Thread.run(UnknownSource)Causedby:java.net.ConnectException:Connectionrefused:connectatjava.net.PlainSocketImpl.socketConnect(NativeMethod)atjava.net.PlainSocketImpl.doConnect(UnknownSource)atjava.net.PlainSocketImpl.connectToAddress(UnknownSource)atjava.net.PlainSocketImpl.connect(UnknownSource)atjava.net.SocksSocketImpl.connect(UnknownSource)atjava.net.Socket.connect(UnknownSource)atsun.net.NetworkClient.doConnect(UnknownSource)atsun.net.www.http.HttpClient.openServer(UnknownSource)atsun.net.www.http.HttpClient.openServer(UnknownSource)atsun.net.www.http.HttpClient.<init>(UnknownSource)atsun.net.www.http.HttpClient.New(UnknownSource)atsun.net.www.http.HttpClient.New(UnknownSource)atsun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(UnknownSource)atsun.net.www.protocol.http.HttpURLConnection.plainConnect(UnknownSource)atsun.net.www.protocol.http.HttpURLConnection.connect(UnknownSource)atcom.sun.deploy.net.CrossDomainXML$2.run(UnknownSource)...27morenetwork:正在使用代理DIRECT连接http://127.0.0.1:1098/basic:已删除进度监听程序:sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@19616c7Exceptioninthread"threadapplet-cn.hz.epower.applet.ManageIndexApplet.class-1"java.lang.ExceptionInInitializerErroratorg.jboss.remoting.InvokerLocator.<clinit>(InvokerLocator.java:78)atsun.misc.Unsafe.ensureClassInitialized(NativeMethod)atsun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnknownSource)atsun.reflect.ReflectionFactory.newFieldAccessor(UnknownSource)atjava.lang.reflect.Field.acquireFieldAccessor(UnknownSource)atjava.lang.reflect.Field.getFieldAccessor(UnknownSource)atjava.lang.reflect.Field.getLong(UnknownSource)atjava.io.ObjectStreamClass.getDeclaredSUID(UnknownSource)atjava.io.ObjectStreamClass.access$700(UnknownSource)atjava.io.ObjectStreamClass$2.run(UnknownSource)atjava.security.AccessController.doPrivileged(NativeMethod)atjava.io.ObjectStreamClass.<init>(UnknownSource)atjava.io.ObjectStreamClass.lookup(UnknownSource)atjava.io.ObjectStreamClass.initNonProxy(UnknownSource)atjava.io.ObjectInputStream.readNonProxyDesc(UnknownSource)atjava.io.ObjectInputStream.readClassDesc(UnknownSource)atjava.io.ObjectInputStream.readOrdinaryObject(UnknownSource)atjava.io.ObjectInputStream.readObject0(UnknownSource)atjava.io.ObjectInputStream.defaultReadFields(UnknownSource)atjava.io.ObjectInputStream.readSerialData(UnknownSource)atjava.io.ObjectInputStream.readOrdinaryObject(UnknownSource)atjava.io.ObjectInputStream.readObject0(UnknownSource)atjava.io.ObjectInputStream.defaultReadFields(UnknownSource)atjava.io.ObjectInputStream.readSerialData(UnknownSource)atjava.io.ObjectInputStream.readOrdinaryObject(UnknownSource)atjava.io.ObjectInputStream.readObject0(UnknownSource)atjava.io.ObjectInputStream.readObject(UnknownSource)atjava.rmi.MarshalledObject.get(UnknownSource)atorg.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)atorg.jnp.interfaces.NamingContext.lookup(NamingContext.java:654)atorg.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)atjavax.naming.InitialContext.lookup(UnknownSource)atcn.hz.epower.applet.ManageIndexApplet.init(ManageIndexApplet.java:249)atsun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(UnknownSource)atjava.lang.Thread.run(UnknownSource)Causedby:java.security.AccessControlException:accessdenied(java.util.PropertyPermissionjboss.remoting.pre_2_0_compatibleread)atjava.security.AccessControlContext.checkPermission(UnknownSource)atjava.security.AccessController.checkPermission(UnknownSource)atjava.lang.SecurityManager.checkPermission(UnknownSource)atjava.lang.SecurityManager.checkPropertyAccess(UnknownSource)atjava.lang.System.getProperty(UnknownSource)atorg.jboss.remoting.Version.<clinit>(Version.java:51)...35morenetwork:正在使用代理DIRECT连接http://127.0.0.1:1098/最后说明:1、EJB3类没有问题,在客户机器上测试通过。2、部署EJB3的服务器采用jboss-4.2.1.GA苦恼了我好多天了,不知道有没有高手能帮我解决一下,或者提供给我一个思路,对回贴的人不胜感激
解决方案四:
怎么没人回答啊,郁闷中
解决方案五:
network:正在使用代理DIRECT连接http://localhost:9090/PlanStatManageWeb/jndi.propertiesnetwork:正在使用代理DIRECT连接http://localhost:1099/network:未找到高速缓存项[url:http://IBM-PC/crossdomain.xml,版本:null]network:正在使用代理DIRECT连接http://IBM-PC/crossdomain.xmlnetwork:正在使用代理DIRECT连接http://IBM-PC:80/java.security.PrivilegedActionException:java.net.ConnectException:Connectionrefused:connect不用applet不行吗?直接用jsp或者html
解决方案六:
applet是在用户的jre上跑的,访问EJB组件只能用远程方式,性能上恐怕会比jsp/servlet差很多。
解决方案七:
RMI似乎可以实现的
解决方案八:
UPRMI
解决方案九:
该回复于2009-05-31 17:35:36被版主删除