[ 
https://issues.apache.org/jira/browse/CXF-8005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colm O hEigeartaigh resolved CXF-8005.
--------------------------------------
    Resolution: Not A Problem

> cxf-codegen-plugin - External DTD: Failed to read external DTD ‘.dtd’
> ---------------------------------------------------------------------
>
>                 Key: CXF-8005
>                 URL: https://issues.apache.org/jira/browse/CXF-8005
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Tsvetoslav
>            Assignee: Colm O hEigeartaigh
>            Priority: Blocker
>         Attachments: wsdl.zip
>
>
> Hello,
>  
> First I would like to mention that I'm using "Spring Boot CXF JAX-WS Starter" 
> for developing my web service. When I'd migrated my project dependencies to 
> the latest version - Apache-cxf(3.3.1) and Spring boot(2.1.3.RELEASE), the 
> Maven build system started to give me during the build this blocking error 
> "_Execution generate-sources of goal 
> org.apache.cxf:cxf-codegen-plugin:3.3.1:wsdl2java failed: 
> org.apache.ws.commons.schema.XmlSchemaException: External DTD: Failed to read 
> external DTD 'XMLSchema.dtd', because 'http' access is not allowed due to 
> restriction set by the accessExternalDTD property._" I've returned back to 
> the older/current version of dependencies Apache-cxf(3.2.7) and Spring 
> boot(1.5.17.RELEASE), the error has gone.
>  
> I've found a solution 
> [stackoverflow|[https://stackoverflow.com/a/23012746/7357959]] which I don't 
> prefer because it's applied directly in the jre and I need to look after it 
> when I create a new environment.
>  
> Based on your official 
> documentation[maven-cxf-codegen-plugin|[http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html]],
>  section "Other configuration options", I can apply the same configuration to 
> my JVM using cxf-codegen-plugin. I tried out this configuration:
> {code:java}
> <plugin>
>      <groupId>org.apache.cxf</groupId>
>      <artifactId>cxf-codegen-plugin</artifactId>
>      <version>${cxf.version}</version>
>      <configuration>
>          
> <additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
>      </configuration>
>      ......................{code}
> based on this example [External 
> DTD|https://programtalk.com/java/external-dtd-failed-restriction-accessexternaldtd/]
>  but unfortunately it doesn't work
> I will appreciate if somebody can take a look at the problem.
> Thank you in advance!
>  
> P.S. I tried different configuration option like:
>  
> {code:java}
> <configuration>
>     <fork>once</fork>
>     <additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
>     
> <additionalJvmArgs>-Djavax.xml.accessExternalSchema=all</additionalJvmArgs>
>  </configuration>{code}
>  
> ----
>  
> {code:java}
> <configuration>
>     <additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
>     
> <additionalJvmArgs>-Djavax.xml.accessExternalSchema=all</additionalJvmArgs>
>  </configuration>
> {code}
> but unfortunately neither of them was working
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to