Reputation: 148
Maven project, after transfer to another PC gives error. Why?
[INFO] [jaxb2:generate {execution: default-cli}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.xml.sax.SAXParseException; systemId: jar:file:/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.2.5-2/jaxb-xjc-2.2.5-2.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 86; columnNumber: 48; src-resolve: Cannot resolve the name 'xjc:globalJavaType' to a(n) 'group' component.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: jar:file:/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.2.5-2/jaxb-xjc-2.2.5-2.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 86; columnNumber: 48; src-resolve: Cannot resolve the name 'xjc:globalJavaType' to a(n) 'group' component.
at com.sun.tools.xjc.SchemaCache.newValidator(SchemaCache.java:78)
at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1$1.startElement(AnnotationParserFactoryImpl.java:118)
at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:253)
...
Upvotes: 7
Views: 6040
Reputation: 1
I have a Apple MAC so default Maven repository is located in ../../ ∫.m2 /repository
The character ∫
(note the spaces) is problem for jaxb-xjc.
Changing the repository to ../../.m2/repository
solved it for me.
Upvotes: 0
Reputation: 11
Well, I found the solution. (based on http://docs.oracle.com/javase/7/docs/api/javax/xml/XMLConstants.html#ACCESS_EXTERNAL_SCHEMA)
Create a file named jaxp.properties (if it doesn't exist) under /path/to/jdk1.8.0/jre/lib and then write this line in it:
javax.xml.accessExternalSchema = all That's all. Enjoy JDK 8.
Upvotes: 1
Reputation: 49
I also had a similar issue. As it turned out, windows user home path contained a character with accent, caused an error. It was: c:\Users\Géza.m2 We changed to other user, everything was good.
Upvotes: 3
Reputation: 246
I had the similar problem. In my case path to local maven repository contained cyrillic symbols.
I changed my settings.xml and put <localRepository> element there to specify new repository path with latin symbols only. And that worked for me.
Upvotes: 22