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

ericv. updated CXF-8000:
------------------------
    Description: 
Since JAXB is no more in JDK11, I bring it in my WAR. But when the 
JaxWsDynamicClientFactory try to compile, it is not able to found the classes 
in WEB-INF/lib

I have something like this:

*{{.../HelloWorldRequest.java:5: error: package javax.xml.bind.annotation does 
not exist}}*

If I do the same in a standalone application, JDK11, it works perfectly.

Because the compilation fail, I end-up with:

{{*java.lang.IllegalStateException: Unable to create JAXBContext for generated 
packages: "test" does not contains ObjectFactory.class or jaxb.index*}}

this is very similar to CXF-7932

As far as I understand this is related to JXC, the compiler that generate Java 
code from WSDL. The way CXF invoke it seems to be wrong in this setup.

Maybe JaxWsDynamicClientFactory.setSchemaCompilerOptions() could help ?

*NOTE*: it was working in JDK8

My dependencies are:

{{<dependencies>}}
 {{        <dependency>}}
 {{            <groupId>javax</groupId>}}
 {{            <artifactId>javaee-api</artifactId>}}
 {{            <version>8.0</version>}}
 {{            <scope>provided</scope>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>org.apache.cxf</groupId>}}
 {{            <artifactId>cxf-rt-frontend-jaxws</artifactId>}}
 {{            <version>3.3.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>org.apache.cxf</groupId>}}
 {{            <artifactId>cxf-rt-transports-http</artifactId>}}
 {{            <version>3.3.1</version>}}
 {{        </dependency>}}

{{        <dependency>}}
 {{            <groupId>javax.xml.bind</groupId>}}
 {{            <artifactId>jaxb-api</artifactId>}}
 {{            <version>2.3.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>com.sun.xml.bind</groupId>}}
 {{            <artifactId>jaxb-core</artifactId>}}
 {{            <version>2.3.0</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>com.sun.xml.bind</groupId>}}
 {{            <artifactId>jaxb-impl</artifactId>}}
 {{            <version>2.3.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.annotation</groupId>}}
 {{            <artifactId>javax.annotation-api</artifactId>}}
 {{            <version>1.3.2</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.activation</groupId>}}
 {{            <artifactId>activation</artifactId>}}
 {{            <version>1.1.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.xml.soap</groupId>}}
 {{            <artifactId>javax.xml.soap-api</artifactId>}}
 {{            <version>1.4.0</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.xml.ws</groupId>}}
 {{            <artifactId>jaxws-api</artifactId>}}
 {{            <version>2.3.1</version>}}
 {{        </dependency>}}
 {{    </dependencies>}}

  was:
Since JAXB is no more in JDK11, I bring it in my WAR. But when the 
JaxWsDynamicClientFactory try to compile, it is not able to found the classes 
in WEB-INF/lib

I have something like this:

*{{.../HelloWorldRequest.java:5: error: package javax.xml.bind.annotation does 
not exist}}*

If I do the same in a standalone application, JDK11, it works perfectly.

Because the compilation fail, I end-up with:

{{*java.lang.IllegalStateException: Unable to create JAXBContext for generated 
packages: "test" does not contains ObjectFactory.class or jaxb.index*}}

this is very similar to CXF-7932

As far as I understand this is related to JXC, the compiler that generate Java 
code from WSDL. The way CXF invoke it seems to be wrong in this setup.

Maybe JaxWsDynamicClientFactory.setSchemaCompilerOptions() could help ?

 

 

My dependencies are:

{{<dependencies>}}
 {{        <dependency>}}
 {{            <groupId>javax</groupId>}}
 {{            <artifactId>javaee-api</artifactId>}}
 {{            <version>8.0</version>}}
 {{            <scope>provided</scope>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>org.apache.cxf</groupId>}}
 {{            <artifactId>cxf-rt-frontend-jaxws</artifactId>}}
 {{            <version>3.3.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>org.apache.cxf</groupId>}}
 {{            <artifactId>cxf-rt-transports-http</artifactId>}}
 {{            <version>3.3.1</version>}}
 {{        </dependency>}}

{{        <dependency>}}
 {{            <groupId>javax.xml.bind</groupId>}}
 {{            <artifactId>jaxb-api</artifactId>}}
 {{            <version>2.3.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>com.sun.xml.bind</groupId>}}
 {{            <artifactId>jaxb-core</artifactId>}}
 {{            <version>2.3.0</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>com.sun.xml.bind</groupId>}}
 {{            <artifactId>jaxb-impl</artifactId>}}
 {{            <version>2.3.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.annotation</groupId>}}
 {{            <artifactId>javax.annotation-api</artifactId>}}
 {{            <version>1.3.2</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.activation</groupId>}}
 {{            <artifactId>activation</artifactId>}}
 {{            <version>1.1.1</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.xml.soap</groupId>}}
 {{            <artifactId>javax.xml.soap-api</artifactId>}}
 {{            <version>1.4.0</version>}}
 {{        </dependency>}}
 {{        <dependency>}}
 {{            <groupId>javax.xml.ws</groupId>}}
 {{            <artifactId>jaxws-api</artifactId>}}
 {{            <version>2.3.1</version>}}
 {{        </dependency>}}
 {{    </dependencies>}}


> JaxWsDynamicClientFactory does not work on Wildfly15+JDK11
> ----------------------------------------------------------
>
>                 Key: CXF-8000
>                 URL: https://issues.apache.org/jira/browse/CXF-8000
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: WildFly 15, JDK 11, CXF 3.3.1
>            Reporter: ericv.
>            Priority: Major
>
> Since JAXB is no more in JDK11, I bring it in my WAR. But when the 
> JaxWsDynamicClientFactory try to compile, it is not able to found the classes 
> in WEB-INF/lib
> I have something like this:
> *{{.../HelloWorldRequest.java:5: error: package javax.xml.bind.annotation 
> does not exist}}*
> If I do the same in a standalone application, JDK11, it works perfectly.
> Because the compilation fail, I end-up with:
> {{*java.lang.IllegalStateException: Unable to create JAXBContext for 
> generated packages: "test" does not contains ObjectFactory.class or 
> jaxb.index*}}
> this is very similar to CXF-7932
> As far as I understand this is related to JXC, the compiler that generate 
> Java code from WSDL. The way CXF invoke it seems to be wrong in this setup.
> Maybe JaxWsDynamicClientFactory.setSchemaCompilerOptions() could help ?
> *NOTE*: it was working in JDK8
> My dependencies are:
> {{<dependencies>}}
>  {{        <dependency>}}
>  {{            <groupId>javax</groupId>}}
>  {{            <artifactId>javaee-api</artifactId>}}
>  {{            <version>8.0</version>}}
>  {{            <scope>provided</scope>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>org.apache.cxf</groupId>}}
>  {{            <artifactId>cxf-rt-frontend-jaxws</artifactId>}}
>  {{            <version>3.3.1</version>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>org.apache.cxf</groupId>}}
>  {{            <artifactId>cxf-rt-transports-http</artifactId>}}
>  {{            <version>3.3.1</version>}}
>  {{        </dependency>}}
> {{        <dependency>}}
>  {{            <groupId>javax.xml.bind</groupId>}}
>  {{            <artifactId>jaxb-api</artifactId>}}
>  {{            <version>2.3.1</version>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>com.sun.xml.bind</groupId>}}
>  {{            <artifactId>jaxb-core</artifactId>}}
>  {{            <version>2.3.0</version>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>com.sun.xml.bind</groupId>}}
>  {{            <artifactId>jaxb-impl</artifactId>}}
>  {{            <version>2.3.1</version>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>javax.annotation</groupId>}}
>  {{            <artifactId>javax.annotation-api</artifactId>}}
>  {{            <version>1.3.2</version>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>javax.activation</groupId>}}
>  {{            <artifactId>activation</artifactId>}}
>  {{            <version>1.1.1</version>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>javax.xml.soap</groupId>}}
>  {{            <artifactId>javax.xml.soap-api</artifactId>}}
>  {{            <version>1.4.0</version>}}
>  {{        </dependency>}}
>  {{        <dependency>}}
>  {{            <groupId>javax.xml.ws</groupId>}}
>  {{            <artifactId>jaxws-api</artifactId>}}
>  {{            <version>2.3.1</version>}}
>  {{        </dependency>}}
>  {{    </dependencies>}}



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

Reply via email to