Error creating JAXB bindings

While creating some JAXB bindings from some XSD files I have I ran into an error like the following:

$ xjc -p foo.xsd -d out
[ERROR] The package name '' used for this schema is not a valid package name.

What is the cause of this error? That would be the keyword “import” in the package name. You just can’t use a reserved word in a package name no matter how much you really want to!

Further reading:

Tags: , , , , ,

Monday, March 5th, 2012 Java, Programming, XML

Leave a Reply


Comments are moderated due to spammers. Your comments will not appear until I review and approve them. If you left a question I will answer as best I can so be sure to check back.