添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am trying to generate Java classes using Maven from XSDs/WSDLs. I have declared all the XSDs in my POM file and using the XJC plugin. When I try to do a clean install, I see these two error messages show up.

[DEBUG] [SchemaGen]: May 02, 2019 5:49:09 PM com.sun.xml.bind.v2.util.XmlFactory allowExternalAccess
CONFIG: Property "http://javax.xml.XMLConstants/property/accessExternalSchema" is not supported by used JAXP implementation.
org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
        at org.apache.xerces.jaxp.validation.XMLSchemaFactory.setProperty(Unknown Source)
        at com.sun.xml.bind.v2.util.XmlFactory.allowExternalAccess(XmlFactory.java:236)
        at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:87)
[DEBUG] [SchemaGen]: May 02, 2019 5:49:09 PM com.sun.xml.bind.v2.util.XmlFactory allowExternalDTDAccess
CONFIG: Property "http://javax.xml.XMLConstants/property/accessExternalDTD" is not supported by used JAXP implementation.
org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
        at org.apache.xerces.jaxp.validation.XMLSchemaFactory.setProperty(Unknown Source)
        at com.sun.xml.bind.v2.util.XmlFactory.allowExternalDTDAccess(XmlFactory.java:267)
        at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:110)

I did all the necessary changes in the jaxp.propterties file in my JRE/lib folder. This is the content of the property file. I have stored it in C:\Program Files\Java\jdk1.8.0_181\jre\lib. That is what maven is using.

javax.xml.accessExternalSchema=all
javax.xml.accessExternalDTD=all

Is this actually an error or can be ignored?

Are you behind some firewall or need a proxy ? Can you call the urls from the browser or curl them ? – Stefan Höltker May 2, 2019 at 12:33 Yes i have the proxy setup in the settings.xml, the usual way. Sorry cant paste it here as it says too long. – hell_storm2004 May 2, 2019 at 13:42 Do you got a multi module project? Maybe the jaxb plugin is corrupt removing the proxy settings as explained here github.com/mojohaus/jaxb2-maven-plugin/issues/60 ? – Stefan Höltker May 2, 2019 at 14:22

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.