jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant schemagen task" Watch "ant schemagen task" New topic

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: 17417

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link: http://aspose.com/file-tools
subject: ant schemagen task
It's not a secret anymore!