[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] jaxb-compiler failed when generating binding for xmldsig-core-schema.xsd

Got it, thank you Blaise

On Thu, Nov 29, 2012 at 4:08 PM, Blaise Doughan <blaise.doughan@xxxxxxxxxx> wrote:
Hi David,

Based on the stack trace it appears to be the same problem that you encountered before:


Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
    at java.lang.Class.getDeclaredMethod(Class.java:1954)
    at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:107)
    ... 14 more


-Blaise


On 12-11-29 3:55 PM, Chun Tat David Chu wrote:
Hi MOXy Users,

I am trying to generate bindings for the oval-variables-schema.xsd which is a standard defined by MITRE.
http://oval.mitre.org/language/version5.8/ovalvar/complete/oval-variables-schema.xsd

oval-variables-schema.xsd imports xmldsig-core-schema.xsd and that is defined by the W3 org.
http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd

When I ran jaxb-compiler.sh with xmldsig-core-schema.xsd, I hit a JAVA exception.

parsing a schema...
compiling a schema...
[INFO] generating code
unknown location

Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
    at $Proxy10.required(Unknown Source)
    at com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReference(AbstractField.java:197)
    at com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:156)
    at com.sun.tools.xjc.generator.bean.field.AbstractListField.generate(AbstractListField.java:124)
    at com.sun.tools.xjc.generator.bean.field.UntypedListField.<init>(UntypedListField.java:107)
    at com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer.generate(UntypedListFieldRenderer.java:72)
    at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:79)
    at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:747)
    at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:535)
    at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:235)
    at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:175)
    at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
    at com.sun.tools.xjc.Driver.run(Driver.java:343)
    at org.eclipse.persistence.jaxb.xjc.MOXyXJC.main(MOXyXJC.java:48)
Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
    at java.lang.Class.getDeclaredMethod(Class.java:1954)
    at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:107)
    ... 14 more

I am currently using
xjc version "hudson-jaxb-ri-2.2-147"
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build hudson-jaxb-ri-2.2-147)

Is this another possible bug with the MOXy jaxb compiler?  Running xjc that bundles with JAVA SDK does work.

Thanks,

David


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users