esa / CCSDS_MO_TRANS

REPOSITORY ARCHIVED - for the latest version please go to https://github.com/esa/mo-services-java
Other
3 stars 7 forks source link

Java 9 problem #43

Closed CesarCoelho closed 5 years ago

CesarCoelho commented 6 years ago

The Generic transport is having problems with Java 9.

Exception in thread "HeartbeatThread" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at esa.mo.mal.transport.gen.GENMessage.createMessageBody(GENMessage.java:302) at esa.mo.mal.transport.gen.GENMessage.(GENMessage.java:106) at esa.mo.mal.transport.tcpip.TCPIPMessage.(TCPIPMessage.java:58) at esa.mo.mal.transport.tcpip.TCPIPEndpoint.createMessage(TCPIPEndpoint.java:126) at esa.mo.mal.impl.MessageSend.createMessage(MessageSend.java:800) at esa.mo.mal.impl.MessageSend.initiateSynchronousInteraction(MessageSend.java:653) at esa.mo.mal.impl.MessageSend.publishRegister(MessageSend.java:94) at esa.mo.mal.impl.provider.MALPublisherImpl.register(MALPublisherImpl.java:118) at org.ccsds.moims.mo.mal.provider.MALPublisherSet.register(MALPublisherSet.java:121) at org.ccsds.moims.mo.softwaremanagement.heartbeat.provider.BeatPublisher.register(BeatPublisher.java:28) at esa.mo.sm.impl.provider.HeartbeatProviderServiceImpl.publishHeartbeat(HeartbeatProviderServiceImpl.java:148) at esa.mo.sm.impl.provider.HeartbeatProviderServiceImpl.access$100(HeartbeatProviderServiceImpl.java:58) at esa.mo.sm.impl.provider.HeartbeatProviderServiceImpl$1.run(HeartbeatProviderServiceImpl.java:119) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ... 15 more

Please check the following stackoverflow link for the fix: https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j

CesarCoelho commented 6 years ago

This problem can be bypassed with this fix: https://github.com/esa/CCSDS_MO_TRANS/pull/44

However, we will need to address the actual marshalling/unmarshalling of objects using Java 9 in a different fix!

SamCooper commented 6 years ago

I guess the longer term approach for this specific problem is to remove the inbuilt XML support and have proper MAL XML encoding support.

dmarszk commented 5 years ago

Fixed with #44 merge.

Note to myself - I will dig up the MAL XML implementation prototype we have and proceed towards open-sourcing and then merging it. The major issue we had with it was failing MAL-MAL Testbed. We still lack the manpower to really debug it, though.