This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ant schemagen task

 
Ra Carter
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm playing with jaxb today and now i cant seem to get schemagen task to generate a schema for me. i am using java 6 and ant through eclipse and at some point i found some jar files to build the ant task but now it gives me this error:

[echo] Generating schemas...
[schemagen] Generating schema from 5 source files
[schemagen] Problem encountered during annotation processing;
[schemagen] see stacktrace below for more information.
[schemagen] java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Users/phreakzilla/Workspace/eclipse/eclipse3.3/Java%20XML%20Sandbox/build/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
[schemagen] at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:135)
[schemagen] at com.sun.tools.xjc.api.impl.j2s.JavaCompilerImpl.bind(JavaCompilerImpl.java:39)
[schemagen] at com.sun.tools.jxc.apt.SchemaGenerator$1.process(SchemaGenerator.java:79)


I think i just need to get jaxb-impl jar for jaxb 2.0 but i have no idea where to find it. any ideas?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, according to your stack trace, you already have a jaxb-impl.jar in C:\Users\phreakzilla\Workspace\eclipse\eclipse3.3\Java XML Sandbox\build. The problem is, that location isn't blessed as a properly secure loading location. Since the stack trace also mentions a URL on how to fix the problem, I recommend going to that location and reading what it says to do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic