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

Tsvetoslav updated CXF-8005:
----------------------------
    Description: 
Hello,

 

I've migrated my project dependencies to the latest version - Apache-cxf(3.3.1) 
and Spring boot(2.1.3.RELEASE), my Maven build system has started to give me 
this 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._" When I've returned back to 
the older 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 configure my JVM to do the same 
as above 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

 

  was:
I've migrated my project dependencies to the latest version - Apache-cxf(3.3.1) 
and Spring boot(2.1.3.RELEASE), my Maven build system has started to give me 
this 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._" When I've returned back to 
the older 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 configure my JVM to do the same 
as above 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

 


> 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
>            Priority: Blocker
>
> Hello,
>  
> I've migrated my project dependencies to the latest version - 
> Apache-cxf(3.3.1) and Spring boot(2.1.3.RELEASE), my Maven build system has 
> started to give me this 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._" When I've returned back 
> to the older 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 configure my JVM to do the same 
> as above 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