You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Poindexter, Miles" <Mi...@condenast.com> on 2013/08/21 18:06:21 UTC
CXF client won't run
Hi,
My apologies if this question seems obvious but I'm new to CXF and on a tight schedule.
I have built a few clients in Java before this using CXF 2.7.3 and things have gone fairly smoothly.
But this latest one won't run and the exception is saying it can't find a class in the CXF framework.
I've tried it using both CXF 2.7.6 and then reverting to 2.7.3.
The code compiles fine.
But when I run the client test, I get this error:
java.lang.ClassNotFoundException: org.apache.cxf.jaxb.JAXBDataBinding
Is this class deprecated or no longer used in the latest CXF?
When I add this dependency:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>2.4.2</version>
</dependency>
Then the new error is:
ClassNotFoundException: org.apache.cxf.frontend.MethodDispatcher
I can definitely understand if org.apache.cxf.jaxb.JAXBDataBinding is gone is versions later than 2.4.2.
But I don't know why a bunch of stubs created using wsdl2java are trying to use a class that is not there?
Nothing in my code is calling for org.apache.cxf.jaxb.JAXBDataBinding.
Its happening behind the scenes when I try to get the Port object:
new SupplierService_Service(wsdlLocation).getSupplierPort11();
Here's all of my dependencies: (version is 2.7.3)
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
<!-- scope>provided</scope -->
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
<!-- scope>provided</scope -->
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-databinding-jaxb</artifactId>
<version>${cxf.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
<version>${cxf.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
<version>${cxf.version}</version>
<!-- scope>provided</scope -->
</dependency>
Can anyone help me get around this?
miles
Miles Poindexter
Service Oriented Architecture, Senior Analyst
miles_poindexter@condenast.com
347-967-8944 / 212-790-6692
Re: CXF client won't run
Posted by "Poindexter, Miles" <Mi...@condenast.com>.
OK so now you really know I am a beginner. I got it working.
I had to comment out all of the <scope>provided</scope> in the pom.xml
Otherwise, I was not getting the jars in the bundle that I needed, so I could run the test main method from the command line.
Normally, the bundle goes into Talend ESB, which already has the CXF framework so that's why I had set the <scope> tags that way.
thanks, miles
On Aug 21, 2013, at 12:06 PM, "Poindexter, Miles" <Mi...@condenast.com>
wrote:
> Hi,
> My apologies if this question seems obvious but I'm new to CXF and on a tight schedule.
>
> I have built a few clients in Java before this using CXF 2.7.3 and things have gone fairly smoothly.
>
> But this latest one won't run and the exception is saying it can't find a class in the CXF framework.
>
> I've tried it using both CXF 2.7.6 and then reverting to 2.7.3.
>
> The code compiles fine.
> But when I run the client test, I get this error:
>
> java.lang.ClassNotFoundException: org.apache.cxf.jaxb.JAXBDataBinding
>
> Is this class deprecated or no longer used in the latest CXF?
>
> When I add this dependency:
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-simple</artifactId>
> <version>2.4.2</version>
> </dependency>
>
> Then the new error is:
> ClassNotFoundException: org.apache.cxf.frontend.MethodDispatcher
>
> I can definitely understand if org.apache.cxf.jaxb.JAXBDataBinding is gone is versions later than 2.4.2.
>
> But I don't know why a bunch of stubs created using wsdl2java are trying to use a class that is not there?
> Nothing in my code is calling for org.apache.cxf.jaxb.JAXBDataBinding.
> Its happening behind the scenes when I try to get the Port object:
>
> new SupplierService_Service(wsdlLocation).getSupplierPort11();
>
> Here's all of my dependencies: (version is 2.7.3)
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxws</artifactId>
> <version>${cxf.version}</version>
> <!-- scope>provided</scope -->
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxrs</artifactId>
> <version>${cxf.version}</version>
> <!-- scope>provided</scope -->
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-databinding-jaxb</artifactId>
> <version>${cxf.version}</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-bundle-jaxrs</artifactId>
> <version>${cxf.version}</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-bindings-soap</artifactId>
> <version>${cxf.version}</version>
> <!-- scope>provided</scope -->
> </dependency>
>
> Can anyone help me get around this?
>
> miles
>
> Miles Poindexter
> Service Oriented Architecture, Senior Analyst
> miles_poindexter@condenast.com
> 347-967-8944 / 212-790-6692
>
>
>
>