This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes ant schemagen task Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant schemagen task" Watch "ant schemagen task" New topic
Author

ant schemagen task

Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
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

Joined: Jun 25, 2001
Posts: 15950
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ant schemagen task
 
Similar Threads
Facing problem to run JAXB in JDK- 1.6
java.lang.LinkageError in JAXB
error when building in ecllipse
java.lang.LinkageError in MyEclipse
Stupid Question: Where the heck can I download JAX-WS?