You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by doviche <do...@gmail.com> on 2010/11/09 10:02:31 UTC

Unable to deploy CXF WS package on JBoss

Hello guys,
I am going through painful times as I have not been able to deploy my CXF
Webservice app onto jboss-5.1.0.
Well, I have a webservice architecture based on CXF WS and I've used Maven
to generate my webservices and they have been created properly by using
"wsdl2java".

I've deployed the webservice on tomcat they are working perfectly. The
problem is that when I try to deploy on JBoss and getting the following
errors:

Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in
class path resource [META-INF/cxf/cxf.xml]: 
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: 
Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: 
Constructor threw exception; nested exception is
java.lang.ClassCastException: 
class org.apache.cxf.transport.jms.ClientBehaviorPolicyType

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
.....................................
more stacktraces
.........................
and finally the last line of error below...

javax.inject.DefinitionException: Could not find 'endpoint'


Does any one of you has a clue of this issue?


Best regards to all the pals.

Thanks in advace guys.


Douglas

-- 
View this message in context: http://cxf.547215.n5.nabble.com/Unable-to-deploy-CXF-WS-package-on-JBoss-tp3256464p3256464.html
Sent from the cxf-issues mailing list archive at Nabble.com.

Re: Unable to deploy CXF WS package on JBoss

Posted by Alessio Soldano <as...@redhat.com>.
  Hi Dan,

On 11/09/2010 09:50 PM, Daniel Kulp wrote:
> On Tuesday 09 November 2010 3:47:22 pm Alessio Soldano wrote:
>>    Yes, this might be a classloading issue, however it's not that clear
>> to me the relationship with WSS4J here (sorry Dan ;-)
> Ooppss.     I meant WSDL4J.   Too many "4j's".  :-)
>
> The class in question implements an interface in wsdl4j and thus, if picked up
> from multiple classloaders, may not be castable correctly.
>
Right.
And yes, wsdl4j is an example of 3rd party lib that's used by 
jbossws-native too and already provided in the JBoss AS distribution. So 
the user should remove one of the 2 equivalent libs (probably the one 
included in the deployment, otherwise he might broke other AS 
functionalities, as the classes from the lib in the deployment should 
not be visible outside of it).

Cheers
Alessio


-- 
Alessio Soldano
Web Service Lead, JBoss


Re: Unable to deploy CXF WS package on JBoss

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 09 November 2010 3:47:22 pm Alessio Soldano wrote:
>   Yes, this might be a classloading issue, however it's not that clear
> to me the relationship with WSS4J here (sorry Dan ;-)

Ooppss.     I meant WSDL4J.   Too many "4j's".  :-)

The class in question implements an interface in wsdl4j and thus, if picked up 
from multiple classloaders, may not be castable correctly.

Dan



> Anyway, which webservice stack is being used on the mentioned JBoss
> 5.1.0? (btw I assume it's the community AS version..?)
> If the JBossWS-CXF stack is installed, you might want to simply avoid
> bundling the cxf libs in your application, as they are already there in
> the appserver. Alternatively you can probably try to isolate the
> deployment classloader from the server, but that's not going to be a
> trivial task at all.
> If JBossWS-Native is being used, instead, you might be facing a
> thirdparty library clash as Dan mentioned, so you might want to first
> isolate the culprit lib and decide what to do once you've understood
> what's actually happening.
> 
> Cheers
> Alessio
> 
> On 11/09/2010 08:23 PM, Daniel Kulp wrote:
> > It's likely a classloader issue as JBoss likely already has some of the
> > libraries we use in the classloader provided for the webapp.   I would
> > assume things like WSS4J (which would be the cause of the
> > ClassCastException) are already there or similar.    I would start
> > removing some of the libs that JBoss already contains and seeing if that
> > helps at all.
> > 
> > Dan
> > 
> > On Tuesday 09 November 2010 4:02:31 am doviche wrote:
> >> Hello guys,
> >> I am going through painful times as I have not been able to deploy my
> >> CXF Webservice app onto jboss-5.1.0.
> >> Well, I have a webservice architecture based on CXF WS and I've used
> >> Maven to generate my webservices and they have been created properly by
> >> using "wsdl2java".
> >> 
> >> I've deployed the webservice on tomcat they are working perfectly. The
> >> problem is that when I try to deploy on JBoss and getting the following
> >> errors:
> >> 
> >> Caused by: org.springframework.beans.factory.BeanCreationException:
> >> Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined
> >> in class path resource [META-INF/cxf/cxf.xml]:
> >> Instantiation of bean failed; nested exception is
> >> org.springframework.beans.BeanInstantiationException:
> >> Could not instantiate bean class
> >> [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw exception;
> >> nested exception is
> >> java.lang.ClassCastException:
> >> class org.apache.cxf.transport.jms.ClientBehaviorPolicyType
> >> 
> >> at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> >> tor y.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
> >> .....................................
> >> more stacktraces
> >> .........................
> >> and finally the last line of error below...
> >> 
> >> javax.inject.DefinitionException: Could not find 'endpoint'
> >> 
> >> 
> >> Does any one of you has a clue of this issue?
> >> 
> >> 
> >> Best regards to all the pals.
> >> 
> >> Thanks in advace guys.
> >> 
> >> 
> >> Douglas

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: Unable to deploy CXF WS package on JBoss

Posted by Alessio Soldano <as...@redhat.com>.
  Yes, this might be a classloading issue, however it's not that clear 
to me the relationship with WSS4J here (sorry Dan ;-)
Anyway, which webservice stack is being used on the mentioned JBoss 
5.1.0? (btw I assume it's the community AS version..?)
If the JBossWS-CXF stack is installed, you might want to simply avoid 
bundling the cxf libs in your application, as they are already there in 
the appserver. Alternatively you can probably try to isolate the 
deployment classloader from the server, but that's not going to be a 
trivial task at all.
If JBossWS-Native is being used, instead, you might be facing a 
thirdparty library clash as Dan mentioned, so you might want to first 
isolate the culprit lib and decide what to do once you've understood 
what's actually happening.

Cheers
Alessio

On 11/09/2010 08:23 PM, Daniel Kulp wrote:
>
> It's likely a classloader issue as JBoss likely already has some of the
> libraries we use in the classloader provided for the webapp.   I would assume
> things like WSS4J (which would be the cause of the ClassCastException) are
> already there or similar.    I would start removing some of the libs that
> JBoss already contains and seeing if that helps at all.
>
> Dan
>
>
> On Tuesday 09 November 2010 4:02:31 am doviche wrote:
>> Hello guys,
>> I am going through painful times as I have not been able to deploy my CXF
>> Webservice app onto jboss-5.1.0.
>> Well, I have a webservice architecture based on CXF WS and I've used Maven
>> to generate my webservices and they have been created properly by using
>> "wsdl2java".
>>
>> I've deployed the webservice on tomcat they are working perfectly. The
>> problem is that when I try to deploy on JBoss and getting the following
>> errors:
>>
>> Caused by: org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in
>> class path resource [META-INF/cxf/cxf.xml]:
>> Instantiation of bean failed; nested exception is
>> org.springframework.beans.BeanInstantiationException:
>> Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
>> Constructor threw exception; nested exception is
>> java.lang.ClassCastException:
>> class org.apache.cxf.transport.jms.ClientBehaviorPolicyType
>>
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor
>> y.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
>> .....................................
>> more stacktraces
>> .........................
>> and finally the last line of error below...
>>
>> javax.inject.DefinitionException: Could not find 'endpoint'
>>
>>
>> Does any one of you has a clue of this issue?
>>
>>
>> Best regards to all the pals.
>>
>> Thanks in advace guys.
>>
>>
>> Douglas


-- 
Alessio Soldano
Web Service Lead, JBoss


Re: Unable to deploy CXF WS package on JBoss

Posted by Daniel Kulp <dk...@apache.org>.

It's likely a classloader issue as JBoss likely already has some of the 
libraries we use in the classloader provided for the webapp.   I would assume 
things like WSS4J (which would be the cause of the ClassCastException) are  
already there or similar.    I would start removing some of the libs that 
JBoss already contains and seeing if that helps at all.

Dan


On Tuesday 09 November 2010 4:02:31 am doviche wrote:
> Hello guys,
> I am going through painful times as I have not been able to deploy my CXF
> Webservice app onto jboss-5.1.0.
> Well, I have a webservice architecture based on CXF WS and I've used Maven
> to generate my webservices and they have been created properly by using
> "wsdl2java".
> 
> I've deployed the webservice on tomcat they are working perfectly. The
> problem is that when I try to deploy on JBoss and getting the following
> errors:
> 
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in
> class path resource [META-INF/cxf/cxf.xml]:
> Instantiation of bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException:
> Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
> Constructor threw exception; nested exception is
> java.lang.ClassCastException:
> class org.apache.cxf.transport.jms.ClientBehaviorPolicyType
> 
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor
> y.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
> .....................................
> more stacktraces
> .........................
> and finally the last line of error below...
> 
> javax.inject.DefinitionException: Could not find 'endpoint'
> 
> 
> Does any one of you has a clue of this issue?
> 
> 
> Best regards to all the pals.
> 
> Thanks in advace guys.
> 
> 
> Douglas

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog