执行codeGen时出现JiBX命名空间错误

时间:2018-11-14 17:43:40

标签: java xml jibx

我一直在尝试使用JiBX版本1.2.6和其他最新版本来执行JiBX codeGen,但是出现以下错误:


FATAL codegen.SchemaDocumentationGenerator - Error writing schema XML representation
org.jibx.runtime.JiBXException: Unknown namespace URI http://www.w3.org/2000/09/xmldsig#
        at org.jibx.runtime.QName.serialize(QName.java:328)
        at org.jibx.custom.classes.JiBX_class_customs_bindingMungeAdapter.JiBX_schema_extract_binding_marshalAttr_1_52()
        at org.jibx.custom.classes.JiBX_schema_extract_bindingElementElement_access.marshal()
        at org.jibx.schema.codegen.SchemaDocumentationGenerator$DocumentationVisitor.visit(SchemaDocumentationGenerator.java:487)
        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:99)
        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:109)
        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:385)
        at org.jibx.schema.codegen.SchemaDocumentationGenerator$DocumentationVisitor.visit(SchemaDocumentationGenerator.java:551)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:194)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.codegen.SchemaDocumentationGenerator.generate(SchemaDocumentationGenerator.java:338)
        at org.jibx.schema.codegen.ClassHolder.initClass(ClassHolder.java:679)
        at org.jibx.schema.codegen.StructureClassHolder.generate(StructureClassHolder.java:2111)
        at org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:210)
        at org.jibx.schema.codegen.ClassHolder.initClass(ClassHolder.java:697)
        at org.jibx.schema.codegen.StructureClassHolder.generate(StructureClassHolder.java:2111)
        at org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:210)
        at org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:227)
        at org.jibx.schema.codegen.CodeGen.buildDataModel(CodeGen.java:1572)
        at org.jibx.schema.codegen.CodeGen.generate(CodeGen.java:1781)
        at org.jibx.schema.codegen.CodeGen.main(CodeGen.java:2206)
Exception in thread "main" java.lang.IllegalStateException: Internal error - error writing schema XML representation: Unknown namespace URI http://www.w3.org/2000/09/xmldsig#
        at org.jibx.schema.codegen.SchemaDocumentationGenerator$DocumentationVisitor.visit(SchemaDocumentationGenerator.java:519)
        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:99)
        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:109)
        at org.jibx.schema.SchemaVisitor.visit(SchemaVisitor.java:385)
        at org.jibx.schema.codegen.SchemaDocumentationGenerator$DocumentationVisitor.visit(SchemaDocumentationGenerator.java:551)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:194)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.TreeWalker.walkChildren(TreeWalker.java:505)
        at org.jibx.schema.TreeWalker.walkElement(TreeWalker.java:303)
        at org.jibx.schema.codegen.SchemaDocumentationGenerator.generate(SchemaDocumentationGenerator.java:338)
        at org.jibx.schema.codegen.ClassHolder.initClass(ClassHolder.java:679)
        at org.jibx.schema.codegen.StructureClassHolder.generate(StructureClassHolder.java:2111)
        at org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:210)
        at org.jibx.schema.codegen.ClassHolder.initClass(ClassHolder.java:697)
        at org.jibx.schema.codegen.StructureClassHolder.generate(StructureClassHolder.java:2111)
        at org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:210)
        at org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:227)
        at org.jibx.schema.codegen.CodeGen.buildDataModel(CodeGen.java:1572)
        at org.jibx.schema.codegen.CodeGen.generate(CodeGen.java:1781)
        at org.jibx.schema.codegen.CodeGen.main(CodeGen.java:2206)

我一直在运行的命令是:

java -cp F:\jibx_1_2_6\jibx\lib\jibx-tools.jar org.jibx.schema.codegen.CodeGen -b "UBL-DespatchAdvice-2.1.xml" -p "com.neogrid.despatchadvice.xml" -t F:\FacturaPeru\Tarefa\src_DespatchAdvice -w F:\FacturaPeru\Tarefa\maindoc\UBL-DespatchAdvice-2.1.xsd

根据错误,由于名称空间http://www.w3.org/2000/09/xmldsig#

,问题正在发生

请帮助我解决这个问题?

0 个答案:

没有答案