You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Alex Shneyderman <a....@gmail.com> on 2007/12/23 11:22:24 UTC

Problems integrating CXF and Grails

I am using Grails framework in conjunction with CXF and I am getting
the following error trying to instantiate a SOAP interface to the
remote service:

Message: 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:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to
javax.xml.parsers.DocumentBuilderFactory

Caused by: java.lang.RuntimeException:
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:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to
javax.xml.parsers.DocumentBuilderFactory

Does anyone know what could be a problem? Seems like a conflicting jar
problem but what jar ?

Alex.

Re: Problems integrating CXF and Grails

Posted by Alex Shneyderman <a....@gmail.com>.
Thanks, Willem for your help!

Eventually, Xerces was not the only problem. BTW, Grails 1.0RC3 comes
with Xerces 2.9.0 and CXF works fine with that version. The problem I
described occurred when I tried to move Xerces jar out of CP. When I
added Xerceces jar back to the CP, I was getting a different error. It
is the same one as described here:

http://www.nabble.com/How-to-use-CXF-with-Grails--to14475535.html#a14475535

At the end of the thread I posted my solution. But as I mentioned in
the thread I am not sure what might be the side-effects. For now it
works and I will see how far I can take it :-)

Alex.

On Dec 24, 2007 2:41 AM, Willem Jiang <wi...@gmail.com> wrote:
> Hi Alex ,
>
> We use 2.8.1 on the development environment ,  you can try out the 2.9.1
> but I don't test it yet.
>
> Willem.
>

Re: Problems integrating CXF and Grails

Posted by Willem Jiang <wi...@gmail.com>.
Hi Alex ,

We use 2.8.1 on the development environment ,  you can try out the 2.9.1 
but I don't test it yet.

Willem.

Alex Shneyderman wrote:
> Does it have to be exactly that version ? or 2.9.1 will do as well ?
>
> On Dec 23, 2007 2:07 PM, Willem Jiang <wi...@gmail.com> wrote:
>   
>> Hi Alex,
>>
>> CXF need to use XercesImpl 2.8.1.jar.
>> Please make sure this jar be loaded first.
>>
>> Willem.
>>     
>
>   


Re: Problems integrating CXF and Grails

Posted by Alex Shneyderman <a....@gmail.com>.
Does it have to be exactly that version ? or 2.9.1 will do as well ?

On Dec 23, 2007 2:07 PM, Willem Jiang <wi...@gmail.com> wrote:
> Hi Alex,
>
> CXF need to use XercesImpl 2.8.1.jar.
> Please make sure this jar be loaded first.
>
> Willem.

Re: Problems integrating CXF and Grails

Posted by Willem Jiang <wi...@gmail.com>.
Hi Alex,

CXF need to use XercesImpl 2.8.1.jar.
Please make sure this jar be loaded first.

Willem.

Alex Shneyderman wrote:
> I am using Grails framework in conjunction with CXF and I am getting
> the following error trying to instantiate a SOAP interface to the
> remote service:
>
> Message: 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:
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to
> javax.xml.parsers.DocumentBuilderFactory
>
> Caused by: java.lang.RuntimeException:
> 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:
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to
> javax.xml.parsers.DocumentBuilderFactory
>
> Does anyone know what could be a problem? Seems like a conflicting jar
> problem but what jar ?
>
> Alex.
>
>