hyperjaxb に実際のスキーマを処理させようとしています。このリンクからhyperjaxb maven プロジェクトをダウンロードして解凍し、サンプル スキーマを使用してルート ディレクトリに移動し、実行しcmd.exe
てサンプル データでテストし、サンプルmvn clean install
スキーマで動作することを確認しました。次に、、、およびファイルを実際の図式の簡素化されたバージョンに置き換えてschema.xsd
、上記のリンク先の hyperjaxb プロジェクトを介して実際のアプリを実行する準備を整えることができます。それからまた走った。ただし、次のエラー メッセージが表示されます。 po.xml
bindings.xjb
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
読むことができる置換ファイルから。このリンクのファイルを
使用して、このリンクで読むことができます。 schema.xsd
po.xml
bindings.xjb の関連セクションは次のとおりです。
<jaxb:bindings node="xs:complexType[@name='Any']">
<hj:entity>
<orm:table name="any"/>
</hj:entity>
</jaxb:bindings>
ANY
schema.xsd の 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>
完全なコードは上記のリンクにあることに注意してください。 このエラーを解決するにはどうすればよいですか?