英文:
Mule JaxB unmarshalling failingto parse the ArrayList
问题
抱歉,由于您要求只返回翻译好的部分,以下是您提供的内容的翻译:
我正在尝试一个使用xml-to-object-transformer>转换器在Mule3中将实际XML转换为Java对象的用例,而没有使用DW。我最终遇到了一个奇怪的问题,请检查是否有人可以帮助。
为了实现这个目标,
1. 使用XJC JAXB API生成了一个JAXB类。
2. 将该类设置为转换器中的别名类,以验证数据类型。
3. 使用上述别名进行xml-to-object-transformer转换。
**Mule的代码片段**
<mulexml:xml-to-object-transformer driverClass="com.thoughtworks.xstream.io.xml.Xpp3Driver" doc:name="XML to Object">
<mulexml:alias class="com.test.jaxb.model.Root" name="root" />
</mulexml:xml-to-object-transformer>
**XSD的代码片段**
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="customerDetails">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="customerDetail">
<xs:complexType>
<xs:sequence>
<xs:element name="customerName" type="xs:string" />
<xs:element name="customerId" type="xs:unsignedShort" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
**Root.Java的代码片段[由XJC生成]**
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerDetails"
})
@XmlRootElement(name = "root")
public class Root {
@XmlElement(required = true)
protected Root.CustomerDetails customerDetails;
public Root.CustomerDetails getCustomerDetails() {
return customerDetails;
}
public void setCustomerDetails(Root.CustomerDetails value) {
this.customerDetails = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerDetail"
})
public static class CustomerDetails {
@XmlElement(required = true)
protected List<Root.CustomerDetails.CustomerDetail> customerDetail;
public List<Root.CustomerDetails.CustomerDetail> getCustomerDetail() {
if (customerDetail == null) {
customerDetail = new ArrayList<Root.CustomerDetails.CustomerDetail>();
}
return this.customerDetail;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerName",
"customerId"
})
public static class CustomerDetail {
@XmlElement(required = true)
protected String customerName;
@XmlSchemaType(name = "unsignedShort")
protected int customerId;
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String value) {
this.customerName = value;
}
public int getCustomerId() {
return customerId;
}
public void setCustomerId(int value) {
this.customerId = value;
}
}
}
}
**测试消息**
<?xml version="1.0" encoding="UTF-8"?>
<root>
<customerDetails>
<customerDetail>
<customerName>TestUser1</customerName>
<customerId>123</customerId>
</customerDetail>
<customerDetail>
<customerName>TestUser2</customerName>
<customerId>321</customerId>
</customerDetail>
</customerDetails>
</root>
**预期输出**
Java对象
**但实际输出-接收错误**
---- 调试信息 ----
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : customerName
class : java.util.ArrayList
required-type : java.util.ArrayList
converter-type : com.thoughtworks.xstream.converters.collections.CollectionConverter
path : /root/customerDetails/customerDetail/customerName
line number : 5
class[1] : com.test.jaxb.model.Root$CustomerDetails
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[2] : com.test.jaxb.model.Root
version : 1.4.10
------------------------------- (com.thoughtworks.xstream.converters.ConversionException)
Payload : org.glassfish.grizzly.utils.BufferInputStream@74447578
Transformer : XmlToObject{this=47272cd3, name='XmlToObject', ignoreBadInput=false, returnClass=SimpleDataType{type=java.lang.Object, mimeType='*/*', encoding='null'}, sourceTypes=[SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}, SimpleDataType{type=[B, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.io.InputStream, mimeType='*/*', encoding='null'}, SimpleDataType{type=org.w3c.dom.Document
<details>
<summary>英文:</summary>
I am trying a usecase that the actual XML to be transformed as Java Object by using xml-to-object-transformer> transformer in Mule3., no DW. I ended up with a strange issue and pls chk if anyone can help.
To do that,
1. Generated a JAXB class using XJC JAXB API
2. Setting that class as alias class in the transformer to validate the data types
3. Do the xml-to-object-transformer with the above alias
**Code snippet of Mule**
<mulexml:xml-to-object-transformer driverClass="com.thoughtworks.xstream.io.xml.Xpp3Driver" doc:name="XML to Object">
<mulexml:alias class="com.test.jaxb.model.Root" name="root" />
</mulexml:xml-to-object-transformer>
**Code snippet of XSD**
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="customerDetails">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="customerDetail">
<xs:complexType>
<xs:sequence>
<xs:element name="customerName" type="xs:string" />
<xs:element name="customerId" type="xs:unsignedShort" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
**Code snippet of Root.Java [Generated by XJC]**
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerDetails"
})
@XmlRootElement(name = "root")
public class Root {
@XmlElement(required = true)
protected Root.CustomerDetails customerDetails;
public Root.CustomerDetails getCustomerDetails() {
return customerDetails;
}
public void setCustomerDetails(Root.CustomerDetails value) {
this.customerDetails = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerDetail"
})
public static class CustomerDetails {
@XmlElement(required = true)
protected List<Root.CustomerDetails.CustomerDetail> customerDetail;
public List<Root.CustomerDetails.CustomerDetail> getCustomerDetail() {
if (customerDetail == null) {
customerDetail = new ArrayList<Root.CustomerDetails.CustomerDetail>();
}
return this.customerDetail;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerName",
"customerId"
})
public static class CustomerDetail {
@XmlElement(required = true)
protected String customerName;
@XmlSchemaType(name = "unsignedShort")
protected int customerId;
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String value) {
this.customerName = value;
}
public int getCustomerId() {
return customerId;
}
public void setCustomerId(int value) {
this.customerId = value;
}
}
}
}
**Test Message**
<?xml version="1.0" encoding="UTF-8"?>
<root>
<customerDetails>
<customerDetail>
<customerName>TestUser1</customerName>
<customerId>123</customerId>
</customerDetail>
<customerDetail>
<customerName>TestUser2</customerName>
<customerId>321</customerId>
</customerDetail>
</customerDetails>
</root>
**Expected output**
Java object
**But Actual output - Error receiving**
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : customerName
class : java.util.ArrayList
required-type : java.util.ArrayList
converter-type : com.thoughtworks.xstream.converters.collections.CollectionConverter
path : /root/customerDetails/customerDetail/customerName
line number : 5
class[1] : com.test.jaxb.model.Root$CustomerDetails
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[2] : com.test.jaxb.model.Root
version : 1.4.10
------------------------------- (com.thoughtworks.xstream.converters.ConversionException)
Payload : org.glassfish.grizzly.utils.BufferInputStream@74447578
Transformer : XmlToObject{this=47272cd3, name='XmlToObject', ignoreBadInput=false, returnClass=SimpleDataType{type=java.lang.Object, mimeType='*/*', encoding='null'}, sourceTypes=[SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}, SimpleDataType{type=[B, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.io.InputStream, mimeType='*/*', encoding='null'}, SimpleDataType{type=org.w3c.dom.Document, mimeType='*/*', encoding='null'}, SimpleDataType{type=org.dom4j.Document, mimeType='*/*', encoding='null'}]}
Element : /poc-json2xml-testFlow/processors/0 @ poc-json2xml-dummy:poc-json2xml-dummy.xml:29 (XML to Object)
Element XML : <mulexml:xml-to-object-transformer driverClass="com.thoughtworks.xstream.io.xml.Xpp3Driver" doc:name="XML to Object">
<mulexml:alias class="com.test.jaxb.model.Root" name="root"></mulexml:alias>
</mulexml:xml-to-object-transformer>
--------------------------------------------------------------------------------
Root Exception stack trace:
com.thoughtworks.xstream.mapper.CannotResolveClassException: customerName
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:81)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:72)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:503)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:429)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:281)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1486)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1466)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1337)
at org.mule.module.xml.transformer.XmlToObject.transformMessage(XmlToObject.java:68)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:141)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:89)
at org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1642)
at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1545)
at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1519)
at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1511)
at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:114)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:111)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:110)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:111)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.construct.DynamicPipelineMessageProcessor.process(DynamicPipelineMessageProcessor.java:55)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:111)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.interceptor.AbstractEnvelopeInterceptor.processBlocking(AbstractEnvelopeInterceptor.java:59)
at org.mule.processor.AbstractRequestResponseMessageProcessor.process(AbstractRequestResponseMessageProcessor.java:48)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:111)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:52)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:111)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.processor.AbstractRequestResponseMessageProcessor.processBlocking(AbstractRequestResponseMessageProcessor.java:57)
at org.mule.processor.AbstractRequestResponseMessageProcessor.process(AbstractRequestResponseMessageProcessor.java:48)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:111)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:111)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.construct.AbstractPipeline$3.process(AbstractPipeline.java:232)
at org.mule.module.http.internal.listener.HttpMessageProcessorTemplate.routeEvent(HttpMessageProcessorTemplate.java:73)
at org.mule.execution.AsyncResponseFlowProcessingPhase$1.process(AsyncResponseFlowProcessingPhase.java:73)
at org.mule.execution.AsyncResponseFlowProcessingPhase$1.process(AsyncResponseFlowProcessingPhase.java:60)
at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:16)
at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:35)
at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:22)
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:30)
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:14)
at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:67)
at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:44)
at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:50)
at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:40)
at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:41)
at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:48)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:28)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:13)
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:110)
at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:59)
at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:36)
at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.process(PhaseExecutionEngine.java:114)
at org.mule.execution.PhaseExecutionEngine.process(PhaseExecutionEngine.java:41)
at org.mule.execution.MuleMessageProcessingManager.processMessage(MuleMessageProcessingManager.java:32)
at org.mule.module.http.internal.listener.DefaultHttpListener$1.handleRequest(DefaultHttpListener.java:135)
at org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:100)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:119)
at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:31)
at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:142)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
********************************************************************************
</details>
# 答案1
**得分**: 0
似乎问题出在您正在使用<mulexml:xml-to-object-transformer>转换器,它不知道如何处理JAXB处理。您应该尝试使用[JAXB转换器][1]。
对于旧版本的Mule,有一个类似的先前答案:https://stackoverflow.com/a/20243878/721855
[1]: https://docs.mulesoft.com/mule-runtime/3.9/jaxb-transformers
<details>
<summary>英文:</summary>
It looks like the problem is that you are using the <mulexml:xml-to-object-transformer> transformer, which doesn't know how to handle JAXB processing. You should try instead the [JAXB transformers][1].
There is a previous similar answer for an older version of Mule: https://stackoverflow.com/a/20243878/721855
[1]: https://docs.mulesoft.com/mule-runtime/3.9/jaxb-transformers
</details>
专注分享java语言的经验与见解,让所有开发者获益!
评论