NoClassDefFoundError: javax/xml/bind/MarshalException

41 views
Skip to first unread message

Rudolf Polzer

unread,
Jul 5, 2024, 6:40:55 AMJul 5
to ZUGFeRD
Hello,

I am new to Mustang and try to set up an Eclipse Java project to write ZUGFeRD pdf files.
I get this runtime error  - what am I missing? The referenced library activation-1.1.1.jar which I used besides mustang1.5.1.jar might be wrong?

Rudolf

Rudolf Polzer

unread,
Jul 8, 2024, 11:09:16 AMJul 8
to ZUGFeRD
For a try, I changed the referenced libraries to

mustang-1.5.1.jar

jaxb-api-2.4.0-b180830.0359.jar

javax.activation-api-1.2.0.jar


then I get the following runtime error:


Exception in thread "main" java.lang.ExceptionInInitializerError

at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:81)

at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:179)

at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:285)

at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.<init>(TransducedAccessor.java:235)

at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor.get(TransducedAccessor.java:175)

at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.calcTransducer(RuntimeClassInfoImpl.java:245)

at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getTransducer(RuntimeClassInfoImpl.java:219)

at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.link(RuntimeClassInfoImpl.java:196)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.link(ModelBuilder.java:454)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.link(RuntimeModelBuilder.java:133)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:458)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:292)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:139)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1138)

at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:162)

at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:286)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:186)

at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146)

at javax.xml.bind.ContextFinder.find(ContextFinder.java:350)

at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446)

at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409)

at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:313)

at org.mustangproject.ZUGFeRD.ZUGFeRD1PullProvider.<init>(ZUGFeRD1PullProvider.java:34)

at org.mustangproject.ZUGFeRD.ZUGFeRDExporter.setZUGFeRDVersion(ZUGFeRDExporter.java:141)

at org.mustangproject.ZUGFeRD.ZUGFeRDExporter.init(ZUGFeRDExporter.java:157)

at org.mustangproject.ZUGFeRD.ZUGFeRDExporter.<init>(ZUGFeRDExporter.java:105)

at org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3Factory.load(ZUGFeRDExporterFromA3Factory.java:41)

at MustangWriter.apply(MustangWriter.java:227)

at MustangWriter.main(MustangWriter.java:240)

jochen...@gmail.com

unread,
Jul 17, 2024, 11:53:20 AM (10 days ago) Jul 17
to ZUGFeRD

Hello,

please try version 2.11.0 https://www.mustangproject.org/use/#JAR
and I assume you are missing jars, unfortunately I have no list which ones. 
All I can say is that additionally to the mentioned library-2.11.0.jar in /deploy/ there is also a library-2.11.0-shaded.jar with all dependencies included.

Hope that helps

kind regards
Jochen

Rudolf Polzer

unread,
Jul 18, 2024, 5:30:46 AM (9 days ago) Jul 18
to ZUGFeRD
Thank you, this looks better now. I am using
mustang-1.5.1.jar
library-2.11.0-shaded.jar
as external libraries
(@Jochen: please fix the two links to the second library on your page https://www.mustangproject.org/use/#JAR - they point to the non-shaded file)
But there still remains an error, some value is not allowed to be null:

Exception in thread "main" java.lang.IllegalArgumentException: Value given is not allowed for the Text type : 'null'

at org.apache.xmpbox.type.TextType.setValue(TextType.java:68)

at org.apache.xmpbox.type.AbstractSimpleProperty.<init>(AbstractSimpleProperty.java:59)

at org.apache.xmpbox.type.TextType.<init>(TextType.java:53)

at org.apache.xmpbox.type.TypeMapping.createText(TypeMapping.java:404)

at org.apache.xmpbox.type.AbstractStructuredType.createTextType(AbstractStructuredType.java:155)

at org.apache.xmpbox.schema.XMPSchema.addUnqualifiedSequenceValue(XMPSchema.java:790)

at org.apache.xmpbox.schema.DublinCoreSchema.addCreator(DublinCoreSchema.java:160)

at org.mustangproject.ZUGFeRD.ZUGFeRDExporter.prepareDocument(ZUGFeRDExporter.java:519)

at org.mustangproject.ZUGFeRD.ZUGFeRDExporter.PDFattachZugferdFile(ZUGFeRDExporter.java:297)

at MustangWriter.apply(MustangWriter.java:229)

at MustangWriter.main(MustangWriter.java:240)


Regards,

Rudolf


Rudolf Polzer

unread,
Jul 23, 2024, 1:37:26 PM (4 days ago) Jul 23
to ZUGFeRD
Reply all
Reply to author
Forward
0 new messages