users@jaxb.java.net

strange error message when using XJC (via the Maven 2 plugin) to generate POJOs for XMPP

From: James Strachan <james.strachan_at_gmail.com>
Date: Mon, 23 Oct 2006 13:27:01 +0100

As an experiment I started a little maven project to try use JAXB's
XJC to auto-create the POJOs for working with the XMPP protocol...

https://svn.apache.org/repos/asf/incubator/activemq/sandbox/activemq-xmpp/

I had to tweak the schemas a little as quite a few of the schemas at
http://xmpp.org/schemas/ seem invalid.

I've got most of the errors licked now I think, but I get the
following errors which I can't make head nor tail of.

I just wondered if anyone else could figure out what the problem is?
The XSDs all seem valid from IDEA at least :) Whats particularly
confusing is I can't find 'MessageOrPresenceOrIq' in any of the XSDs.

Generating POJOs for XMPP could be a nice little example for folks
(particularly now JAXB2 RI can deal with the 'never ending xml
document' style of XML used in XMPP.


INFO] ----------------------------------------------------------------------------
[INFO] Building ActiveMQ :: XMPP
[INFO] task-segment: [install]
[INFO] ----------------------------------------------------------------------------
[INFO] [jaxb2:generate {execution: default}]
[ERROR] XJC while parsing schema(s)
file:/workspace/eclipse/activemq-sandbox/activemq-xmpp/src/main/resources/streams.xsd[30,40]:
com.sun.istack.SAXParseException2: Property "Any" is already defined.
[ERROR] XJC while parsing schema(s)
file:/workspace/eclipse/activemq-sandbox/activemq-xmpp/src/main/resources/streams.xsd[33,40]:
com.sun.istack.SAXParseException2: The following location is relevant
to the above error
[ERROR] XJC while parsing schema(s)
file:/workspace/eclipse/activemq-sandbox/activemq-xmpp/src/main/resources/streams.xsd[35,58]:
com.sun.istack.SAXParseException2: Property "MessageOrPresenceOrIq" is
already defined.
[ERROR] XJC while parsing schema(s)
file:/workspace/eclipse/activemq-sandbox/activemq-xmpp/src/main/resources/streams.xsd[40,58]:
com.sun.istack.SAXParseException2: The following location is relevant
to the above error


FWIW turning on debugging / verbose on the XJC plugin didn't reveal
any more information.

-- 
James
-------
http://radio.weblogs.com/0112098/