You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Singh, Ramanand" <Ra...@geico.com> on 2007/09/20 00:02:07 UTC

CXF and WebSphere Compatibility

There seems that CXF is not compatible with WebSphere 6.1. I wrote a web
service for my project. I tested it completely and successfully on JBOSS
4.x. However, when I deployed it on WebSphere 6.1, the deployment itself
failed. I have include a portion of exception below for reference.

 

I also saw the following JIRA on the subject:

 

https://issues.apache.org/jira/browse/CXF-714

 

Has anybody tested a CXF based web service on WebSphere 6.1?

 

Regards,

Ramanand Singh

Architecture Team

GEICO IBU Service

301.986.2791

 

Exception Generated:

 

----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
org.springframework.web.context.ContextLoader:initWebApplicationContext:
200 - 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:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
javax.xml.parsers.DocumentBuilderFactory

Caused by: 

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 incompatible with
javax.xml.parsers.DocumentBuilderFactory

Caused by: 

java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
javax.xml.parsers.DocumentBuilderFactory

            at
javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)

            at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90)

            at java.util.XMLUtils.load(XMLUtils.java:72)

            at java.util.Properties.loadFromXML(Properties.java:741)

            at
org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Prope
rtiesLoaderUtils.java:71)

            at
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMana
gerImpl.java:209)

            at
org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97)

            at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

            at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:67)

            at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:45)

            at
java.lang.reflect.Constructor.newInstance(Constructor.java:521)

            at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)

            at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
stantiate(SimpleInstantiationStrategy.java:61)

            at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)

            at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)

            at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:386)

            at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
t(AbstractBeanFactory.java:251)

            at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
etSingleton(DefaultSingletonBeanRegistry.java:144)

            at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:248)

            at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:160)

            at
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
InstantiateSingletons(DefaultListableBeanFactory.java:279)

            at
org.springframework.context.support.AbstractApplicationContext.refresh(A
bstractApplicationContext.java:360)

            at
org.springframework.web.context.ContextLoader.createWebApplicationContex
t(ContextLoader.java:241)

            at
org.springframework.web.context.ContextLoader.initWebApplicationContext(
ContextLoader.java:184)

            at
org.springframework.web.context.ContextLoaderListener.contextInitialized
(ContextLoaderListener.java:49)

            at
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebA
pp.java:635)

            at
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.
java:279)

            at
com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)

            at
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav
a:88)

            at
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java
:157)

            at
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)

            at
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja
va:608)

            at
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI
mpl.java:335)

            at
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp
l.java:551)

            at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
.java:1312)

            at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
tart(DeployedApplicationImpl.java:1129)

            at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
.java:569)

            at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
cationImpl.java:814)

            at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
tionMgrImpl.java:965)

            at
com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli
cationMgrImpl.java:2131)

            at
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W
sComponentImpl.java:341)

            at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.

Re: CXF and WebSphere Compatibility

Posted by Daniel Kulp <dk...@apache.org>.
One more note... if you use anything that requires the SAAJ model 
(ws-security being one, JAX-WS SOAP Handlers being another), you may run 
into a different issue.   The Sun reference impl of SAAJ doesn't work on 
the IBM JDK that they usually use for websphere unless you grab the sun 
jaxp parser jars and put them in the jre/lib/endorsed dir.    
Alternatively, you could find a different SAAJ impl that does work.  
(there probably is already one built into websphere, so just removing 
our saaj-* jars may be OK)

Dan


On Friday 21 September 2007, Daniel Kulp wrote:
> It PROBABLY has something to do with the xml-apis jar we have to ship
> for ws-security stuff to work.   If you don't need ws-security, I
> would suggest removing the xml-apis and the xalan jar.   Most likely,
> they are conflicting with stuff in the websphere JVM.
>
> Dan
>
> On Friday 21 September 2007, Benson Margulies wrote:
> > The complaint you are getting is that
> > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl, which is what is
> > in your jaxp.properties, is incompatible with
> > javax.xml.parsers.DocumentBuilderFactory.
> >
> > This doesn't make much sense to me. I'm a bit rusty on the curious
> > behavior of webapp class loaders. But, I think, you might need to
> > put jars for an appropriate version of Xerces inside your webapp.
> >
> > Perhaps someone else on here has a better grip?
> >
> > > -----Original Message-----
> > > From: Singh, Ramanand [mailto:RamSingh@geico.com]
> > > Sent: Friday, September 21, 2007 4:08 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: RE: CXF and WebSphere Compatibility
> > >
> > > What are the correct values for these parameters? My current
> > > jaxp.properties is as follows:
> >
> > javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Tr
> >an sf
> >
> > > ormerFactoryImpl
> >
> > javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserF
> >ac to
> >
> > > ryImpl
> >
> > javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Docu
> >me nt
> >
> > > BuilderFactoryImpl
> > >
> > > Regards,
> > > Ramanand Singh
> > >
> > > -----Original Message-----
> > > From: Benson Margulies [mailto:bim2007@basistech.com]
> > > Sent: Friday, September 21, 2007 3:12 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: RE: CXF and WebSphere Compatibility
> > >
> > > Look at
> >
> > http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBu
> >il de
> >
> > > rFactory.html#newInstance().
> > >
> > > It appears that websphere does something exotic with the
> > > jaxp.properties. You would need your own jaxp.properties that
> > > reestablishes the standard Java 1.5 environment.
> > >
> > > > -----Original Message-----
> > > > From: Singh, Ramanand [mailto:RamSingh@geico.com]
> > > > Sent: Friday, September 21, 2007 1:47 PM
> > > > To: cxf-user@incubator.apache.org
> > > > Subject: RE: CXF and WebSphere Compatibility
> > > >
> > > > Benson,
> > > >
> > > > Do you know how to do that? If it does not work, I would have to
> > >
> > > choose
> > >
> > > > different framework instead.
> > > >
> > > > Regards,
> > > > Ramanand Singh
> > > >
> > > > -----Original Message-----
> > > > From: Benson Margulies [mailto:bim2007@basistech.com]
> > > > Sent: Wednesday, September 19, 2007 6:18 PM
> > > > To: cxf-user@incubator.apache.org
> > > > Subject: RE: CXF and WebSphere Compatibility
> > > >
> > > > Looks like you need to fix your deployment to isolate your CXF
> > > > application from the wrong XML parser which seems to be in there
> > > > by default.
> > > >
> > > > > -----Original Message-----
> > > > > From: Singh, Ramanand
> > > > > Sent: Wednesday, September 19, 2007 6:02 PM
> > > > > To: cxf-user@incubator.apache.org
> > > > > Subject: CXF and WebSphere Compatibility
> > > > >
> > > > > There seems that CXF is not compatible with WebSphere 6.1. I
> > > > > wrote
> >
> > a
> >
> > > > web
> > > >
> > > > > service for my project. I tested it completely and
> > > > > successfully on
> > > >
> > > > JBOSS
> > > >
> > > > > 4.x. However, when I deployed it on WebSphere 6.1, the
> > > > > deployment
> > > >
> > > > itself
> > > >
> > > > > failed. I have include a portion of exception below for
> > > > > reference.
> > > > >
> > > > > I also saw the following JIRA on the subject:
> > > > >
> > > > > https://issues.apache.org/jira/browse/CXF-714
> > > > >
> > > > > Has anybody tested a CXF based web service on WebSphere 6.1?
> > > > >
> > > > > Regards,
> > > > > Ramanand Singh
> > > > >
> > > > > Exception Generated:
> > > > >
> > > > > ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
>
> 
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> > > > > 200 - 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:
> > > > > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible
> >
> > with
> >
> > > > > javax.xml.parsers.DocumentBuilderFactory
> > > > >
> > > > > Caused by:
> > > > >
> > > > > 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 incompatible
> >
> > with
> >
> > > > > javax.xml.parsers.DocumentBuilderFactory
> > > > >
> > > > > Caused by:
> > > > >
> > > > > java.lang.ClassCastException:
> > > > > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible
> >
> > with
> >
> > > > > javax.xml.parsers.DocumentBuilderFactory
> > > > >             at
> > > > > javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown
> >
> > Source)
> >
> > > > >             at
> > > > > java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90) at
> > > > > java.util.XMLUtils.load(XMLUtils.java:72) at
> >
> > java.util.Properties.loadFromXML(Properties.java:741)
> >
> > > > >             at
> >
> > org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(P
> >ro pe
> >
> > > > > rtiesLoaderUtils.java:71)
> > > > >             at
> >
> > org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDL
> >Ma na
> >
> > > > > gerImpl.java:209)
> > > > >             at
> > >
> > > org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:
> > >97 )
> > >
> > > > >             at
> > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > >
> > > Method)
> > >
> > > > >             at
> >
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruc
> >to rA
> >
> > > > > ccessorImpl.java:67)
> > > > >             at
> >
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegating
> >Co ns
> >
> > > > > tructorAccessorImpl.java:45)
> > > > >             at
> > > > > java.lang.reflect.Constructor.newInstance(Constructor.java:521
> > > > >) at
> >
> > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:
> >85 )
> >
> > > > >             at
> >
> > org.springframework.beans.factory.support.SimpleInstantiationStrateg
> >y. in
> >
> > > > stantiate(SimpleInstantiationStrategy.java:61)
> > > >
> > > > >             at
> >
> > org.springframework.beans.factory.support.AbstractAutowireCapableBea
> >nF ac
> >
> > > > tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732
> > > >)
> > > >
> > > > >             at
> >
> > org.springframework.beans.factory.support.AbstractAutowireCapableBea
> >nF ac
> >
> > > > tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:
> > > >72 0)
> > > >
> > > > >             at
> >
> > org.springframework.beans.factory.support.AbstractAutowireCapableBea
> >nF ac
> >
> > > > tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
> > > >  at
> >
> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getO
> >bj ec
> >
> > > > t(AbstractBeanFactory.java:251)
> > > >
> > > > >             at
> >
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegist
> >ry .g
> >
> > > > etSingleton(DefaultSingletonBeanRegistry.java:144)
> > > >
> > > > >             at
> >
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBea
> >n( Ab
> >
> > > > stractBeanFactory.java:248)
> > > >
> > > > >             at
> >
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBea
> >n( Ab
> >
> > > > stractBeanFactory.java:160)
> > > >
> > > > >             at
> >
> > org.springframework.beans.factory.support.DefaultListableBeanFactory
> >.p re
> >
> > > > InstantiateSingletons(DefaultListableBeanFactory.java:279)
> > > >
> > > > >             at
> >
> > org.springframework.context.support.AbstractApplicationContext.refre
> >sh (A
> >
> > > > bstractApplicationContext.java:360)
> > > >
> > > > >             at
> >
> > org.springframework.web.context.ContextLoader.createWebApplicationCo
> >nt ex
> >
> > > > t(ContextLoader.java:241)
> > > >
> > > > >             at
> >
> > org.springframework.web.context.ContextLoader.initWebApplicationCont
> >ex t(
> >
> > > > ContextLoader.java:184)
> > > >
> > > > >             at
> >
> > org.springframework.web.context.ContextLoaderListener.contextInitial
> >iz ed
> >
> > > > (ContextLoaderListener.java:49)
> > > >
> > > > >             at
> >
> > com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(
> >We bA
> >
> > > > pp.java:635)
> > > >
> > > > >             at
> >
> > com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(Web
> >Ap p.
> >
> > > > java:279)
> > > >            at
> >
> > com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
> >
> > > > >             at
> >
> > com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup
> >.j av
> >
> > > > a:88)
> > > >
> > > > >             at
> >
> > com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.
> >ja va
> >
> > > > > :157)
> > > > >
> > > > >             at
> >
> > com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:6
> >55 )
> >
> > > > >             at
> >
> > com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContaine
> >r. ja
> >
> > > > > va:608)
> > > > >             at
> >
> > com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContai
> >ne rI
> >
> > > > mpl.java:335)
> > > >
> > > > >             at
> >
> > com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContaine
> >rI mp
> >
> > > > l.java:551)
> > > >
> > > > >             at
> >
> > com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgr
> >Im pl
> >
> > > > > .java:1312)
> > > > >             at
> >
> > com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObj
> >ec tS
> >
> > > > > tart(DeployedApplicationImpl.java:1129)
> > > > >             at
> >
> > com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModule
> >Im pl
> >
> > > > > .java:569)
> > > > >             at
> >
> > com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedA
> >pp li
> >
> > > > > cationImpl.java:814)
> > > > >             at
> >
> > com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(App
> >li ca
> >
> > > > > tionMgrImpl.java:965)
> > > > >             at
> >
> > com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(A
> >pp li
> >
> > > > > cationMgrImpl.java:2131)
> > > > >             at
> >
> > com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.r
> >un (W
> >
> > > > > sComponentImpl.java:341)
> > > > >             at
> > > > > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> > > >
> > > > ====================
> > > > This email/fax message is for the sole use of the intended
> > > > recipient(s) and may contain confidential and privileged
> >
> > information.
> >
> > > > Any unauthorized review, use, disclosure or distribution of this
> > > > email/fax is prohibited. If you are not the intended recipient,
> >
> > please
> >
> > > > destroy all paper and electronic copies of the original message.
> > >
> > > ====================
> > > This email/fax message is for the sole use of the intended
> > > recipient(s) and may contain confidential and privileged
> > > information. Any unauthorized review, use, disclosure or
> > > distribution of this email/fax is prohibited. If you are not the
> > > intended recipient, please destroy all paper and electronic copies
> > > of the original message.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: CXF and WebSphere Compatibility

Posted by Daniel Kulp <dk...@apache.org>.
It PROBABLY has something to do with the xml-apis jar we have to ship for 
ws-security stuff to work.   If you don't need ws-security, I would 
suggest removing the xml-apis and the xalan jar.   Most likely, they are 
conflicting with stuff in the websphere JVM.

Dan


On Friday 21 September 2007, Benson Margulies wrote:
> The complaint you are getting is that
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl, which is what is in
> your jaxp.properties, is incompatible with
> javax.xml.parsers.DocumentBuilderFactory.
>
> This doesn't make much sense to me. I'm a bit rusty on the curious
> behavior of webapp class loaders. But, I think, you might need to put
> jars for an appropriate version of Xerces inside your webapp.
>
> Perhaps someone else on here has a better grip?
>
> > -----Original Message-----
> > From: Singh, Ramanand [mailto:RamSingh@geico.com]
> > Sent: Friday, September 21, 2007 4:08 PM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: CXF and WebSphere Compatibility
> >
> > What are the correct values for these parameters? My current
> > jaxp.properties is as follows:
>
> javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Tran
>sf
>
> > ormerFactoryImpl
>
> javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFac
>to
>
> > ryImpl
>
> javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Docume
>nt
>
> > BuilderFactoryImpl
> >
> > Regards,
> > Ramanand Singh
> >
> > -----Original Message-----
> > From: Benson Margulies [mailto:bim2007@basistech.com]
> > Sent: Friday, September 21, 2007 3:12 PM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: CXF and WebSphere Compatibility
> >
> > Look at
>
> http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuil
>de
>
> > rFactory.html#newInstance().
> >
> > It appears that websphere does something exotic with the
> > jaxp.properties. You would need your own jaxp.properties that
> > reestablishes the standard Java 1.5 environment.
> >
> > > -----Original Message-----
> > > From: Singh, Ramanand [mailto:RamSingh@geico.com]
> > > Sent: Friday, September 21, 2007 1:47 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: RE: CXF and WebSphere Compatibility
> > >
> > > Benson,
> > >
> > > Do you know how to do that? If it does not work, I would have to
> >
> > choose
> >
> > > different framework instead.
> > >
> > > Regards,
> > > Ramanand Singh
> > >
> > > -----Original Message-----
> > > From: Benson Margulies [mailto:bim2007@basistech.com]
> > > Sent: Wednesday, September 19, 2007 6:18 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: RE: CXF and WebSphere Compatibility
> > >
> > > Looks like you need to fix your deployment to isolate your CXF
> > > application from the wrong XML parser which seems to be in there
> > > by default.
> > >
> > > > -----Original Message-----
> > > > From: Singh, Ramanand
> > > > Sent: Wednesday, September 19, 2007 6:02 PM
> > > > To: cxf-user@incubator.apache.org
> > > > Subject: CXF and WebSphere Compatibility
> > > >
> > > > There seems that CXF is not compatible with WebSphere 6.1. I
> > > > wrote
>
> a
>
> > > web
> > >
> > > > service for my project. I tested it completely and successfully
> > > > on
> > >
> > > JBOSS
> > >
> > > > 4.x. However, when I deployed it on WebSphere 6.1, the
> > > > deployment
> > >
> > > itself
> > >
> > > > failed. I have include a portion of exception below for
> > > > reference.
> > > >
> > > > I also saw the following JIRA on the subject:
> > > >
> > > > https://issues.apache.org/jira/browse/CXF-714
> > > >
> > > > Has anybody tested a CXF based web service on WebSphere 6.1?
> > > >
> > > > Regards,
> > > > Ramanand Singh
> > > >
> > > > Exception Generated:
> > > >
> > > > ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
>
> 
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> > > > 200 - 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:
> > > > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible
>
> with
>
> > > > javax.xml.parsers.DocumentBuilderFactory
> > > >
> > > > Caused by:
> > > >
> > > > 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 incompatible
>
> with
>
> > > > javax.xml.parsers.DocumentBuilderFactory
> > > >
> > > > Caused by:
> > > >
> > > > java.lang.ClassCastException:
> > > > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible
>
> with
>
> > > > javax.xml.parsers.DocumentBuilderFactory
> > > >             at
> > > > javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown
>
> Source)
>
> > > >             at
> > > > java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90) at
> > > > java.util.XMLUtils.load(XMLUtils.java:72) at
>
> java.util.Properties.loadFromXML(Properties.java:741)
>
> > > >             at
>
> org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Pro
>pe
>
> > > > rtiesLoaderUtils.java:71)
> > > >             at
>
> org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMa
>na
>
> > > > gerImpl.java:209)
> > > >             at
> >
> > org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97
> >)
> >
> > > >             at
> > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >
> > Method)
> >
> > > >             at
>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo
>rA
>
> > > > ccessorImpl.java:67)
> > > >             at
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo
>ns
>
> > > > tructorAccessorImpl.java:45)
> > > >             at
> > > > java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> > > >             at
>
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85
>)
>
> > > >             at
>
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.
>in
>
> > > stantiate(SimpleInstantiationStrategy.java:61)
> > >
> > > >             at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
>ac
>
> > > tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
> > >
> > > >             at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
>ac
>
> > > tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:72
> > >0)
> > >
> > > >             at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
>ac
>
> > > tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
> > >  at
>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObj
>ec
>
> > > t(AbstractBeanFactory.java:251)
> > >
> > > >             at
>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
>.g
>
> > > etSingleton(DefaultSingletonBeanRegistry.java:144)
> > >
> > > >             at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
>Ab
>
> > > stractBeanFactory.java:248)
> > >
> > > >             at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
>Ab
>
> > > stractBeanFactory.java:160)
> > >
> > > >             at
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.p
>re
>
> > > InstantiateSingletons(DefaultListableBeanFactory.java:279)
> > >
> > > >             at
>
> org.springframework.context.support.AbstractApplicationContext.refresh
>(A
>
> > > bstractApplicationContext.java:360)
> > >
> > > >             at
>
> org.springframework.web.context.ContextLoader.createWebApplicationCont
>ex
>
> > > t(ContextLoader.java:241)
> > >
> > > >             at
>
> org.springframework.web.context.ContextLoader.initWebApplicationContex
>t(
>
> > > ContextLoader.java:184)
> > >
> > > >             at
>
> org.springframework.web.context.ContextLoaderListener.contextInitializ
>ed
>
> > > (ContextLoaderListener.java:49)
> > >
> > > >             at
>
> com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(We
>bA
>
> > > pp.java:635)
> > >
> > > >             at
>
> com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebAp
>p.
>
> > > java:279)
> > >            at
>
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
>
> > > >             at
>
> com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.j
>av
>
> > > a:88)
> > >
> > > >             at
>
> com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.ja
>va
>
> > > > :157)
> > > >
> > > >             at
>
> com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655
>)
>
> > > >             at
>
> com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.
>ja
>
> > > > va:608)
> > > >             at
>
> com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContaine
>rI
>
> > > mpl.java:335)
> > >
> > > >             at
>
> com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerI
>mp
>
> > > l.java:551)
> > >
> > > >             at
>
> com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrIm
>pl
>
> > > > .java:1312)
> > > >             at
>
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjec
>tS
>
> > > > tart(DeployedApplicationImpl.java:1129)
> > > >             at
>
> com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleIm
>pl
>
> > > > .java:569)
> > > >             at
>
> com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApp
>li
>
> > > > cationImpl.java:814)
> > > >             at
>
> com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Appli
>ca
>
> > > > tionMgrImpl.java:965)
> > > >             at
>
> com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(App
>li
>
> > > > cationMgrImpl.java:2131)
> > > >             at
>
> com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run
>(W
>
> > > > sComponentImpl.java:341)
> > > >             at
> > > > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> > >
> > > ====================
> > > This email/fax message is for the sole use of the intended
> > > recipient(s) and may contain confidential and privileged
>
> information.
>
> > > Any unauthorized review, use, disclosure or distribution of this
> > > email/fax is prohibited. If you are not the intended recipient,
>
> please
>
> > > destroy all paper and electronic copies of the original message.
> >
> > ====================
> > This email/fax message is for the sole use of the intended
> > recipient(s) and may contain confidential and privileged
> > information. Any unauthorized review, use, disclosure or
> > distribution of this email/fax is prohibited. If you are not the
> > intended recipient, please destroy all paper and electronic copies
> > of the original message.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: CXF and WebSphere Compatibility

Posted by Jeff Yu <je...@iona.com>.
Hi, Ramanand

I know it is late to answer this question, but I just managed to get it 
work with websphere, detail please see 
http://cwiki.apache.org/confluence/display/CXF20DOC/AppServerGuide#AppServerGuide-Websphere.

Thanks
Jeff

Singh, Ramanand wrote:
> What are the correct values for these parameters? My current
> jaxp.properties is as follows:
> javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Transf
> ormerFactoryImpl
> javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto
> ryImpl
> javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document
> BuilderFactoryImpl
>
> Regards,
> Ramanand Singh
>
> -----Original Message-----
> From: Benson Margulies [mailto:bim2007@basistech.com] 
> Sent: Friday, September 21, 2007 3:12 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: CXF and WebSphere Compatibility
>
> Look at
> http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilde
> rFactory.html#newInstance().
>
> It appears that websphere does something exotic with the
> jaxp.properties. You would need your own jaxp.properties that
> reestablishes the standard Java 1.5 environment. 
>
>
>   
>> -----Original Message-----
>> From: Singh, Ramanand [mailto:RamSingh@geico.com]
>> Sent: Friday, September 21, 2007 1:47 PM
>> To: cxf-user@incubator.apache.org
>> Subject: RE: CXF and WebSphere Compatibility
>>
>> Benson,
>>
>> Do you know how to do that? If it does not work, I would have to
>>     
> choose
>   
>> different framework instead.
>>
>> Regards,
>> Ramanand Singh
>>
>> -----Original Message-----
>> From: Benson Margulies [mailto:bim2007@basistech.com]
>> Sent: Wednesday, September 19, 2007 6:18 PM
>> To: cxf-user@incubator.apache.org
>> Subject: RE: CXF and WebSphere Compatibility
>>
>> Looks like you need to fix your deployment to isolate your CXF
>> application from the wrong XML parser which seems to be in there by
>> default.
>>     
>>> -----Original Message-----
>>> From: Singh, Ramanand
>>> Sent: Wednesday, September 19, 2007 6:02 PM
>>> To: cxf-user@incubator.apache.org
>>> Subject: CXF and WebSphere Compatibility
>>>
>>> There seems that CXF is not compatible with WebSphere 6.1. I wrote a
>>>       
>> web
>>     
>>> service for my project. I tested it completely and successfully on
>>>       
>> JBOSS
>>     
>>> 4.x. However, when I deployed it on WebSphere 6.1, the deployment
>>>       
>> itself
>>     
>>> failed. I have include a portion of exception below for reference.
>>>
>>> I also saw the following JIRA on the subject:
>>>
>>> https://issues.apache.org/jira/browse/CXF-714
>>>
>>> Has anybody tested a CXF based web service on WebSphere 6.1?
>>>
>>> Regards,
>>> Ramanand Singh
>>>
>>> Exception Generated:
>>>
>>> ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
>>>
>>>       
> org.springframework.web.context.ContextLoader:initWebApplicationContext:
>   
>>> 200 - 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:
>>> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
>>> javax.xml.parsers.DocumentBuilderFactory
>>>
>>> Caused by:
>>>
>>> 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 incompatible with
>>> javax.xml.parsers.DocumentBuilderFactory
>>>
>>> Caused by:
>>>
>>> java.lang.ClassCastException:
>>> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
>>> javax.xml.parsers.DocumentBuilderFactory
>>>             at
>>> javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
>>>             at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90)
>>>             at java.util.XMLUtils.load(XMLUtils.java:72)
>>>             at java.util.Properties.loadFromXML(Properties.java:741)
>>>             at
>>>       
> org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Prope
>   
>>> rtiesLoaderUtils.java:71)
>>>             at
>>>       
> org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMana
>   
>>> gerImpl.java:209)
>>>             at
>>>
>>>       
> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97)
>   
>>>             at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>>       
> Method)
>   
>>>             at
>>>       
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
>   
>>> ccessorImpl.java:67)
>>>             at
>>>       
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
>   
>>> tructorAccessorImpl.java:45)
>>>             at
>>> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>>>             at
>>>       
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
>   
>>>             at
>>>       
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
>   
>> stantiate(SimpleInstantiationStrategy.java:61)
>>     
>>>             at
>>>       
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>   
>> tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
>>     
>>>             at
>>>       
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>   
>> tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
>>     
>>>             at
>>>       
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>   
>> tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
>>  at
>>
>>     
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
>   
>> t(AbstractBeanFactory.java:251)
>>     
>>>             at
>>>       
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
>   
>> etSingleton(DefaultSingletonBeanRegistry.java:144)
>>     
>>>             at
>>>       
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
>   
>> stractBeanFactory.java:248)
>>     
>>>             at
>>>       
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
>   
>> stractBeanFactory.java:160)
>>     
>>>             at
>>>       
> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
>   
>> InstantiateSingletons(DefaultListableBeanFactory.java:279)
>>     
>>>             at
>>>       
> org.springframework.context.support.AbstractApplicationContext.refresh(A
>   
>> bstractApplicationContext.java:360)
>>     
>>>             at
>>>       
> org.springframework.web.context.ContextLoader.createWebApplicationContex
>   
>> t(ContextLoader.java:241)
>>     
>>>             at
>>>       
> org.springframework.web.context.ContextLoader.initWebApplicationContext(
>   
>> ContextLoader.java:184)
>>     
>>>             at
>>>       
> org.springframework.web.context.ContextLoaderListener.contextInitialized
>   
>> (ContextLoaderListener.java:49)
>>     
>>>             at
>>>       
> com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebA
>   
>> pp.java:635)
>>     
>>>             at
>>>       
> com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.
>   
>> java:279)
>>            at
>>     
>>> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
>>>             at
>>>       
> com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav
>   
>> a:88)
>>     
>>>             at
>>>       
> com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java
>   
>>> :157)
>>>             at
>>>       
> com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
>   
>>>             at
>>>       
> com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja
>   
>>> va:608)
>>>             at
>>>       
> com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI
>   
>> mpl.java:335)
>>     
>>>             at
>>>       
> com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp
>   
>> l.java:551)
>>     
>>>             at
>>>       
> com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
>   
>>> .java:1312)
>>>             at
>>>       
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
>   
>>> tart(DeployedApplicationImpl.java:1129)
>>>             at
>>>       
> com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
>   
>>> .java:569)
>>>             at
>>>       
> com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
>   
>>> cationImpl.java:814)
>>>             at
>>>       
> com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
>   
>>> tionMgrImpl.java:965)
>>>             at
>>>       
> com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli
>   
>>> cationMgrImpl.java:2131)
>>>             at
>>>       
> com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W
>   
>>> sComponentImpl.java:341)
>>>             at
>>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
>>>       
>> ====================
>> This email/fax message is for the sole use of the intended
>> recipient(s) and may contain confidential and privileged information.
>> Any unauthorized review, use, disclosure or distribution of this
>> email/fax is prohibited. If you are not the intended recipient, please
>> destroy all paper and electronic copies of the original message.
>>     
> ====================
> This email/fax message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution of this
> email/fax is prohibited. If you are not the intended recipient, please
> destroy all paper and electronic copies of the original message.
>
>   

RE: CXF and WebSphere Compatibility

Posted by Benson Margulies <bi...@basistech.com>.
The complaint you are getting is that
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl, which is what is in
your jaxp.properties, is incompatible with
javax.xml.parsers.DocumentBuilderFactory.

This doesn't make much sense to me. I'm a bit rusty on the curious
behavior of webapp class loaders. But, I think, you might need to put
jars for an appropriate version of Xerces inside your webapp.

Perhaps someone else on here has a better grip?
 

> -----Original Message-----
> From: Singh, Ramanand [mailto:RamSingh@geico.com]
> Sent: Friday, September 21, 2007 4:08 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: CXF and WebSphere Compatibility
> 
> What are the correct values for these parameters? My current
> jaxp.properties is as follows:
>
javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Transf
> ormerFactoryImpl
>
javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto
> ryImpl
>
javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document
> BuilderFactoryImpl
> 
> Regards,
> Ramanand Singh
> 
> -----Original Message-----
> From: Benson Margulies [mailto:bim2007@basistech.com]
> Sent: Friday, September 21, 2007 3:12 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: CXF and WebSphere Compatibility
> 
> Look at
>
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilde
> rFactory.html#newInstance().
> 
> It appears that websphere does something exotic with the
> jaxp.properties. You would need your own jaxp.properties that
> reestablishes the standard Java 1.5 environment.
> 
> 
> > -----Original Message-----
> > From: Singh, Ramanand [mailto:RamSingh@geico.com]
> > Sent: Friday, September 21, 2007 1:47 PM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: CXF and WebSphere Compatibility
> >
> > Benson,
> >
> > Do you know how to do that? If it does not work, I would have to
> choose
> > different framework instead.
> >
> > Regards,
> > Ramanand Singh
> >
> > -----Original Message-----
> > From: Benson Margulies [mailto:bim2007@basistech.com]
> > Sent: Wednesday, September 19, 2007 6:18 PM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: CXF and WebSphere Compatibility
> >
> > Looks like you need to fix your deployment to isolate your CXF
> > application from the wrong XML parser which seems to be in there by
> > default.
> > > -----Original Message-----
> > > From: Singh, Ramanand
> > > Sent: Wednesday, September 19, 2007 6:02 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: CXF and WebSphere Compatibility
> > >
> > > There seems that CXF is not compatible with WebSphere 6.1. I wrote
a
> > web
> > > service for my project. I tested it completely and successfully on
> > JBOSS
> > > 4.x. However, when I deployed it on WebSphere 6.1, the deployment
> > itself
> > > failed. I have include a portion of exception below for reference.
> > >
> > > I also saw the following JIRA on the subject:
> > >
> > > https://issues.apache.org/jira/browse/CXF-714
> > >
> > > Has anybody tested a CXF based web service on WebSphere 6.1?
> > >
> > > Regards,
> > > Ramanand Singh
> > >
> > > Exception Generated:
> > >
> > > ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
> > >
> >
>
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> > > 200 - 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:
> > > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible
with
> > > javax.xml.parsers.DocumentBuilderFactory
> > >
> > > Caused by:
> > >
> > > 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 incompatible
with
> > > javax.xml.parsers.DocumentBuilderFactory
> > >
> > > Caused by:
> > >
> > > java.lang.ClassCastException:
> > > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible
with
> > > javax.xml.parsers.DocumentBuilderFactory
> > >             at
> > > javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown
Source)
> > >             at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90)
> > >             at java.util.XMLUtils.load(XMLUtils.java:72)
> > >             at
java.util.Properties.loadFromXML(Properties.java:741)
> > >             at
> >
>
org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Prope
> > > rtiesLoaderUtils.java:71)
> > >             at
> >
>
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMana
> > > gerImpl.java:209)
> > >             at
> > >
> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97)
> > >             at
> > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> > >             at
> >
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> > > ccessorImpl.java:67)
> > >             at
> >
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> > > tructorAccessorImpl.java:45)
> > >             at
> > > java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> > >             at
> >
>
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
> > >             at
> >
>
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> > stantiate(SimpleInstantiationStrategy.java:61)
> > >             at
> >
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
> > >             at
> >
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
> > >             at
> >
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> > tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
> >  at
> >
>
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> > t(AbstractBeanFactory.java:251)
> > >             at
> >
>
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> > etSingleton(DefaultSingletonBeanRegistry.java:144)
> > >             at
> >
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> > stractBeanFactory.java:248)
> > >             at
> >
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> > stractBeanFactory.java:160)
> > >             at
> >
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> > InstantiateSingletons(DefaultListableBeanFactory.java:279)
> > >             at
> >
>
org.springframework.context.support.AbstractApplicationContext.refresh(A
> > bstractApplicationContext.java:360)
> > >             at
> >
>
org.springframework.web.context.ContextLoader.createWebApplicationContex
> > t(ContextLoader.java:241)
> > >             at
> >
>
org.springframework.web.context.ContextLoader.initWebApplicationContext(
> > ContextLoader.java:184)
> > >             at
> >
>
org.springframework.web.context.ContextLoaderListener.contextInitialized
> > (ContextLoaderListener.java:49)
> > >             at
> >
>
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebA
> > pp.java:635)
> > >             at
> >
>
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.
> > java:279)
> >            at
> > >
com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
> > >             at
> >
>
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav
> > a:88)
> > >             at
> >
>
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java
> > > :157)
> > >             at
> >
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
> > >             at
> >
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja
> > > va:608)
> > >             at
> >
>
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI
> > mpl.java:335)
> > >             at
> >
>
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp
> > l.java:551)
> > >             at
> >
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
> > > .java:1312)
> > >             at
> >
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
> > > tart(DeployedApplicationImpl.java:1129)
> > >             at
> >
>
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
> > > .java:569)
> > >             at
> >
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
> > > cationImpl.java:814)
> > >             at
> >
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
> > > tionMgrImpl.java:965)
> > >             at
> >
>
com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli
> > > cationMgrImpl.java:2131)
> > >             at
> >
>
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W
> > > sComponentImpl.java:341)
> > >             at
> > > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> > ====================
> > This email/fax message is for the sole use of the intended
> > recipient(s) and may contain confidential and privileged
information.
> > Any unauthorized review, use, disclosure or distribution of this
> > email/fax is prohibited. If you are not the intended recipient,
please
> > destroy all paper and electronic copies of the original message.
> ====================
> This email/fax message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution of this
> email/fax is prohibited. If you are not the intended recipient, please
> destroy all paper and electronic copies of the original message.

RE: CXF and WebSphere Compatibility

Posted by "Singh, Ramanand" <Ra...@geico.com>.
What are the correct values for these parameters? My current
jaxp.properties is as follows:
javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Transf
ormerFactoryImpl
javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto
ryImpl
javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document
BuilderFactoryImpl

Regards,
Ramanand Singh

-----Original Message-----
From: Benson Margulies [mailto:bim2007@basistech.com] 
Sent: Friday, September 21, 2007 3:12 PM
To: cxf-user@incubator.apache.org
Subject: RE: CXF and WebSphere Compatibility

Look at
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilde
rFactory.html#newInstance().

It appears that websphere does something exotic with the
jaxp.properties. You would need your own jaxp.properties that
reestablishes the standard Java 1.5 environment. 


> -----Original Message-----
> From: Singh, Ramanand [mailto:RamSingh@geico.com]
> Sent: Friday, September 21, 2007 1:47 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: CXF and WebSphere Compatibility
> 
> Benson,
> 
> Do you know how to do that? If it does not work, I would have to
choose
> different framework instead.
> 
> Regards,
> Ramanand Singh
> 
> -----Original Message-----
> From: Benson Margulies [mailto:bim2007@basistech.com]
> Sent: Wednesday, September 19, 2007 6:18 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: CXF and WebSphere Compatibility
> 
> Looks like you need to fix your deployment to isolate your CXF
> application from the wrong XML parser which seems to be in there by
> default.
> > -----Original Message-----
> > From: Singh, Ramanand
> > Sent: Wednesday, September 19, 2007 6:02 PM
> > To: cxf-user@incubator.apache.org
> > Subject: CXF and WebSphere Compatibility
> >
> > There seems that CXF is not compatible with WebSphere 6.1. I wrote a
> web
> > service for my project. I tested it completely and successfully on
> JBOSS
> > 4.x. However, when I deployed it on WebSphere 6.1, the deployment
> itself
> > failed. I have include a portion of exception below for reference.
> >
> > I also saw the following JIRA on the subject:
> >
> > https://issues.apache.org/jira/browse/CXF-714
> >
> > Has anybody tested a CXF based web service on WebSphere 6.1?
> >
> > Regards,
> > Ramanand Singh
> >
> > Exception Generated:
> >
> > ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
> >
>
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> > 200 - 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:
> > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> > javax.xml.parsers.DocumentBuilderFactory
> >
> > Caused by:
> >
> > 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 incompatible with
> > javax.xml.parsers.DocumentBuilderFactory
> >
> > Caused by:
> >
> > java.lang.ClassCastException:
> > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> > javax.xml.parsers.DocumentBuilderFactory
> >             at
> > javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
> >             at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90)
> >             at java.util.XMLUtils.load(XMLUtils.java:72)
> >             at java.util.Properties.loadFromXML(Properties.java:741)
> >             at
>
org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Prope
> > rtiesLoaderUtils.java:71)
> >             at
>
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMana
> > gerImpl.java:209)
> >             at
> >
org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97)
> >             at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
> >             at
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> > ccessorImpl.java:67)
> >             at
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> > tructorAccessorImpl.java:45)
> >             at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> >             at
>
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
> >             at
>
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> stantiate(SimpleInstantiationStrategy.java:61)
> >             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
> >             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
> >             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
>  at
>
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> t(AbstractBeanFactory.java:251)
> >             at
>
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> etSingleton(DefaultSingletonBeanRegistry.java:144)
> >             at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> stractBeanFactory.java:248)
> >             at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> stractBeanFactory.java:160)
> >             at
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> InstantiateSingletons(DefaultListableBeanFactory.java:279)
> >             at
>
org.springframework.context.support.AbstractApplicationContext.refresh(A
> bstractApplicationContext.java:360)
> >             at
>
org.springframework.web.context.ContextLoader.createWebApplicationContex
> t(ContextLoader.java:241)
> >             at
>
org.springframework.web.context.ContextLoader.initWebApplicationContext(
> ContextLoader.java:184)
> >             at
>
org.springframework.web.context.ContextLoaderListener.contextInitialized
> (ContextLoaderListener.java:49)
> >             at
>
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebA
> pp.java:635)
> >             at
>
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.
> java:279)
>            at
> > com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
> >             at
>
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav
> a:88)
> >             at
>
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java
> > :157)
> >             at
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
> >             at
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja
> > va:608)
> >             at
>
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI
> mpl.java:335)
> >             at
>
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp
> l.java:551)
> >             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
> > .java:1312)
> >             at
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
> > tart(DeployedApplicationImpl.java:1129)
> >             at
>
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
> > .java:569)
> >             at
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
> > cationImpl.java:814)
> >             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
> > tionMgrImpl.java:965)
> >             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli
> > cationMgrImpl.java:2131)
> >             at
>
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W
> > sComponentImpl.java:341)
> >             at
> > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> ====================
> This email/fax message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution of this
> email/fax is prohibited. If you are not the intended recipient, please
> destroy all paper and electronic copies of the original message.
====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.

RE: CXF and WebSphere Compatibility

Posted by Benson Margulies <bi...@basistech.com>.
Look at
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilde
rFactory.html#newInstance().

It appears that websphere does something exotic with the
jaxp.properties. You would need your own jaxp.properties that
reestablishes the standard Java 1.5 environment. 


> -----Original Message-----
> From: Singh, Ramanand [mailto:RamSingh@geico.com]
> Sent: Friday, September 21, 2007 1:47 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: CXF and WebSphere Compatibility
> 
> Benson,
> 
> Do you know how to do that? If it does not work, I would have to
choose
> different framework instead.
> 
> Regards,
> Ramanand Singh
> 
> -----Original Message-----
> From: Benson Margulies [mailto:bim2007@basistech.com]
> Sent: Wednesday, September 19, 2007 6:18 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: CXF and WebSphere Compatibility
> 
> Looks like you need to fix your deployment to isolate your CXF
> application from the wrong XML parser which seems to be in there by
> default.
> > -----Original Message-----
> > From: Singh, Ramanand
> > Sent: Wednesday, September 19, 2007 6:02 PM
> > To: cxf-user@incubator.apache.org
> > Subject: CXF and WebSphere Compatibility
> >
> > There seems that CXF is not compatible with WebSphere 6.1. I wrote a
> web
> > service for my project. I tested it completely and successfully on
> JBOSS
> > 4.x. However, when I deployed it on WebSphere 6.1, the deployment
> itself
> > failed. I have include a portion of exception below for reference.
> >
> > I also saw the following JIRA on the subject:
> >
> > https://issues.apache.org/jira/browse/CXF-714
> >
> > Has anybody tested a CXF based web service on WebSphere 6.1?
> >
> > Regards,
> > Ramanand Singh
> >
> > Exception Generated:
> >
> > ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
> >
>
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> > 200 - 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:
> > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> > javax.xml.parsers.DocumentBuilderFactory
> >
> > Caused by:
> >
> > 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 incompatible with
> > javax.xml.parsers.DocumentBuilderFactory
> >
> > Caused by:
> >
> > java.lang.ClassCastException:
> > org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> > javax.xml.parsers.DocumentBuilderFactory
> >             at
> > javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
> >             at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90)
> >             at java.util.XMLUtils.load(XMLUtils.java:72)
> >             at java.util.Properties.loadFromXML(Properties.java:741)
> >             at
>
org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Prope
> > rtiesLoaderUtils.java:71)
> >             at
>
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMana
> > gerImpl.java:209)
> >             at
> >
org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97)
> >             at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
> >             at
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> > ccessorImpl.java:67)
> >             at
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> > tructorAccessorImpl.java:45)
> >             at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> >             at
>
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
> >             at
>
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> stantiate(SimpleInstantiationStrategy.java:61)
> >             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
> >             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
> >             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
>  at
>
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> t(AbstractBeanFactory.java:251)
> >             at
>
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> etSingleton(DefaultSingletonBeanRegistry.java:144)
> >             at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> stractBeanFactory.java:248)
> >             at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> stractBeanFactory.java:160)
> >             at
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> InstantiateSingletons(DefaultListableBeanFactory.java:279)
> >             at
>
org.springframework.context.support.AbstractApplicationContext.refresh(A
> bstractApplicationContext.java:360)
> >             at
>
org.springframework.web.context.ContextLoader.createWebApplicationContex
> t(ContextLoader.java:241)
> >             at
>
org.springframework.web.context.ContextLoader.initWebApplicationContext(
> ContextLoader.java:184)
> >             at
>
org.springframework.web.context.ContextLoaderListener.contextInitialized
> (ContextLoaderListener.java:49)
> >             at
>
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebA
> pp.java:635)
> >             at
>
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.
> java:279)
>            at
> > com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
> >             at
>
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav
> a:88)
> >             at
>
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java
> > :157)
> >             at
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
> >             at
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja
> > va:608)
> >             at
>
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI
> mpl.java:335)
> >             at
>
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp
> l.java:551)
> >             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
> > .java:1312)
> >             at
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
> > tart(DeployedApplicationImpl.java:1129)
> >             at
>
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
> > .java:569)
> >             at
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
> > cationImpl.java:814)
> >             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
> > tionMgrImpl.java:965)
> >             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli
> > cationMgrImpl.java:2131)
> >             at
>
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W
> > sComponentImpl.java:341)
> >             at
> > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> ====================
> This email/fax message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution of this
> email/fax is prohibited. If you are not the intended recipient, please
> destroy all paper and electronic copies of the original message.

RE: CXF and WebSphere Compatibility

Posted by "Singh, Ramanand" <Ra...@geico.com>.
Benson,

Do you know how to do that? If it does not work, I would have to choose
different framework instead.

Regards,
Ramanand Singh

-----Original Message-----
From: Benson Margulies [mailto:bim2007@basistech.com] 
Sent: Wednesday, September 19, 2007 6:18 PM
To: cxf-user@incubator.apache.org
Subject: RE: CXF and WebSphere Compatibility

Looks like you need to fix your deployment to isolate your CXF
application from the wrong XML parser which seems to be in there by
default.
> -----Original Message-----
> From: Singh, Ramanand 
> Sent: Wednesday, September 19, 2007 6:02 PM
> To: cxf-user@incubator.apache.org
> Subject: CXF and WebSphere Compatibility
> 
> There seems that CXF is not compatible with WebSphere 6.1. I wrote a
web
> service for my project. I tested it completely and successfully on
JBOSS
> 4.x. However, when I deployed it on WebSphere 6.1, the deployment
itself
> failed. I have include a portion of exception below for reference.
> 
> I also saw the following JIRA on the subject:
> 
> https://issues.apache.org/jira/browse/CXF-714
> 
> Has anybody tested a CXF based web service on WebSphere 6.1?
> 
> Regards,
> Ramanand Singh
> 
> Exception Generated:
> 
> ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
>
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> 200 - 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:
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> javax.xml.parsers.DocumentBuilderFactory
> 
> Caused by:
> 
> 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 incompatible with
> javax.xml.parsers.DocumentBuilderFactory
> 
> Caused by:
> 
> java.lang.ClassCastException:
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> javax.xml.parsers.DocumentBuilderFactory
>             at
> javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
>             at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90)
>             at java.util.XMLUtils.load(XMLUtils.java:72)
>             at java.util.Properties.loadFromXML(Properties.java:741)
>             at
org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Prope
> rtiesLoaderUtils.java:71)
>             at
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMana
> gerImpl.java:209)
>             at
> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97)
>             at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>             at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> ccessorImpl.java:67)
>             at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> tructorAccessorImpl.java:45)
>             at
> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>             at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
>             at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
stantiate(SimpleInstantiationStrategy.java:61)
>             at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
>             at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
>             at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
 at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
t(AbstractBeanFactory.java:251)
>             at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
etSingleton(DefaultSingletonBeanRegistry.java:144)
>             at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:248)
>             at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:160)
>             at
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
InstantiateSingletons(DefaultListableBeanFactory.java:279)
>             at
org.springframework.context.support.AbstractApplicationContext.refresh(A
bstractApplicationContext.java:360)
>             at
org.springframework.web.context.ContextLoader.createWebApplicationContex
t(ContextLoader.java:241)
>             at
org.springframework.web.context.ContextLoader.initWebApplicationContext(
ContextLoader.java:184)
>             at
org.springframework.web.context.ContextLoaderListener.contextInitialized
(ContextLoaderListener.java:49)
>             at
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebA
pp.java:635)
>             at
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.
java:279)
           at
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
>             at
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav
a:88)
>             at
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java
> :157)
>             at
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
>             at
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja
> va:608)
>             at
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI
mpl.java:335)
>             at
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp
l.java:551)
>             at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
> .java:1312)
>             at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
> tart(DeployedApplicationImpl.java:1129)
>             at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
> .java:569)
>             at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
> cationImpl.java:814)
>             at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
> tionMgrImpl.java:965)
>             at
com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli
> cationMgrImpl.java:2131)
>             at
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W
> sComponentImpl.java:341)
>             at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.

RE: CXF and WebSphere Compatibility

Posted by Benson Margulies <bi...@basistech.com>.
Looks like you need to fix your deployment to isolate your CXF
application from the wrong XML parser which seems to be in there by
default.
> -----Original Message-----
> From: Singh, Ramanand [mailto:RamSingh@geico.com]
> Sent: Wednesday, September 19, 2007 6:02 PM
> To: cxf-user@incubator.apache.org
> Subject: CXF and WebSphere Compatibility
> 
> There seems that CXF is not compatible with WebSphere 6.1. I wrote a
web
> service for my project. I tested it completely and successfully on
JBOSS
> 4.x. However, when I deployed it on WebSphere 6.1, the deployment
itself
> failed. I have include a portion of exception below for reference.
> 
> 
> 
> I also saw the following JIRA on the subject:
> 
> 
> 
> https://issues.apache.org/jira/browse/CXF-714
> 
> 
> 
> Has anybody tested a CXF based web service on WebSphere 6.1?
> 
> 
> 
> Regards,
> 
> Ramanand Singh
> 
> Architecture Team
> 
> GEICO IBU Service
> 
> 301.986.2791
> 
> 
> 
> Exception Generated:
> 
> 
> 
> ----- 2007-09-18 16:55:31,801 [server.startup : 1] [] ERROR
>
org.springframework.web.context.ContextLoader:initWebApplicationContext:
> 200 - 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:
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> javax.xml.parsers.DocumentBuilderFactory
> 
> Caused by:
> 
> 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 incompatible with
> javax.xml.parsers.DocumentBuilderFactory
> 
> Caused by:
> 
> java.lang.ClassCastException:
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with
> javax.xml.parsers.DocumentBuilderFactory
> 
>             at
> javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
> 
>             at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:90)
> 
>             at java.util.XMLUtils.load(XMLUtils.java:72)
> 
>             at java.util.Properties.loadFromXML(Properties.java:741)
> 
>             at
>
org.apache.cxf.common.util.PropertiesLoaderUtils.loadAllProperties(Prope
> rtiesLoaderUtils.java:71)
> 
>             at
>
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLMana
> gerImpl.java:209)
> 
>             at
> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:97)
> 
>             at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 
>             at
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> ccessorImpl.java:67)
> 
>             at
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> tructorAccessorImpl.java:45)
> 
>             at
> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> 
>             at
>
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
> 
>             at
>
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
> stantiate(SimpleInstantiationStrategy.java:61)
> 
>             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
> 
>             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
> 
>             at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
> 
>             at
>
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
> t(AbstractBeanFactory.java:251)
> 
>             at
>
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
> etSingleton(DefaultSingletonBeanRegistry.java:144)
> 
>             at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> stractBeanFactory.java:248)
> 
>             at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
> stractBeanFactory.java:160)
> 
>             at
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
> InstantiateSingletons(DefaultListableBeanFactory.java:279)
> 
>             at
>
org.springframework.context.support.AbstractApplicationContext.refresh(A
> bstractApplicationContext.java:360)
> 
>             at
>
org.springframework.web.context.ContextLoader.createWebApplicationContex
> t(ContextLoader.java:241)
> 
>             at
>
org.springframework.web.context.ContextLoader.initWebApplicationContext(
> ContextLoader.java:184)
> 
>             at
>
org.springframework.web.context.ContextLoaderListener.contextInitialized
> (ContextLoaderListener.java:49)
> 
>             at
>
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebA
> pp.java:635)
> 
>             at
>
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.
> java:279)
> 
>             at
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:283)
> 
>             at
>
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav
> a:88)
> 
>             at
>
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java
> :157)
> 
>             at
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
> 
>             at
>
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja
> va:608)
> 
>             at
>
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI
> mpl.java:335)
> 
>             at
>
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp
> l.java:551)
> 
>             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
> .java:1312)
> 
>             at
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
> tart(DeployedApplicationImpl.java:1129)
> 
>             at
>
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
> .java:569)
> 
>             at
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
> cationImpl.java:814)
> 
>             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
> tionMgrImpl.java:965)
> 
>             at
>
com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli
> cationMgrImpl.java:2131)
> 
>             at
>
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W
> sComponentImpl.java:341)
> 
>             at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> 
> ====================
> This email/fax message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution of this
> email/fax is prohibited. If you are not the intended recipient, please
> destroy all paper and electronic copies of the original message.