3

运行时 JAXB 解组失败WAS 7 (在独立测试中成功)

[21/11/12 16:47:55:690 CET] 00000025 DefaultMessag W org.springframework.jms.listener.AbstractMessageListenerContainer invokeErrorHandler Execution of JMS message listener failed, and no ErrorHandler has been set.
                                 java.lang.VerifyError: javax/xml/bind/JAXBElement.<init>(Ljavax/xml/namespace/QName;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Object;)V
    at com.ca.cib.zba.message.mt101.ObjectFactory.createMatherUnmarshaller(ObjectFactory.java:23)
    at com.ibm.xml.xlxp2.jaxb.unmarshal.JAXB_Deserialization_Root_Stub.write(com.ibm.xml.xlxp2.jaxb.unmarshal.JAXB_Deserialization_Root_Stub.java)
    at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.DeserializationStub.end(DeserializationStub.java:151)
    at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.DeserializationContext.endComplexType(DeserializationContext.java:673)
    at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.DeserializationContext.handleEndElementEvent(DeserializationContext.java:384)
    at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.JAXBDocumentScanner.produceEndElementEvent(JAXBDocumentScanner.java:234)
    at com.ibm.xml.xlxp2.scan.DocumentScanner.scanEndElement(DocumentScanner.java:2590)
    at com.ibm.xml.xlxp2.scan.DocumentScanner.nextEvent(DocumentScanner.java:1289)
    at com.ibm.xml.xlxp2.scan.DocumentScanner.parseDocumentEntity(DocumentScanner.java:1168)
    at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.JAXBDocumentScanner.unmarshal(JAXBDocumentScanner.java:147)
    at com.ibm.xml.xlxp2.jaxb.unmarshal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:158)
    at com.ca.cib.zba.message.mt101.ZBAProcessingResultXMLTool.getZBAProcessingResult(ZBAProcessingResultXMLTool.java:52)
    at com.ca.cib.zba.message.mt101.listener.ListenerMT101.processMessage(ListenerMT101.java:80)
    at com.ca.cib.zba.message.mt101.listener.ListenerMT101.onMessage(ListenerMT101.java:65)
    at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)
    at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)
    at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:326)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:264)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1071)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1063)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:960)
    at java.lang.Thread.run(Thread.java:735)

它是ObjectFactory.createMatherUnmarshaller在 Websphere 应用程序服务器上运行时失败,而在独立测试中运行良好

@XmlElementDecl(namespace = "", name = "ZBAProcessingResult")
public JAXBElement<ZBAProcessingResult> createMatherUnmarshaller(ZBAProcessingResult zbaProcessingResult){
        return new JAXBElement<ZBAProcessingResult>(ZBAProcessingResult_QNAME, ZBAProcessingResult.class,null,zbaProcessingResult); 
    }
4

1 回答 1

0

找到的解决方案我使用了 ObjectFactory.java,它显然是邪恶的起源(在 Websphere Application Server 的世界中)。所以我切换到使用包含我的序列化类名称的 jaxb.in​​dex。我将代码更改为不使用 JAXBElement :

于 2012-11-22T13:14:37.460 回答