I have a marshalled data packet from the ActiveMQ connection. When I deceive the message my unmarshalling method should unmarshall the message to ite appropriate class object. I have the follwing message in the console of the Eclipse Indego.
Exception in thread "ActiveMQ Session Task-87" java.lang.IllegalAccessError: com/sun/xml/bind/v2/runtime/reflect/opt/Const
at weathergenerated.IMaritimeWeatherStationInformation$JaxbAccessorF_visibilityDistance.set(FieldAccessor_Integer.java:59)
at com.sun.xml.bind.v2.runtime.reflect.Accessor.receive(Accessor.java:171)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.endElement(UnmarshallingContext.java:486)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.endElement(SAXConnector.java:145)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source)
at maincontrol.Jaxb.unmarshal(Jaxb.java:156)
at weathercontrol.WeatherInformationFactory.unMarshalling(WeatherInformationFactory.java:37)
at weathercontrol.CommandSubscriberWeather.onMessage(CommandSubscriberWeather.java:100)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1230)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I can see the the message at its XML format but unmarshalling is failing.My JAXB init function is as follows
public final void initJaxb()
{
Map<String, String> xsdMapping = new HashMap<String, String>();
xsdMapping.put("IMaritimeWeatherInformation", "MaritimeWeatherInformation.xsd");
this.jaxb_weather = new Jaxb(GENERATED_PACKAGE, SCHEMAS_PATH, xsdMapping);
}
I have my appropriate xsd files and generated classes in the project directory.
Let me know whats happening.