You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by jeet <na...@gmail.com> on 2008/09/02 23:39:12 UTC

Schema name conflict in collection ERROR

Using cxf 2.1.2 and maven I have generated the java classes from a wsdl. But
when I deploy the war to Tomcat I am getting the following error:

INFO: Initializing Spring root WebApplicationContext
Sep 2, 2008 4:59:23 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'riskDataService': Invocation of init method failed; nested
exception is javax.xml.ws.WebServiceException:
org.apache.ws.commons.schema.XmlSchemaException: Schema name conflict in
collection. Namespace: http://chemicalsriskdataservice.mydomain.com/
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
	at 
..
...
....

After generating the classes I did move some of the classes to different
packages. Could this be related to JIRA defect CXF-1624 or am I doing
something wrong?


-- 
View this message in context: http://www.nabble.com/Schema-name-conflict-in-collection-ERROR-tp19278966p19278966.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Schema name conflict in collection ERROR (resolved)

Posted by Will Gomes <wg...@umd.edu>.
Nevermind. Turns out that my error was due to creating multiple clients using
the same WSDL.


Will Gomes wrote:
> 
> I'm also getting this error.  I'm using simple frontend with Aegis binding
> and creating a client from a WSDL using ClientProxyFactoryBean.  The
> strange thing is when I create the client in a simple java application it
> works fine, but when I do it from a servlet deployed in a web container I
> get the error. 
> 

-- 
View this message in context: http://www.nabble.com/Schema-name-conflict-in-collection-ERROR-tp19278966p20253734.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Schema name conflict in collection ERROR (resolved)

Posted by Will Gomes <wg...@umd.edu>.
I'm also getting this error.  I'm using simple frontend with Aegis binding
and creating a client from a WSDL using ClientProxyFactoryBean.  The strange
thing is when I create the client in a simple java application it works
fine, but when I do it from a servlet deployed in a web container I get the
error. 
-- 
View this message in context: http://www.nabble.com/Schema-name-conflict-in-collection-ERROR-tp19278966p20253524.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Schema name conflict in collection ERROR (resolved)

Posted by jeet <na...@gmail.com>.
Looks like moving the classes out of the originial package was the issue.
Once I kept them all in the same package where they were generated, the
error went way.

Thanks a lot Daniel.


dkulp wrote:
> 
> On Tuesday 02 September 2008 5:39:12 pm jeet wrote:
>> Using cxf 2.1.2 and maven I have generated the java classes from a wsdl.
>> But when I deploy the war to Tomcat I am getting the following error:
>> ...
>> ....
>>
>> After generating the classes I did move some of the classes to different
>> packages. Could this be related to JIRA defect CXF-1624 or am I doing
>> something wrong?
> 
> Possible.   Luckily, I just fixed it on trunk.   You could try checking
> out 
> the cxf source and building it and trying it.  (I'll try and deploy a new 
> snapshot tomorrow)
> 
> That said, moving classes around into new packages is asking for problems.   
> JAXB stores some information it needs OUTSIDE the class itself.  Primarily
> in 
> the ObjectFactory and the package-info.java.   If you move classes around
> and 
> don't also copy those files along with the class, you're going to have 
> problems.
> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Schema-name-conflict-in-collection-ERROR-tp19278966p19290040.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Schema name conflict in collection ERROR

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 02 September 2008 5:39:12 pm jeet wrote:
> Using cxf 2.1.2 and maven I have generated the java classes from a wsdl.
> But when I deploy the war to Tomcat I am getting the following error:
> ...
> ....
>
> After generating the classes I did move some of the classes to different
> packages. Could this be related to JIRA defect CXF-1624 or am I doing
> something wrong?

Possible.   Luckily, I just fixed it on trunk.   You could try checking out 
the cxf source and building it and trying it.  (I'll try and deploy a new 
snapshot tomorrow)

That said, moving classes around into new packages is asking for problems.   
JAXB stores some information it needs OUTSIDE the class itself.  Primarily in 
the ObjectFactory and the package-info.java.   If you move classes around and 
don't also copy those files along with the class, you're going to have 
problems.


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