【发布时间】:2014-10-16 17:12:56
【问题描述】:
我正在尝试让 hyperjaxb 处理真实的模式。我下载并解压缩了 hyperjaxb maven 项目from this link,然后使用cmd.exe 导航到根目录,并通过运行mvn clean install 使用示例数据对其进行测试,以确保它与示例模式一起使用。然后,我将schema.xsd、po.xml 和bindings.xjb 文件替换为实际图形的精简版本,以便我可以准备通过上面链接的hyperjaxb 项目运行真正的应用程序。然后我再次运行mvn clean install。但是,我收到以下错误消息:
[ERROR] Error while parsing schema(s).Location
[ file:/C:/path/to/src/main/resources/bindings.xjb{25,53}].
com.sun.istack.SAXParseException2; systemId:
file:/C:/path/to/src/main/resources/bindings.xjb; lineNumber: 25; columnNumber: 53;
XPath evaluation of "xs:complexType[@name='Any']" results in empty target node
从替换的bindings.xjb 文件中可以读取at this link.
使用schema.xsd 文件at this link 和您可以阅读的po.xml at this link。
bindings.xjb的相关部分是:
<jaxb:bindings node="xs:complexType[@name='Any']">
<hj:entity>
<orm:table name="any"/>
</hj:entity>
</jaxb:bindings>
schema.xsd 中ANY complexType 的定义为:
<xs:complexType name="ANY"><!-- abstract="true">-->
<xs:annotation>
<xs:documentation>
Some documentation.
</xs:documentation>
</xs:annotation>
<xs:attribute name="nullFlavor" type="NullFlavor" use="optional">
<xs:annotation>
<xs:documentation>
Some other documentation.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
请注意,完整的代码在上面的链接中。 如何解决此错误?
【问题讨论】:
标签: xml maven jaxb xsd hyperjaxb