当前位置: 代码迷 >> Web前端 >> Agile PLM: JavClient无法登录异常 ClassNotFoundException: weblogic.workarea.spi.WorkContextEntryImpl
  详细解决方案

Agile PLM: JavClient无法登录异常 ClassNotFoundException: weblogic.workarea.spi.WorkContextEntryImpl

热度:1108   发布时间:2012-12-18 12:43:41.0
Agile PLM: JavClient无法登录错误 ClassNotFoundException: weblogic.workarea.spi.WorkContextEntryImpl

问题描述

一客户案例,新安装完Agile 9.3.1.2, Weblogic 10.3.6, 服务能启动, WebClient能登录正常使用。而用户却无法登录JavaClient,JavaClient输入用户名后只显示蓝色背景,如下图。



启用Java Console后,出现如下ClassNotFoundException异常。

[SunJDK14ConditionalEventPump] Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: weblogic/workarea/spi/WorkContextEntryImpl
	at weblogic.workarea.WorkContextLocalMap.receiveResponse(WorkContextLocalMap.java:190)
	at weblogic.workarea.WorkContextMapImpl.receiveResponse(WorkContextMapImpl.java:178)
	at weblogic.rmi.provider.WorkServiceContext.readExternal(WorkServiceContext.java:80)
	at java.io.ObjectInputStream.readExternalData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
	at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
	at weblogic.rjvm.MsgAbbrevInputStream.readExtendedContexts(MsgAbbrevInputStream.java:223)
	at weblogic.rjvm.ResponseImpl.retrieveThreadLocalContext(ResponseImpl.java:164)
	at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:230)
	at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
	at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
	at com.agile.pc.cmserver.pcmhelper.PCMHelperSessionBean_9xz6y2_EOImpl_1036_WLStub.login(Unknown Source)
	at com.agile.ui.java.data.pc.PCEJBConnection.login(PCEJBConnection.java:956)
	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 com.agile.ui.java.data.pc.PCInterfaceFactory$1.invoke(PCInterfaceFactory.java:27)
	at $Proxy1.login(Unknown Source)
	at com.agile.ui.pcclient.CommandLogin.doExecute(CommandLogin.java:118)
	at com.agile.ui.java.command.CommandManager$4.run(CommandManager.java:297)
	at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
	at java.security.AccessController.doPrivileged(Native Method)
	at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
	at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: weblogic.workarea.spi.WorkContextEntryImpl
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 29 more

分析

一个标准的JavaClient部署之后,在WAR包中会引入weblogic client的相关class作为RMI调用。在weblogic/workarea/spi/的包中,只需要如下这两个类即可。错误中提及的WorkContextEntryImpl是不需要的。可以通过解压开agileDomain\applications\application.ear\JavaClient.war\wls\lib\appserver_wls.jar就可以查看。
     WorkContextAccessController.class
     WorkContextMapInterceptor.class


Google该类也无从查起。进一步分析从Agile server日志看。注意到日志中从没有见过的下述关于jrockit的警告。

CLASSPATH=/u02/weblogic/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u02/weblogic/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/jrockit/jrockit-jdk1.6.0_24/lib/tools.jar:/u02/weblogic/wlserver_10.3/server/lib/weblogic_sp.jar:/u02/weblogic/wlserver_10.3/server/lib/weblogic.jar:/u02/weblogic/modules/features/weblogic.server.modules_10.3.6.0.jar:/u02/weblogic/wlserver_10.3/server/lib/webservices.jar:/u02/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u02/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:

PATH=/u02/weblogic/wlserver_10.3/server/bin:/u02/weblogic/modules/org.apache.ant_1.7.1/bin:/u01/jrockit/jrockit-jdk1.6.0_24/jre/bin:/u01/jrockit/jrockit-jdk1.6.0_24/bin:/usr/kerberos/bin:/usr/bin:/bin:/home/y201189/bin

Your environment has been set.
[WARN ][jrockit] MaxPermSize=256M ignored: Not a valid option for JRockit
[WARN ][jrockit] NewSize=256M ignored: Not a valid option for JRockit
[WARN ][jrockit] MaxNewSize=256M ignored: Not a valid option for JRockit
[INFO ][mgmnt  ] Remote JMX connector started at address SVT266.mazda.co.jp:9899
[INFO ][mgmnt  ] Local JMX connector started
AgileAuthenticationProviderImpl.initialize


MaxPermSize之类的JVM参数都是给SUN JDK用的,并非jrockit。在看CLASSPATH中也出现了jrockit的引用。
/u01/jrockit/jrockit-jdk1.6.0_24/lib/tools.jar

结论

用户错误地使用了jrocket作为启动Weblogic的JVM。对于APP所使用的JDK,Oracle有很明确的说明。


For WebLogic Server, only JDK 6 certified. For Linux, Solaris and Windows, only Sun JDK is certified. For AIX, only IBM JDK is certified. For HP-UX, only HP JDK is certified.

http://docs.oracle.com/cd/E23848_07/otn/pdf/install/E23851_05.pdf


  相关解决方案