Hi I am getting the following error when i try to marshal the incoming pojo
My camel-context is like this

<camelContext xmlns="http://camel.apache.org/schema/spring";>
<dataFormats>
                        <jaxb id="input" prettyPrint="true"
contextPath="abcd.pi.mes.id59.powerconsumption"/>
                                 
partClass="abcd.pi.mes.id59.powerconsumption.DTPowerConsumption"  
                                

</dataFormats>
   
<route id="MES_to_InboundQUEUE">
        <from uri="cxf:bean:PowerConsumptionEndpoint"/>
        <marshal ref="input"/>
        <to uri="activemq:queue:EC_InboundQueue"/>
</route>

*The bean class is*


package abcd.pi.mes.id59.powerconsumption;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;


/**
 * <p>Java class for DT_PowerConsumption complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained
within this class.
 * 
 * <pre>
 * &lt;complexType name="DT_PowerConsumption">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
 *       &lt;sequence>
 *         &lt;element name="Details" maxOccurs="unbounded" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction
base="{http://www.w3.org/2001/XMLSchema}anyType";>
 *                 &lt;sequence>
 *                   &lt;element name="Date_Time"
type="{http://www.w3.org/2001/XMLSchema}dateTime"; minOccurs="0"/>
 *                   &lt;element name="Plant_ID"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
 *                   &lt;element name="Plant_Name"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
 *                   &lt;element name="Power_consumed"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
 *                   &lt;element name="Units"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
 *                   &lt;element name="TargetValue"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
 *                   &lt;element name="PlannedValue"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
 *                   &lt;element name="Sys_DateTime"
type="{http://www.w3.org/2001/XMLSchema}dateTime"; minOccurs="0"/>
 *                   &lt;element name="Updatedby"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DT_PowerConsumption", propOrder = {
    "details"
})
@XmlRootElement
*public class DTPowerConsumption {*

    @XmlElement(name = "Details")
    protected List<DTPowerConsumption.Details> details;

    /**
     * Gets the value of the details property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the details
property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getDetails().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link DTPowerConsumption.Details }
     * 
     * 
     */
    public List<DTPowerConsumption.Details> getDetails() {
        if (details == null) {
            details = new ArrayList<DTPowerConsumption.Details>();
        }
        return this.details;
    }


    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content
contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
     *       &lt;sequence>
     *         &lt;element name="Date_Time"
type="{http://www.w3.org/2001/XMLSchema}dateTime"; minOccurs="0"/>
     *         &lt;element name="Plant_ID"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
     *         &lt;element name="Plant_Name"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
     *         &lt;element name="Power_consumed"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
     *         &lt;element name="Units"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
     *         &lt;element name="TargetValue"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
     *         &lt;element name="PlannedValue"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
     *         &lt;element name="Sys_DateTime"
type="{http://www.w3.org/2001/XMLSchema}dateTime"; minOccurs="0"/>
     *         &lt;element name="Updatedby"
type="{http://www.w3.org/2001/XMLSchema}string"; minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "dateTime",
        "plantID",
        "plantName",
        "powerConsumed",
        "units",
        "targetValue",
        "plannedValue",
        "sysDateTime",
        "updatedby"
    })
*    public static class Details {*

        @XmlElement(name = "Date_Time")
        @XmlSchemaType(name = "dateTime")
        protected XMLGregorianCalendar dateTime;
        @XmlElement(name = "Plant_ID")
        protected String plantID;
        @XmlElement(name = "Plant_Name")
        protected String plantName;
        @XmlElement(name = "Power_consumed")
        protected String powerConsumed;
        @XmlElement(name = "Units")
        protected String units;
        @XmlElement(name = "TargetValue")
        protected String targetValue;
        @XmlElement(name = "PlannedValue")
        protected String plannedValue;
        @XmlElement(name = "Sys_DateTime")
        @XmlSchemaType(name = "dateTime")
        protected XMLGregorianCalendar sysDateTime;
        @XmlElement(name = "Updatedby")
        protected String updatedby;

        /**
         * Gets the value of the dateTime property.
         * 
         * @return
         *     possible object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public XMLGregorianCalendar getDateTime() {
            return dateTime;
        }

        /**
         * Sets the value of the dateTime property.
         * 
         * @param value
         *     allowed object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public void setDateTime(XMLGregorianCalendar value) {
            this.dateTime = value;
        }

        /**
         * Gets the value of the plantID property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getPlantID() {
            return plantID;
        }

        /**
         * Sets the value of the plantID property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setPlantID(String value) {
            this.plantID = value;
        }

        /**
         * Gets the value of the plantName property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getPlantName() {
            return plantName;
        }

        /**
         * Sets the value of the plantName property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setPlantName(String value) {
            this.plantName = value;
        }

        /**
         * Gets the value of the powerConsumed property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getPowerConsumed() {
            return powerConsumed;
        }

        /**
         * Sets the value of the powerConsumed property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setPowerConsumed(String value) {
            this.powerConsumed = value;
        }

        /**
         * Gets the value of the units property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getUnits() {
            return units;
        }

        /**
         * Sets the value of the units property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setUnits(String value) {
            this.units = value;
        }

        /**
         * Gets the value of the targetValue property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getTargetValue() {
            return targetValue;
        }

        /**
         * Sets the value of the targetValue property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setTargetValue(String value) {
            this.targetValue = value;
        }

        /**
         * Gets the value of the plannedValue property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getPlannedValue() {
            return plannedValue;
        }

        /**
         * Sets the value of the plannedValue property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setPlannedValue(String value) {
            this.plannedValue = value;
        }

        /**
         * Gets the value of the sysDateTime property.
         * 
         * @return
         *     possible object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public XMLGregorianCalendar getSysDateTime() {
            return sysDateTime;
        }

        /**
         * Sets the value of the sysDateTime property.
         * 
         * @param value
         *     allowed object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public void setSysDateTime(XMLGregorianCalendar value) {
            this.sysDateTime = value;
        }

        /**
         * Gets the value of the updatedby property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getUpdatedby() {
            return updatedby;
        }

        /**
         * Sets the value of the updatedby property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setUpdatedby(String value) {
            this.updatedby = value;
        }

    }

}


*The error is like dis*
    
16:39:19,928 | ERROR | ault-workqueue-4 | DefaultErrorHandler              |
147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Failed delivery for
(MessageId: ID-es0sreao-52594-1379408379729-12-7 on ExchangeId:
ID-es0sreao-52594-1379408379729-12-8). Exhausted after delivery attempt: 1
caught: java.io.IOException: javax.xml.bind.JAXBException: class
org.apache.cxf.message.MessageContentsList nor any of its super class is
known to this context.
java.io.IOException: javax.xml.bind.JAXBException: class
org.apache.cxf.message.MessageContentsList nor any of its super class is
known to this context.
        at
org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:103)[236:org.apache.camel.camel-jaxb:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:59)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.fabric.FabricTraceProcessor.process(FabricTraceProcessor.java:81)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
        at
org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(CxfConsumer.java:125)[211:org.apache.camel.camel-cxf:2.10.0.fuse-71-047]
        at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75)[211:org.apache.camel.camel-cxf:2.10.0.fuse-71-047]
        at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)[:1.6.0_45]
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown 
Source)[:1.6.0_45]
        at java.util.concurrent.FutureTask.run(Unknown Source)[:1.6.0_45]
        at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at
org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:231)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at
org.apache.cxf.interceptor.OneWayProcessorInterceptor$1.run(OneWayProcessorInterceptor.java:144)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:426)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)[:1.6.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)[:1.6.0_45]
        at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:351)[169:org.apache.cxf.cxf-api:2.6.0.fuse-71-047]
        at java.lang.Thread.run(Unknown Source)[:1.6.0_45]
Caused by: javax.xml.bind.JAXBException: class
org.apache.cxf.message.MessageContentsList nor any of its super class is
known to this context.
        at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:594)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
        at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:482)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:315)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:244)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
        at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:74)[:2.0.0.fuse-71-047]
        at
org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:120)[236:org.apache.camel.camel-jaxb:2.10.0.fuse-71-047]
        at
org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:100)[236:org.apache.camel.camel-jaxb:2.10.0.fuse-71-047]
        ... 51 more

Kindly help me in resolving the issue
thanks




--
View this message in context: 
http://camel.465427.n5.nabble.com/Marshalling-getting-the-error-javax-xml-bind-JAXBException-class-org-apache-cxf-message-MessageConte-tp5739668.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to