无法在jaxb-xjc-2.2.5-2.jar中解析名称'xjc:globalJavaType' [英] Cannot resolve the name 'xjc:globalJavaType' in jaxb-xjc-2.2.5-2.jar

查看:155
本文介绍了无法在jaxb-xjc-2.2.5-2.jar中解析名称'xjc:globalJavaType'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Maven项目,转移到另一台PC后出错。为什么?

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)
    ... 


推荐答案

我遇到了类似的问题。在我的情况下,本地maven存储库的路径包含西里尔符号。

我更改了我的settings.xml并将< localRepository>元素那里只用拉丁符号指定新的存储库路径。这对我有用。

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.

这篇关于无法在jaxb-xjc-2.2.5-2.jar中解析名称'xjc:globalJavaType'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆