我创建了一个流程,我在其中使用mulexml将jaxb对象转换为xml:jaxb-object-to-xml-transformer,我得到以下jaxb异常
[javax.xml.bind.JAXBException: class java.io.ByteArrayOutputStream nor any of its super class is known to this context.]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:254)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(Unknown Source)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:542)
以下是我的流程代码
<component doc:name="Java">
<method-entry-point-resolver>
<include-entry-point method="findJatoXmlByDate"/>
</method-entry-point-resolver>
<spring-object bean="jatoReadDAO">
</spring-object>
</component>
<logger message="after java ================ #[message.payload]" level="INFO" doc:name="Logger"/>
<collection-splitter doc:name="Collection Splitter"/>
<logger message="after splitting #[message.payload]" level="INFO" doc:name="Logger"/>
<mulexml:jaxb-object-to-xml-transformer name="ObjectToSmartxml" jaxbContext-ref="jatoJaxbContext"/>
<collection-aggregator failOnTimeout="true" doc:name="Collection Aggregator"/>
我试图将@xmlSeeAlso放在我的Jaxb类上,但我仍然得到相同的异常。 以下是我的jaxb类
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"commentOrAltCommentOrAtt"
})
@XmlRootElement(name = "JatuXML")
public class JATUXML {
答案 0 :(得分:0)
我已经解决了这个错误,我得到这个错误不是因为编组,这是因为收集拆分器,这里当我添加集合聚合器时,流程工作正常。