我正在使用 SerializationUtils.clone 克隆我的对象。相同的代码在 JBOss EAP 6.0 中运行良好。当我在处理过程中迁移到 glassfish 3.1.2.2 时,我遇到了错误
2013-12-10 16:55:44,069 ERROR ge.nbsm.weGGI.Workflow.WorkflowManager - Exception in Manage Workflow -->
org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException: ge.nbsm.weGGI.valueObjects.DataContainerVO
at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:165)
at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:192)
at org.apache.commons.lang.SerializationUtils.clone(SerializationUtils.java:80)
at ge.nbsm.weGGI.Workflow.ObjectInterface.makeDACall(ObjectInterface.java:54)
at ge.nbsm.weGGI.Workflow.WorkflowManager.makeDACall(WorkflowManager.java:648)
at ge.nbsm.weGGI.Workflow.WorkflowManager.manageWorkflow(WorkflowManager.java:395)
at ge.nbsm.weGGI.common.utility.XMLProcessor.parseXML(XMLProcessor.java:487)
at ge.nbsm.weGGI.queue.QueueManager.processRequest(QueueManager.java:169)
Caused by: java.lang.ClassNotFoundException: ge.nbsm.weGGI.valueObjects.DataContainerVO
at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:787)
at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:162)
... 66 more
它很奇怪..相同的代码没有产生任何问题。我使用的是 commons-lang-2.4.jar。正常的 java 接口克隆不符合我的要求。请帮助解决此问题,如果您需要更多详细信息,请告诉我