java模式类生成失败(xmlbeans/ant)

yv5phkfx  于 2021-06-26  发布在  Java
关注(0)|答案(0)|浏览(249)

我试图从两个xsd生成几个xmlbean类。我为此写了一个任务。但在执行时,我得到以下错误:

[xmlbean] Time to build schema type system: 1.203 seconds
  [xmlbean] Time to generate code: 1.014 seconds
  [xmlbean] Since compiler setting isn't classic or modern,ignoring fork setting.
  [xmlbean] Compiling 88 source files to C:\Users\sm187t\AppData\Local\Temp\xbean4071303235806930365.d\classes
  [xmlbean] Since compiler setting isn't classic or modern,ignoring fork setting.
  [xmlbean] C:\Users\smUSRT\AppData\Local\Temp\xbean4071303235806930365.d\src\com\rbr\logicalprovisioning\dcs\xml\deltaCalculationTable\BooleanCondition.java:215: error: no suitable method found for parse(XMLInputStream,SchemaType,<null>)
  [xmlbean]           return (com.rbr.logicalprovisioning.dcs.xml.deltaCalculationTable.BooleanCondition) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
  [xmlbean]                                                                                                                                                  ^
  [xmlbean]     method SchemaTypeLoader.parse(String,SchemaType,XmlOptions) is not applicable
  [xmlbean]       (argument mismatch; XMLInputStream cannot be converted to String)
  [xmlbean]     method SchemaTypeLoader.parse(File,SchemaType,XmlOptions) is not applicable
  [xmlbean]       (argument mismatch; XMLInputStream cannot be converted to File)
  [xmlbean]     method SchemaTypeLoader.parse(URL,SchemaType,XmlOptions) is not applicable
  [xmlbean]       (argument mismatch; XMLInputStream cannot be converted to URL)
  [xmlbean]     method SchemaTypeLoader.parse(InputStream,SchemaType,XmlOptions) is not applicable
  [xmlbean]       (argument mismatch; XMLInputStream cannot be converted to InputStream)
  [xmlbean]     method SchemaTypeLoader.parse(XMLStreamReader,SchemaType,XmlOptions) is not applicable
  [xmlbean]       (argument mismatch; XMLInputStream cannot be converted to XMLStreamReader)
  [xmlbean]     method SchemaTypeLoader.parse(Reader,SchemaType,XmlOptions) is not applicable
  [xmlbean]       (argument mismatch; XMLInputStream cannot be converted to Reader)
  [xmlbean]     method SchemaTypeLoader.parse(Node,SchemaType,XmlOptions) is not applicable
  [xmlbean]       (argument mismatch; XMLInputStream cannot be converted to Node)

我在类路径中有这些jar:

<path id="xmlbeans.classpath">
    <fileset dir="${third.party.dir}/lib/">
        <include name="xmlbeans-4.0.0.jar" />
        <include name="xmlbeans-xmlpublic-2.6.0.jar" />
        <!--include name="xmlbeans-2.6.0.jar" /-->
        <include name="jsr173_1.0_api.jar" />
    </fileset>
</path>

当我移除 xmlbeans-4.0.0.jar 以及 xmlbeans-xmlpublic-2.6.0.jar 并用 xmlbeans-2.6.0.jar ,它就像一个魅力,但最新版本,我得到这个错误。这里有我丢失的jar还是已知的虫子?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题