You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Glen Mazza <gl...@gmail.com> on 2008/06/11 01:29:13 UTC

Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType

Hello, 

I'm having a terrible time trying to load an CXF-based web service provider
(in an EAR) to WebLogic 10.0.  This web service runs fine as a WAR on
Tomcat.  Relevant portions of the stack trace are below.  WebLogic
continually complains "ClassCastException: interface
org.xmlsoap.schemas.wsdl.http.AddressType"--this interface is in XMLBeans. I
guess the problem is that WebLogic is loading an older version of XMLBeans
than the 2.3 required by CXF.  I'm guessing that because when I explicitly
load an old version of XMLBeans (1.0) into Tomcat, I get a very similar
error.

I've tried manually placing the XMLBeans-2.3.0 jar in the WAR's WEB-INF/lib
folder, as well as a lib/ directory within the EAR (after updating the
classpath in the WAR manifest to point to that directory).  No luck
though--it is either not detecting the 2.3 JAR or I'm on the wrong track,
and something else is the problem.

For the weblogic-application.xml, I've placed all the possible
prefer-application-packages values I've seen others do:

	<prefer-application-packages>
		<package-name>javax.jws.*</package-name>
		<package-name>org.apache.xerces.*</package-name>
		<package-name>org.apache.xalan.*</package-name>
		<package-name>com.ctc.wstx.*</package-name>
		<package-name>org.springframework.*</package-name>
		<package-name>org.apache.xmlbeans.*</package-name>		
	</prefer-application-packages>

Does anyone have a clue what the problem might be?

Thanks,
Glen


<<WLS Kernel>> <> <> <1213138566713> <BEA-149078> <Stack trace for message
149004
weblogic.application.ModuleException: [HTTP:101216]Servlet: "WebServicePort"
failed to preload on startup in Web application: "doubleit".
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: interface
org.xmlsoap.schemas.wsdl.http.AddressType
	at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
	at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
	at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
	at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
	at
org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:99)
	at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:64)
	at
org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:86)
	at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:282)
	at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(Unknown Source)
	at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:63)
	at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)


Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class
path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested
exception is org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor
threw exception; nested exception is java.lang.ClassCastException: interface
org.xmlsoap.schemas.wsdl.http.AddressType
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
	at
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:86)
	at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)


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: interface
org.xmlsoap.schemas.wsdl.http.AddressType
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
	at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
	... 56 more
Caused by: java.lang.ClassCastException: interface
org.xmlsoap.schemas.wsdl.http.AddressType
	at java.lang.Class.asSubclass(Class.java:2979)
	at
org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:64)
	at
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:231)
	at org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:104)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

-- 
View this message in context: http://www.nabble.com/Problem-with-WebLogic-and-org.xmlsoap.schemas.wsdl.http.AddressType-tp17767027p17767027.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType

Posted by Glen Mazza <gl...@gmail.com>.
Oh--that explains it.  I did not realize those were generated classes. 
Anyway, I think that xmlsoap namespace refers to old Celtix stuff that few
if anyone are using externally, correct?  If so, we may not need to bother
with jaxb binding files (although that will also work), we can just directly
change the namespace to a CXF one, like I had done last year pre-committer
with some XFIRE uri's.

Glen


dkulp wrote:
> 
> Glen,
> 
> I think they are used when parsing some various things from the  
> wsdl.    That said, we should be using an jaxb binding file to  
> generate these things into the org/apache/cxf namespace someplace.    
> Likewise for the stuff we're generating into org/w3/_2006/_05/ 
> addressing/wsdl.
> 
> As part of my "osgi bundle audit" stuff I've been doing the last  
> couple days, I also noticed we have:
> 
> org/w3/_2006/_05/addressing/wsdl/ObjectFactory.class
> org/w3/_2006/_05/addressing/wsdl/package-info.class
> org/w3/_2006/_05/addressing/wsdl/UsingAddressing.class
> org/xmlsoap/schemas/wsdl/http/AddressType.class
> org/xmlsoap/schemas/wsdl/http/BindingType.class
> org/xmlsoap/schemas/wsdl/http/ObjectFactory.class
> org/xmlsoap/schemas/wsdl/http/OperationType.class
> org/xmlsoap/schemas/wsdl/http/package-info.class
> org/xmlsoap/schemas/wsdl/http/UrlEncoded.class
> org/xmlsoap/schemas/wsdl/http/UrlReplacement.class
> 
> outside the org.apache.cxf namespace.   We need to get those fixed.    
> (we also have some org.codehaus stuff for aegis, but that's for  
> compatibility/migration reasons)
> 
> 
> Dan
> 
> 
> 
> 
> 
> On Jun 10, 2008, at 10:26 PM, Glen Mazza wrote:
> 
>> Actually, let me take a step back--I don't think
>> "org.xmlsoap.schemas.wsdl.http.AddressType" is in XMLBeans anymore (if
>> it ever was)--I thought it was there because of [1].  This might
>> actually be an obsolete class from the old Celtix[2]--one that is no
>> longer needed by CXF anyway.
>>
>> CXF team, in the interest of being able to run CXF 2.1 on WebLogic  
>> 10.0
>> (or at least without this headache), can we remove references to the
>> "org.xmlsoap.schemas.wsdl.http" package--it is getting extremely scant
>> usage--in TExtensibilityElement, HTTPAddressPlugin, and
>> AbstractHTTPTransportFactory (and the test class
>> LocalTransportFactoryTest)--and it doesn't appear to be of much (if  
>> any)
>> use where it is being used.
>>
>> Thanks,
>> Glen
>>
>> [1]
>> http://javacio.us/subscribers/classes/org.xmlsoap.schemas.wsdl.http.AddressType
>> [2]
>> http://archive.xfire.codehaus.org/user/43172167.8080604%
>> 40envoisolutions.com
>>
>>
>>
>>
>> 2008-06-10 Glen Mazza wrote:
>>> Hello,
>>>
>>> I'm having a terrible time trying to load an CXF-based web service  
>>> provider
>>> (in an EAR) to WebLogic 10.0.  This web service runs fine as a WAR on
>>> Tomcat.  Relevant portions of the stack trace are below.  WebLogic
>>> continually complains "ClassCastException: interface
>>> org.xmlsoap.schemas.wsdl.http.AddressType"--this interface is in  
>>> XMLBeans. I
>>> guess the problem is that WebLogic is loading an older version of  
>>> XMLBeans
>>> than the 2.3 required by CXF.  I'm guessing that because when I  
>>> explicitly
>>> load an old version of XMLBeans (1.0) into Tomcat, I get a very  
>>> similar
>>> error.
>>>
>>> I've tried manually placing the XMLBeans-2.3.0 jar in the WAR's WEB- 
>>> INF/lib
>>> folder, as well as a lib/ directory within the EAR (after updating  
>>> the
>>> classpath in the WAR manifest to point to that directory).  No luck
>>> though--it is either not detecting the 2.3 JAR or I'm on the wrong  
>>> track,
>>> and something else is the problem.
>>>
>>> For the weblogic-application.xml, I've placed all the possible
>>> prefer-application-packages values I've seen others do:
>>>
>>> 	<prefer-application-packages>
>>> 		<package-name>javax.jws.*</package-name>
>>> 		<package-name>org.apache.xerces.*</package-name>
>>> 		<package-name>org.apache.xalan.*</package-name>
>>> 		<package-name>com.ctc.wstx.*</package-name>
>>> 		<package-name>org.springframework.*</package-name>
>>> 		<package-name>org.apache.xmlbeans.*</package-name>		
>>> 	</prefer-application-packages>
>>>
>>> Does anyone have a clue what the problem might be?
>>>
>>> Thanks,
>>> Glen
>>>
>>>
>>> <<WLS Kernel>> <> <> <1213138566713> <BEA-149078> <Stack trace for  
>>> message
>>> 149004
>>> weblogic.application.ModuleException: [HTTP:101216]Servlet:  
>>> "WebServicePort"
>>> failed to preload on startup in Web application: "doubleit".
>>> 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:  
>>> interface
>>> org.xmlsoap.schemas.wsdl.http.AddressType
>>> 	at
>>> org 
>>> .apache 
>>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:99)
>>> 	at  
>>> org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java: 
>>> 64)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf 
>>> .transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java: 
>>> 86)
>>> 	at
>>> weblogic.servlet.internal.StubSecurityHelper 
>>> $ServletInitAction.run(StubSecurityHelper.java:282)
>>> 	at
>>> weblogic 
>>> .security 
>>> .acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java: 
>>> 321)
>>> 	at weblogic.security.service.SecurityManager.runAs(Unknown Source)
>>> 	at
>>> weblogic 
>>> .servlet 
>>> .internal.StubSecurityHelper.createServlet(StubSecurityHelper.java: 
>>> 63)
>>> 	at
>>> weblogic 
>>> .servlet 
>>> .internal 
>>> .StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
>>>
>>>
>>> Caused by: org.springframework.beans.factory.BeanCreationException:  
>>> Error
>>> creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined  
>>> in class
>>> path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed;  
>>> nested
>>> exception is org.springframework.beans.BeanInstantiationException:  
>>> Could not
>>> instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:  
>>> Constructor
>>> threw exception; nested exception is java.lang.ClassCastException:  
>>> interface
>>> org.xmlsoap.schemas.wsdl.http.AddressType
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .createBean(AbstractAutowireCapableBeanFactory.java:451)
>>> 	at
>>> org.springframework.beans.factory.support.AbstractBeanFactory 
>>> $1.getObject(AbstractBeanFactory.java:249)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .DefaultSingletonBeanRegistry 
>>> .getSingleton(DefaultSingletonBeanRegistry.java:155)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .DefaultListableBeanFactory 
>>> .preInstantiateSingletons(DefaultListableBeanFactory.java:291)
>>> 	at
>>> org 
>>> .springframework 
>>> .context 
>>> .support 
>>> .AbstractApplicationContext.refresh(AbstractApplicationContext.java: 
>>> 352)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf 
>>> .bus.spring.BusApplicationContext.<init>(BusApplicationContext.java: 
>>> 86)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
>>>
>>>
>>> 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:  
>>> interface
>>> org.xmlsoap.schemas.wsdl.http.AddressType
>>> 	at  
>>> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java: 
>>> 100)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .SimpleInstantiationStrategy 
>>> .instantiate(SimpleInstantiationStrategy.java:61)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
>>> 	at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .createBean(AbstractAutowireCapableBeanFactory.java:386)
>>> 	... 56 more
>>> Caused by: java.lang.ClassCastException: interface
>>> org.xmlsoap.schemas.wsdl.http.AddressType
>>> 	at java.lang.Class.asSubclass(Class.java:2979)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf 
>>> .wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:64)
>>> 	at
>>> org 
>>> .apache 
>>> .cxf 
>>> .wsdl11 
>>> .WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:231)
>>> 	at  
>>> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java: 
>>> 104)
>>> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
>>> Method)
>>> 	at
>>> sun 
>>> .reflect 
>>> .NativeConstructorAccessorImpl 
>>> .newInstance(NativeConstructorAccessorImpl.java:39)
>>>
>>
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-WebLogic-and-org.xmlsoap.schemas.wsdl.http.AddressType-tp17767027p17790107.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType

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

Glen,

I think they are used when parsing some various things from the  
wsdl.    That said, we should be using an jaxb binding file to  
generate these things into the org/apache/cxf namespace someplace.    
Likewise for the stuff we're generating into org/w3/_2006/_05/ 
addressing/wsdl.

As part of my "osgi bundle audit" stuff I've been doing the last  
couple days, I also noticed we have:

org/w3/_2006/_05/addressing/wsdl/ObjectFactory.class
org/w3/_2006/_05/addressing/wsdl/package-info.class
org/w3/_2006/_05/addressing/wsdl/UsingAddressing.class
org/xmlsoap/schemas/wsdl/http/AddressType.class
org/xmlsoap/schemas/wsdl/http/BindingType.class
org/xmlsoap/schemas/wsdl/http/ObjectFactory.class
org/xmlsoap/schemas/wsdl/http/OperationType.class
org/xmlsoap/schemas/wsdl/http/package-info.class
org/xmlsoap/schemas/wsdl/http/UrlEncoded.class
org/xmlsoap/schemas/wsdl/http/UrlReplacement.class

outside the org.apache.cxf namespace.   We need to get those fixed.    
(we also have some org.codehaus stuff for aegis, but that's for  
compatibility/migration reasons)


Dan





On Jun 10, 2008, at 10:26 PM, Glen Mazza wrote:

> Actually, let me take a step back--I don't think
> "org.xmlsoap.schemas.wsdl.http.AddressType" is in XMLBeans anymore (if
> it ever was)--I thought it was there because of [1].  This might
> actually be an obsolete class from the old Celtix[2]--one that is no
> longer needed by CXF anyway.
>
> CXF team, in the interest of being able to run CXF 2.1 on WebLogic  
> 10.0
> (or at least without this headache), can we remove references to the
> "org.xmlsoap.schemas.wsdl.http" package--it is getting extremely scant
> usage--in TExtensibilityElement, HTTPAddressPlugin, and
> AbstractHTTPTransportFactory (and the test class
> LocalTransportFactoryTest)--and it doesn't appear to be of much (if  
> any)
> use where it is being used.
>
> Thanks,
> Glen
>
> [1]
> http://javacio.us/subscribers/classes/org.xmlsoap.schemas.wsdl.http.AddressType
> [2]
> http://archive.xfire.codehaus.org/user/43172167.8080604%
> 40envoisolutions.com
>
>
>
>
> 2008-06-10 Glen Mazza wrote:
>> Hello,
>>
>> I'm having a terrible time trying to load an CXF-based web service  
>> provider
>> (in an EAR) to WebLogic 10.0.  This web service runs fine as a WAR on
>> Tomcat.  Relevant portions of the stack trace are below.  WebLogic
>> continually complains "ClassCastException: interface
>> org.xmlsoap.schemas.wsdl.http.AddressType"--this interface is in  
>> XMLBeans. I
>> guess the problem is that WebLogic is loading an older version of  
>> XMLBeans
>> than the 2.3 required by CXF.  I'm guessing that because when I  
>> explicitly
>> load an old version of XMLBeans (1.0) into Tomcat, I get a very  
>> similar
>> error.
>>
>> I've tried manually placing the XMLBeans-2.3.0 jar in the WAR's WEB- 
>> INF/lib
>> folder, as well as a lib/ directory within the EAR (after updating  
>> the
>> classpath in the WAR manifest to point to that directory).  No luck
>> though--it is either not detecting the 2.3 JAR or I'm on the wrong  
>> track,
>> and something else is the problem.
>>
>> For the weblogic-application.xml, I've placed all the possible
>> prefer-application-packages values I've seen others do:
>>
>> 	<prefer-application-packages>
>> 		<package-name>javax.jws.*</package-name>
>> 		<package-name>org.apache.xerces.*</package-name>
>> 		<package-name>org.apache.xalan.*</package-name>
>> 		<package-name>com.ctc.wstx.*</package-name>
>> 		<package-name>org.springframework.*</package-name>
>> 		<package-name>org.apache.xmlbeans.*</package-name>		
>> 	</prefer-application-packages>
>>
>> Does anyone have a clue what the problem might be?
>>
>> Thanks,
>> Glen
>>
>>
>> <<WLS Kernel>> <> <> <1213138566713> <BEA-149078> <Stack trace for  
>> message
>> 149004
>> weblogic.application.ModuleException: [HTTP:101216]Servlet:  
>> "WebServicePort"
>> failed to preload on startup in Web application: "doubleit".
>> 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:  
>> interface
>> org.xmlsoap.schemas.wsdl.http.AddressType
>> 	at
>> org 
>> .apache 
>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
>> 	at
>> org 
>> .apache 
>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
>> 	at
>> org 
>> .apache 
>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
>> 	at
>> org 
>> .apache 
>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
>> 	at
>> org 
>> .apache 
>> .cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:99)
>> 	at  
>> org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java: 
>> 64)
>> 	at
>> org 
>> .apache 
>> .cxf 
>> .transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java: 
>> 86)
>> 	at
>> weblogic.servlet.internal.StubSecurityHelper 
>> $ServletInitAction.run(StubSecurityHelper.java:282)
>> 	at
>> weblogic 
>> .security 
>> .acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java: 
>> 321)
>> 	at weblogic.security.service.SecurityManager.runAs(Unknown Source)
>> 	at
>> weblogic 
>> .servlet 
>> .internal.StubSecurityHelper.createServlet(StubSecurityHelper.java: 
>> 63)
>> 	at
>> weblogic 
>> .servlet 
>> .internal 
>> .StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
>>
>>
>> Caused by: org.springframework.beans.factory.BeanCreationException:  
>> Error
>> creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined  
>> in class
>> path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed;  
>> nested
>> exception is org.springframework.beans.BeanInstantiationException:  
>> Could not
>> instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:  
>> Constructor
>> threw exception; nested exception is java.lang.ClassCastException:  
>> interface
>> org.xmlsoap.schemas.wsdl.http.AddressType
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .AbstractAutowireCapableBeanFactory 
>> .createBean(AbstractAutowireCapableBeanFactory.java:451)
>> 	at
>> org.springframework.beans.factory.support.AbstractBeanFactory 
>> $1.getObject(AbstractBeanFactory.java:249)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .DefaultSingletonBeanRegistry 
>> .getSingleton(DefaultSingletonBeanRegistry.java:155)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .DefaultListableBeanFactory 
>> .preInstantiateSingletons(DefaultListableBeanFactory.java:291)
>> 	at
>> org 
>> .springframework 
>> .context 
>> .support 
>> .AbstractApplicationContext.refresh(AbstractApplicationContext.java: 
>> 352)
>> 	at
>> org 
>> .apache 
>> .cxf 
>> .bus.spring.BusApplicationContext.<init>(BusApplicationContext.java: 
>> 86)
>> 	at
>> org 
>> .apache 
>> .cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
>>
>>
>> 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:  
>> interface
>> org.xmlsoap.schemas.wsdl.http.AddressType
>> 	at  
>> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java: 
>> 100)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .SimpleInstantiationStrategy 
>> .instantiate(SimpleInstantiationStrategy.java:61)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .AbstractAutowireCapableBeanFactory 
>> .instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .AbstractAutowireCapableBeanFactory 
>> .createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
>> 	at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .AbstractAutowireCapableBeanFactory 
>> .createBean(AbstractAutowireCapableBeanFactory.java:386)
>> 	... 56 more
>> Caused by: java.lang.ClassCastException: interface
>> org.xmlsoap.schemas.wsdl.http.AddressType
>> 	at java.lang.Class.asSubclass(Class.java:2979)
>> 	at
>> org 
>> .apache 
>> .cxf 
>> .wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:64)
>> 	at
>> org 
>> .apache 
>> .cxf 
>> .wsdl11 
>> .WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:231)
>> 	at  
>> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java: 
>> 104)
>> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
>> Method)
>> 	at
>> sun 
>> .reflect 
>> .NativeConstructorAccessorImpl 
>> .newInstance(NativeConstructorAccessorImpl.java:39)
>>
>

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





Re: Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType

Posted by Glen Mazza <gl...@verizon.net>.
Actually, let me take a step back--I don't think
"org.xmlsoap.schemas.wsdl.http.AddressType" is in XMLBeans anymore (if
it ever was)--I thought it was there because of [1].  This might
actually be an obsolete class from the old Celtix[2]--one that is no
longer needed by CXF anyway.

CXF team, in the interest of being able to run CXF 2.1 on WebLogic 10.0
(or at least without this headache), can we remove references to the
"org.xmlsoap.schemas.wsdl.http" package--it is getting extremely scant
usage--in TExtensibilityElement, HTTPAddressPlugin, and
AbstractHTTPTransportFactory (and the test class
LocalTransportFactoryTest)--and it doesn't appear to be of much (if any)
use where it is being used.

Thanks,
Glen

[1]
http://javacio.us/subscribers/classes/org.xmlsoap.schemas.wsdl.http.AddressType
[2]
http://archive.xfire.codehaus.org/user/43172167.8080604%
40envoisolutions.com




2008-06-10 Glen Mazza wrote:
> Hello, 
> 
> I'm having a terrible time trying to load an CXF-based web service provider
> (in an EAR) to WebLogic 10.0.  This web service runs fine as a WAR on
> Tomcat.  Relevant portions of the stack trace are below.  WebLogic
> continually complains "ClassCastException: interface
> org.xmlsoap.schemas.wsdl.http.AddressType"--this interface is in XMLBeans. I
> guess the problem is that WebLogic is loading an older version of XMLBeans
> than the 2.3 required by CXF.  I'm guessing that because when I explicitly
> load an old version of XMLBeans (1.0) into Tomcat, I get a very similar
> error.
> 
> I've tried manually placing the XMLBeans-2.3.0 jar in the WAR's WEB-INF/lib
> folder, as well as a lib/ directory within the EAR (after updating the
> classpath in the WAR manifest to point to that directory).  No luck
> though--it is either not detecting the 2.3 JAR or I'm on the wrong track,
> and something else is the problem.
> 
> For the weblogic-application.xml, I've placed all the possible
> prefer-application-packages values I've seen others do:
> 
> 	<prefer-application-packages>
> 		<package-name>javax.jws.*</package-name>
> 		<package-name>org.apache.xerces.*</package-name>
> 		<package-name>org.apache.xalan.*</package-name>
> 		<package-name>com.ctc.wstx.*</package-name>
> 		<package-name>org.springframework.*</package-name>
> 		<package-name>org.apache.xmlbeans.*</package-name>		
> 	</prefer-application-packages>
> 
> Does anyone have a clue what the problem might be?
> 
> Thanks,
> Glen
> 
> 
> <<WLS Kernel>> <> <> <1213138566713> <BEA-149078> <Stack trace for message
> 149004
> weblogic.application.ModuleException: [HTTP:101216]Servlet: "WebServicePort"
> failed to preload on startup in Web application: "doubleit".
> 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: interface
> org.xmlsoap.schemas.wsdl.http.AddressType
> 	at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
> 	at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
> 	at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
> 	at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
> 	at
> org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:99)
> 	at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:64)
> 	at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:86)
> 	at
> weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:282)
> 	at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> 	at weblogic.security.service.SecurityManager.runAs(Unknown Source)
> 	at
> weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:63)
> 	at
> weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
> 
> 
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class
> path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested
> exception is org.springframework.beans.BeanInstantiationException: Could not
> instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor
> threw exception; nested exception is java.lang.ClassCastException: interface
> org.xmlsoap.schemas.wsdl.http.AddressType
> 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
> 	at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
> 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
> 	at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
> 	at
> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:86)
> 	at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
> 
> 
> 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: interface
> org.xmlsoap.schemas.wsdl.http.AddressType
> 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
> 	at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
> 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
> 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
> 	at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
> 	... 56 more
> Caused by: java.lang.ClassCastException: interface
> org.xmlsoap.schemas.wsdl.http.AddressType
> 	at java.lang.Class.asSubclass(Class.java:2979)
> 	at
> org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:64)
> 	at
> org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:231)
> 	at org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:104)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 


Re: Antwort: Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType [Virus checked]

Posted by Glen Mazza <gl...@gmail.com>.
Thanks Jano.  Good news!  It works on BEA now--all I needed to do was add
<package-name>org.xmlsoap.schemas.wsdl.*</package-name> to
<prefer-application-packages> of my weblogic-application.xml file.  That is
apparently BEA's alternative to having separate classloaders[1].  I'll
update our docs on this.

In general, then, whenever BEA is complaining about a particular library
when trying to activate an EAR, all you need to do is add its package name
to the prefer-application-packages section of the config file.  That will
cause it to read the EAR's version of that library rather than BEA's.

(Though I would still like the CXF team to pipe up if this
package--org.xmlsoap.schemas.wsdl.http--is still meaningful within CXF; I'll
happily remove it otherwise.  I wouldn't want to keep things in that are
actually not serving a useful purpose.)

Regards,
Glen

[1] http://forums.bea.com/thread.jspa?threadID=570001292


jan.minaroviech wrote:
> 
> Hi Glen,
> 
> i had lots of class cast exceptions like this on different classes with 
> jboss.
> Solution was to create a separate classloader for EAR (it's not by 
> default). I did it be attaching jboss-application.xml to EAR. Hopefully 
> there is something similar in weblogic.
> And of course, i have all dependencies in my EAR (it has 20MB).
> 
> And also it's possible in jboss (or tomcat) to setup, if it should first 
> try to load classes from EAR(WAR) or first from JMV libs. I set it to 
> these from EAR first.
> 
> best regards
> jano
> 
> 
> 
> 
> Glen Mazza <gl...@gmail.com> 
> 06/11/2008 01:29
> Bitte antworten an
> users@cxf.apache.org
> 
> 
> An
> users@cxf.apache.org
> Kopie
> 
> Thema
> Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType [Virus 
> checked]
> 
> 
> 
> 
> 
> 
> 
> Hello, 
> 
> I'm having a terrible time trying to load an CXF-based web service 
> provider
> (in an EAR) to WebLogic 10.0.  This web service runs fine as a WAR on
> Tomcat.  Relevant portions of the stack trace are below.  WebLogic
> continually complains "ClassCastException: interface
> org.xmlsoap.schemas.wsdl.http.AddressType"--this interface is in XMLBeans. 
> I
> guess the problem is that WebLogic is loading an older version of XMLBeans
> than the 2.3 required by CXF.  I'm guessing that because when I explicitly
> load an old version of XMLBeans (1.0) into Tomcat, I get a very similar
> error.
> 
> I've tried manually placing the XMLBeans-2.3.0 jar in the WAR's 
> WEB-INF/lib
> folder, as well as a lib/ directory within the EAR (after updating the
> classpath in the WAR manifest to point to that directory).  No luck
> though--it is either not detecting the 2.3 JAR or I'm on the wrong track,
> and something else is the problem.
> 
> For the weblogic-application.xml, I've placed all the possible
> prefer-application-packages values I've seen others do:
> 
>                  <prefer-application-packages>
>                                  <package-name>javax.jws.*</package-name>
>  <package-name>org.apache.xerces.*</package-name>
>  <package-name>org.apache.xalan.*</package-name>
>  <package-name>com.ctc.wstx.*</package-name>
>  <package-name>org.springframework.*</package-name>
>  <package-name>org.apache.xmlbeans.*</package-name>  
>                  </prefer-application-packages>
> 
> Does anyone have a clue what the problem might be?
> 
> Thanks,
> Glen
> 
> 
> <<WLS Kernel>> <> <> <1213138566713> <BEA-149078> <Stack trace for message
> 149004
> weblogic.application.ModuleException: [HTTP:101216]Servlet: 
> "WebServicePort"
> failed to preload on startup in Web application: "doubleit".
> 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: interface
> org.xmlsoap.schemas.wsdl.http.AddressType
>                  at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
>                  at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
>                  at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
>                  at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
>                  at
> org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:99)
>                  at 
> org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:64)
>                  at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:86)
>                  at
> weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:282)
>                  at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>                  at 
> weblogic.security.service.SecurityManager.runAs(Unknown Source)
>                  at
> weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:63)
>                  at
> weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
> 
> 
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class
> path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested
> exception is org.springframework.beans.BeanInstantiationException: Could 
> not
> instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: 
> Constructor
> threw exception; nested exception is java.lang.ClassCastException: 
> interface
> org.xmlsoap.schemas.wsdl.http.AddressType
>                  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
>                  at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>                  at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>                  at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>                  at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>                  at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
>                  at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>                  at
> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:86)
>                  at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
> 
> 
> 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: 
> interface
> org.xmlsoap.schemas.wsdl.http.AddressType
>                  at 
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
>                  at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
>                  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
>                  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
>                  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
>                  ... 56 more
> Caused by: java.lang.ClassCastException: interface
> org.xmlsoap.schemas.wsdl.http.AddressType
>                  at java.lang.Class.asSubclass(Class.java:2979)
>                  at
> org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:64)
>                  at
> org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:231)
>                  at 
> org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:104)
>                  at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>                  at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Problem-with-WebLogic-and-org.xmlsoap.schemas.wsdl.http.AddressType-tp17767027p17767027.html
> 
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-WebLogic-and-org.xmlsoap.schemas.wsdl.http.AddressType-tp17767027p17781745.html
Sent from the cxf-user mailing list archive at Nabble.com.


Antwort: Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType [Virus checked]

Posted by ja...@external.t-mobile.at.
Hi Glen,

i had lots of class cast exceptions like this on different classes with 
jboss.
Solution was to create a separate classloader for EAR (it's not by 
default). I did it be attaching jboss-application.xml to EAR. Hopefully 
there is something similar in weblogic.
And of course, i have all dependencies in my EAR (it has 20MB).

And also it's possible in jboss (or tomcat) to setup, if it should first 
try to load classes from EAR(WAR) or first from JMV libs. I set it to 
these from EAR first.

best regards
jano




Glen Mazza <gl...@gmail.com> 
06/11/2008 01:29
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Problem with WebLogic and org.xmlsoap.schemas.wsdl.http.AddressType [Virus 
checked]







Hello, 

I'm having a terrible time trying to load an CXF-based web service 
provider
(in an EAR) to WebLogic 10.0.  This web service runs fine as a WAR on
Tomcat.  Relevant portions of the stack trace are below.  WebLogic
continually complains "ClassCastException: interface
org.xmlsoap.schemas.wsdl.http.AddressType"--this interface is in XMLBeans. 
I
guess the problem is that WebLogic is loading an older version of XMLBeans
than the 2.3 required by CXF.  I'm guessing that because when I explicitly
load an old version of XMLBeans (1.0) into Tomcat, I get a very similar
error.

I've tried manually placing the XMLBeans-2.3.0 jar in the WAR's 
WEB-INF/lib
folder, as well as a lib/ directory within the EAR (after updating the
classpath in the WAR manifest to point to that directory).  No luck
though--it is either not detecting the 2.3 JAR or I'm on the wrong track,
and something else is the problem.

For the weblogic-application.xml, I've placed all the possible
prefer-application-packages values I've seen others do:

                 <prefer-application-packages>
                                 <package-name>javax.jws.*</package-name>
 <package-name>org.apache.xerces.*</package-name>
 <package-name>org.apache.xalan.*</package-name>
 <package-name>com.ctc.wstx.*</package-name>
 <package-name>org.springframework.*</package-name>
 <package-name>org.apache.xmlbeans.*</package-name>  
                 </prefer-application-packages>

Does anyone have a clue what the problem might be?

Thanks,
Glen


<<WLS Kernel>> <> <> <1213138566713> <BEA-149078> <Stack trace for message
149004
weblogic.application.ModuleException: [HTTP:101216]Servlet: 
"WebServicePort"
failed to preload on startup in Web application: "doubleit".
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: interface
org.xmlsoap.schemas.wsdl.http.AddressType
                 at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
                 at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
                 at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
                 at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
                 at
org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:99)
                 at 
org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:64)
                 at
org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:86)
                 at
weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:282)
                 at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                 at 
weblogic.security.service.SecurityManager.runAs(Unknown Source)
                 at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:63)
                 at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)


Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class
path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested
exception is org.springframework.beans.BeanInstantiationException: Could 
not
instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: 
Constructor
threw exception; nested exception is java.lang.ClassCastException: 
interface
org.xmlsoap.schemas.wsdl.http.AddressType
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
                 at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
                 at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
                 at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
                 at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
                 at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
                 at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
                 at
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:86)
                 at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)


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: 
interface
org.xmlsoap.schemas.wsdl.http.AddressType
                 at 
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
                 at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
                 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
                 ... 56 more
Caused by: java.lang.ClassCastException: interface
org.xmlsoap.schemas.wsdl.http.AddressType
                 at java.lang.Class.asSubclass(Class.java:2979)
                 at
org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:64)
                 at
org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:231)
                 at 
org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:104)
                 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

-- 
View this message in context: 
http://www.nabble.com/Problem-with-WebLogic-and-org.xmlsoap.schemas.wsdl.http.AddressType-tp17767027p17767027.html

Sent from the cxf-user mailing list archive at Nabble.com.