Please see my comments in the mail.
On 6/14/11 10:04 PM, Marco Gerber wrote:
Hello everybody

(this message cross posts 
http://camel.465427.n5.nabble.com/osgi-Two-classes-have-the-same-XML-type-name-td4487885.html
 - sorry I didn't see the users list before)

I'm using camel 2.7.0 in an spring- osgi context with Spring Source Toolsuite 
STS 2.6.1. I got many of the following errors (the part with 'Two classes have 
the same XML type name..') when I try to deploy a webapplication bundle to a 
virgo-tomcat-server-3.0.0.M03 from STS:

[2011-06-14 15:13:52.152] start-signalling-2           
o.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext   Application 
Context service already unpublished
[2011-06-14 15:13:52.154] start-signalling-2           
org.springframework.beans.factory.xml.XmlBeanDefinitionReader     Loading XML 
bean definitions from ServletContext resource 
[/WEB-INF/spring/camel-context.xml]
[2011-06-14 15:13:52.278] start-signalling-2           
org.apache.camel.spring.handler.CamelNamespaceHandler             OSGi 
environment not detected.
[2011-06-14 15:13:52.653] start-signalling-2           
org.springframework.web.context.ContextLoader                     Context 
initialization failed 
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to 
create the JAXB binder; nested exception is 
com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 61 counts of 
IllegalAnnotationExceptions
Two classes have the same XML type name 
"{http://camel.apache.org/schema/spring}identifiedType";. Use @XmlType.name and 
@XmlType.namespace to assign different names to them.
         this problem is related to the following location:
                 at org.apache.camel.model.IdentifiedType
                 at org.apache.camel.core.xml.AbstractCamelFactoryBean
                 at 
org.apache.camel.core.xml.AbstractCamelConsumerTemplateFactoryBean
                 at org.apache.camel.spring.CamelConsumerTemplateFactoryBean
         this problem is related to the following location:
                 at org.apache.camel.model.IdentifiedType
                 at org.apache.camel.model.LoadBalancerDefinition
                 at 
org.apache.camel.model.loadbalancer.FailoverLoadBalancerDefinition


When I deploy the application outside of eclipse, the webapp bundle starts 
without any problem. This is very curious ;-)


Do you still use the eclipse virgo server outside of the eclipse IDE?
Maybe eclipse load the camel-core bundle twice :(

My bundle setup looks as follows:
  org.apache.xbean.spring;version="[3.7.0,3.8.0)",
  org.apache.activemq.activemq-core;version="[5.5.0,5.6.0)",
  org.apache.activemq.activemq-camel;version="[5.5.0,5.6.0)",
  org.apache.camel.camel-jms;version="[2.7.0,2.8.0)"

Any idea on how to solve this issue?

Thanks and let me know if I have to provide further information,
Marco



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to