SerializationUtils.clone在Glassfish 3.1.2.2 build 5中发布



我正在使用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接口克隆不适合我的需求。请帮助解决此问题,如果您需要更多详细信息,请告诉我

由于SerializationUtils.clone面临问题,我已将代码更改为java深度克隆概念。深度克隆实现了我所期望的功能。请参阅以下链接

http://alvinalexander.com/java/java-deep-clone-example-source-code

相关内容

  • 没有找到相关文章

最新更新