You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Matt Shostak <ms...@potomacfusion.com> on 2011/04/11 17:07:41 UTC

CXF problem on JBoss AS 6

Hi,

I'm also having trouble deploying a .war file on Jboss AS 6.  In this case, the .war file deploys just fine on Jboss 5.1.0.  When I drop the .war file in server/default/deploy and start Jboss, I get this error:

0    : 09:59:47,764 [Thread-2] ERROR ContextLoader  - Context initialization failed
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.wsdl.ReplyToNameType
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:946)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:892)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
               ...

I'd like to know about this META-INF/cxf/cxf.xml file.  I have no such thing in my .war file, but in my cxf-beans.xml file I do have the following:

    <import resource="classpath:META-INF/cxf/cxf.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>


which I think is what this page is saying I should do:

http://docs.huihoo.com/apache/cxf/2.0/configuration.html

So I'm left scratching my head about what I need to do in order to successfully deploy on Jboss AS 6.  Can anyone provide some help with this?

Thanks,

Matt



Re: CXF problem on JBoss AS 6

Posted by Dipti Vaidya <dv...@gmail.com>.
I'm having the same problem too. I'm using Jboss 6, with parent-first = false
for classloading.

Please let me know if you or someone knows how to fix this.
Thanks,

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-problem-on-JBoss-AS-6-tp4296130p4296855.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF problem on JBoss AS 6

Posted by Dipti Vaidya <dv...@gmail.com>.
Alessio,
Does this mean that even if we use jboss-classloading with parent-first =
false, we still can't ignore jboss's cxf libraries?
The reason we need to bundle cxf in our app is that we support multiple
platforms like websphere, weblogic and netweaver which may not have cxf in
them.

Any suggestions on how to go about this?

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-problem-on-JBoss-AS-6-tp4296130p4298698.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF problem on JBoss AS 6

Posted by commissarmatt <ms...@gmail.com>.
I was able to get past this error by putting the spring jars in
server\default\lib but I'm not sure if that's a recommended solution. 
Nevertheless I pressed on to see if I could get a working deployment
somehow. However, once past this error I have yet another error to deal
with:  

[META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it
does not exist

That reference is coming from my cxf-beans.xml file, which contains the
following lines:

 
 

So it could find cxf.xml at that location, but not
cxf-extension-jaxrs-binding.xml (which exists in
cxf-bundle-jaxrs-2.2.10.jar).  However I removed all my cxf jars because
Jboss 6 is supposed to come with cxf.  So what to do now?   Any ideas?

Thanks,

Matt


--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-problem-on-JBoss-AS-6-tp4296130p4298558.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF problem on JBoss AS 6

Posted by commissarmatt <ms...@gmail.com>.
When I remove the CXF jars from my .war and try again, I get this:

ClassNotFoundException: org.springframework.context.ApplicationListener

And yet I have the spring jar containing that class, in my .war file.    So
any ideas on this?

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-problem-on-JBoss-AS-6-tp4296130p4298334.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF problem on JBoss AS 6

Posted by Alessio Soldano <as...@redhat.com>.
Pressed send too early..

On 04/12/2011 08:55 AM, Alessio Soldano wrote:
> Hi Dipti,
> yes, JBoss AS 6 comes with JBossWS-CXF which is the Apache CXF based 
> version of the JBoss webservices integration. So iow you're not 
> supposed to embed your cxf libraries in your ws deployment archive. 
> Thinks might probably change a bit here in JBoss 7 to offer some more 
> freedom from this point of view.
s/Thinks/Things
> If you still want to provide your own CXF libs and not use the proper 
> JBoss integration (which I'd frankly suggest you to do),
I suggest you to try / use the jbossws-cxf integration.

-- 
Alessio Soldano
Web Service Lead, JBoss


Re: CXF problem on JBoss AS 6

Posted by Alessio Soldano <as...@redhat.com>.
Hi Dipti,
yes, JBoss AS 6 comes with JBossWS-CXF which is the Apache CXF based 
version of the JBoss webservices integration. So iow you're not supposed 
to embed your cxf libraries in your ws deployment archive. Thinks might 
probably change a bit here in JBoss 7 to offer some more freedom from 
this point of view.
If you still want to provide your own CXF libs and not use the proper 
JBoss integration (which I'd frankly suggest you to do), you can 
download and install the JBossWS-Native ws stack on top of AS 6 (that is 
not based on Apache CXF).
Cheers
Alessio

On 04/12/2011 03:51 AM, Dipti Vaidya wrote:
> Update: I know what the issue is though I don't know how to fix it.
> I noticed that Jboss 6 comes with cxf libraries in the /commons/lib/
> directory and when I spin up my server, it is picking up the extensions.xml
> from those libraries.
>
> I tried to do the jboss-classloading.xml file as suggested online but I
> still get the same issue:
> Here's what my jboss-classloading.xml looks like:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>
>
> Can someone please tell me how to ignore / isolate the cxf libraries that
> come with jboss 6 and only use the ones that are in my app?
>
> Thanks,
> Dipti
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-problem-on-JBoss-AS-6-tp4296130p4297227.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Alessio Soldano
Web Service Lead, JBoss


Re: CXF problem on JBoss AS 6

Posted by Dipti Vaidya <dv...@gmail.com>.
Update: I know what the issue is though I don't know how to fix it.
I noticed that Jboss 6 comes with cxf libraries in the /commons/lib/
directory and when I spin up my server, it is picking up the extensions.xml
from those libraries.

I tried to do the jboss-classloading.xml file as suggested online but I
still get the same issue:
Here's what my jboss-classloading.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>



Can someone please tell me how to ignore / isolate the cxf libraries that
come with jboss 6 and only use the ones that are in my app?

Thanks,
Dipti

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-problem-on-JBoss-AS-6-tp4296130p4297227.html
Sent from the cxf-user mailing list archive at Nabble.com.