NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

JAXB binding from NB 6.7 - 6.8 m1 jdk1.6.0_16

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
RIMartin7



Joined: 21 Aug 2009
Posts: 4

PostPosted: Sat Aug 22, 2009 12:05 am    Post subject: JAXB binding from NB 6.7 - 6.8 m1 jdk1.6.0_16 Reply with quote

Working with jdk1.6.0_16, NB 6.7 - 6.8 m1 and attempting to generate a Java binding for HDF5-File.xsd (http://www.hdfgroup.org/DTDs/HDF5-File.xsd)

Not sure if the 'required' method is coming or going. Looking in the jars under ide11 shows it not there as well as jaxb-ri-20090410 version. I've tried putting the jaxb-api.jar in the jdk1.6.0_16/jre/lib/ext but nothing gets past jdk1.6 having its own jaxb version.

What am I missing?

Code:
xjc-typedef-target:
jaxb-code-generation:
Compiling file:/C:/NeuralWorks/Development/SMOC/xml-resources/jaxb/HDF5/HDF5-File.xsd
java.lang.reflect.UndeclaredThrowableException
        at $Proxy78.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.XJC2Task._doXJC(XJC2Task.java:494)
        at com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:434)
        at com.sun.tools.xjc.XJC2Task.execute(XJC2Task.java:369)
        at com.sun.istack.tools.ProtectedTask.execute(ProtectedTask.java:55)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
        at java.lang.Class.getDeclaredMethod(Class.java:1937)
        at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:107)
        ... 31 more
BUILD FAILED (total time: 1 second)
Back to top
RIMartin7



Joined: 21 Aug 2009
Posts: 4

PostPosted: Sun Aug 23, 2009 4:03 am    Post subject: Reply with quote

Ah! Should be endorsed instead of ext. If JDK_HOME/jre/lib/endorsed doesn't exist, create the endorsed folder and put 2.2 jaxb-api.jar in it. Then NB's use of jaxb succeeds.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo