当前位置: 技术问答>java相关
java.lang.NoSuchMethodError when run j2ee -verbose
来源: 互联网 发布时间:2015-04-22
本文导语: When testing j2ee server of SUN, i get the following error which make me so frustrated! G:>j2ee -verbose G:>G:jdk1.3.0_02binjava -Xmx128m -Djavax.net.ssl.trustStore=G:j2sdkee1.3.1 libsecuritycacerts.jks -Djava.security.auth.policy=G:j2sdkee1.3.1libsecurit yjaas.po...
When testing j2ee server of SUN, i get the following error which make me so frustrated!
G:>j2ee -verbose
G:>G:jdk1.3.0_02binjava -Xmx128m -Djavax.net.ssl.trustStore=G:j2sdkee1.3.1
libsecuritycacerts.jks -Djava.security.auth.policy=G:j2sdkee1.3.1libsecurit
yjaas.policy -Dcom.sun.CORBA.connection.ORBListenSocket=SSL:0,SSL_MUTUALAUTH:0,
PERSISTENT_SSL:1060 -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -D
org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Djms.home=G:j2sdkee
1.3.1 -Dcom.sun.jms.service.jdbc.dbpath=G:j2sdkee1.3.1repositoryERICAdb -Dj
ms.properties=G:j2sdkee1.3.1configjms_service.properties -Djava.security.poli
cy=G:j2sdkee1.3.1libsecurityserver.policy -Djava.security.auth.login.config=
G:j2sdkee1.3.1libsecurityserverlogin.config -Dcom.sun.enterprise.home=G:j2s
dkee1.3.1 -classpath G:j2sdkee1.3.1libsystemcloudscape.jar;G:j2sdkee1.3.1l
ibsystemtools.jar;G:j2sdkee1.3.1libcloudscapeRmiJdbc.jar;G:j2sdkee1.3.1l
ibcloudscapecloudclient.jar;G:j2sdkee1.3.1libj2ee.jar;G:j2sdkee1.3.1libj
2eetools.jar;G:j2sdkee1.3.1liblocale;G:jdk1.3.0_02libtools.jar;G:j2sdkee1
.3.1libjhall.jar com.sun.enterprise.server.J2EEServer -verbose
J2EE server listen port: 1050
Naming service started:1050
Exception in thread "main" java.lang.NoSuchMethodError
at com.sun.corba.ee.internal.corba.AnyImpl.createTypeCodeForClass(AnyImp
l.java:1256)
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.createTypeCode(Sh
utdownUtilDelegate.java:223)
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.writeAny(Shutdown
UtilDelegate.java:178)
at javax.rmi.CORBA.Util.writeAny(Util.java:80)
at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.re
bind(Unknown Source)
at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:188
)
at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:202
)
at javax.naming.InitialContext.rebind(InitialContext.java:370)
at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManag
erImpl.java:192)
at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManag
erImpl.java:149)
at com.sun.enterprise.server.J2EEServer.bindObject(J2EEServer.java:718)
at com.sun.enterprise.server.J2EEServer.createServerObject(J2EEServer.ja
va:473)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:244)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972)
Some guys said it's related to classpath. I have double checked. What's wrong?
G:>j2ee -verbose
G:>G:jdk1.3.0_02binjava -Xmx128m -Djavax.net.ssl.trustStore=G:j2sdkee1.3.1
libsecuritycacerts.jks -Djava.security.auth.policy=G:j2sdkee1.3.1libsecurit
yjaas.policy -Dcom.sun.CORBA.connection.ORBListenSocket=SSL:0,SSL_MUTUALAUTH:0,
PERSISTENT_SSL:1060 -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -D
org.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Djms.home=G:j2sdkee
1.3.1 -Dcom.sun.jms.service.jdbc.dbpath=G:j2sdkee1.3.1repositoryERICAdb -Dj
ms.properties=G:j2sdkee1.3.1configjms_service.properties -Djava.security.poli
cy=G:j2sdkee1.3.1libsecurityserver.policy -Djava.security.auth.login.config=
G:j2sdkee1.3.1libsecurityserverlogin.config -Dcom.sun.enterprise.home=G:j2s
dkee1.3.1 -classpath G:j2sdkee1.3.1libsystemcloudscape.jar;G:j2sdkee1.3.1l
ibsystemtools.jar;G:j2sdkee1.3.1libcloudscapeRmiJdbc.jar;G:j2sdkee1.3.1l
ibcloudscapecloudclient.jar;G:j2sdkee1.3.1libj2ee.jar;G:j2sdkee1.3.1libj
2eetools.jar;G:j2sdkee1.3.1liblocale;G:jdk1.3.0_02libtools.jar;G:j2sdkee1
.3.1libjhall.jar com.sun.enterprise.server.J2EEServer -verbose
J2EE server listen port: 1050
Naming service started:1050
Exception in thread "main" java.lang.NoSuchMethodError
at com.sun.corba.ee.internal.corba.AnyImpl.createTypeCodeForClass(AnyImp
l.java:1256)
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.createTypeCode(Sh
utdownUtilDelegate.java:223)
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.writeAny(Shutdown
UtilDelegate.java:178)
at javax.rmi.CORBA.Util.writeAny(Util.java:80)
at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.re
bind(Unknown Source)
at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:188
)
at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:202
)
at javax.naming.InitialContext.rebind(InitialContext.java:370)
at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManag
erImpl.java:192)
at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManag
erImpl.java:149)
at com.sun.enterprise.server.J2EEServer.bindObject(J2EEServer.java:718)
at com.sun.enterprise.server.J2EEServer.createServerObject(J2EEServer.ja
va:473)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:244)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972)
Some guys said it's related to classpath. I have double checked. What's wrong?
|
请用下面的方法再试一遍,应该可以成功的
1. 安装
可以从以下网址下载一个J2EE(j2sdkee-1_3-beta2-win.exe):http://java.sun.com/j2ee/j2sdkee-beta/index.html。也许你已装了旧版的J2EE SDK 产品,如果是,在安装新下载的J2EE之前请先卸载或删掉旧版的J2EE SDK。运行j2sdkee-1_3-beta2-win.exe,按安装步骤安装好J2EE。这里假设你的J2EE安装在:C:j2sdkee1.3 目录下。
2. 设置环境变量
在运行J2EE SDK之前,你必须设置以下环境变量:
J2EE_HOME - 你的J2EE SDK所安装的目录。如本例中的:C:j2sdkee1.3 。
JAVA_HOME - 你的Java 2 SDK 所安装的目录。
PATH - 设置为你安装J2EE SDK目录下的bin目录。如本例的的:C:j2sdkee1.3bin 。
ClassPath - 增添%J2EE_HOME%libj2ee.jar到ClassPath中。本例中也可写为:C:j2sdkee1.3libj2ee.jar
1. 安装
可以从以下网址下载一个J2EE(j2sdkee-1_3-beta2-win.exe):http://java.sun.com/j2ee/j2sdkee-beta/index.html。也许你已装了旧版的J2EE SDK 产品,如果是,在安装新下载的J2EE之前请先卸载或删掉旧版的J2EE SDK。运行j2sdkee-1_3-beta2-win.exe,按安装步骤安装好J2EE。这里假设你的J2EE安装在:C:j2sdkee1.3 目录下。
2. 设置环境变量
在运行J2EE SDK之前,你必须设置以下环境变量:
J2EE_HOME - 你的J2EE SDK所安装的目录。如本例中的:C:j2sdkee1.3 。
JAVA_HOME - 你的Java 2 SDK 所安装的目录。
PATH - 设置为你安装J2EE SDK目录下的bin目录。如本例的的:C:j2sdkee1.3bin 。
ClassPath - 增添%J2EE_HOME%libj2ee.jar到ClassPath中。本例中也可写为:C:j2sdkee1.3libj2ee.jar