You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ian de Beer <ia...@zenaptix.com> on 2009/11/17 13:50:39 UTC

Re: The dreaded: Unable to locate Spring NamespaceHandler for XML schema

Hi Claus
I have tried with "http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd", but the
problem persists.
The puzzling part is that it works when the full classpath is specified
(referencing the jars in the maven repo). Obviously the fat jar, containing
all dependencies, is the only jar on the classpath and then it fails.  The
jar does contain the  CamelNamespaceHandler.class. 
Regards
Ian


Claus Ibsen-2 wrote:
> 
> Hi
> 
> You can change to use a fixed 2.0.0 version of the XSD
> 
>          http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
> 
> Should be
> 
>          http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd">
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/The-dreaded%3A-Unable-to-locate-Spring-NamespaceHandler-for-XML-schema-tp26388081p26389361.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: The dreaded: Unable to locate Spring NamespaceHandler for XML schema

Posted by wpeirone <wp...@gmail.com>.
Hi Claus,

Related with this, I´m having same problem with spring.handlers and
spring.schemas. I´m using org.apache.camel.spring;version="2.8.0.fuse-07-16"
on equinox from eclipse.

in xml I´m using xmlns:camel="http://camel.apache.org/schema/spring"
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd 
I tried with trailing  "-v2.0.xsd" and "-2.8.xsd" but didn´t works.

If I copy both files (spring.handlers and spring.schemas) to META-INF of my
bundle, it works. But, without files copied doesn´t works (I think it must
be read from imported packages in the manifest). My bundle is what you
mentioned like fat jar ? It's ok to copy the files ? 



Other question, I just adapted the camel-example-spring-ws but as mentioned
used from osgi. When in the route invoque    "from("spring-ws:rootqname:
..."   it gives me "Failed to resolve endpoint" unless explicitly declare 
<bean id="spring-ws"
class="org.apache.camel.component.spring.ws.SpringWebserviceComponent"/>
is that right ? 

thank you in advance.
Walter




--
View this message in context: http://camel.465427.n5.nabble.com/The-dreaded-Unable-to-locate-Spring-NamespaceHandler-for-XML-schema-tp477346p5733363.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: The dreaded: Unable to locate Spring NamespaceHandler for XML schema

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Nov 17, 2009 at 1:50 PM, Ian de Beer <ia...@zenaptix.com> wrote:
>
> Hi Claus
> I have tried with "http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd", but the
> problem persists.
> The puzzling part is that it works when the full classpath is specified
> (referencing the jars in the maven repo). Obviously the fat jar, containing
> all dependencies, is the only jar on the classpath and then it fails.  The
> jar does contain the  CamelNamespaceHandler.class.
> Regards
> Ian
>

Ah you need to copy the spring namespace files in the fat jar.

In camel-spring there are some files in META-INF somewhere that has
the mapping from those XSDs.



>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> You can change to use a fixed 2.0.0 version of the XSD
>>
>>          http://camel.apache.org/schema/spring
>> http://camel.apache.org/schema/spring/camel-spring.xsd">
>>
>> Should be
>>
>>          http://camel.apache.org/schema/spring
>> http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd">
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/The-dreaded%3A-Unable-to-locate-Spring-NamespaceHandler-for-XML-schema-tp26388081p26389361.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: The dreaded: Unable to locate Spring NamespaceHandler for XML schema

Posted by Maciej Prochniak <mp...@touk.pl>.
just a guess - but does fat jar contain needed descriptors in META-INF
i.e. META-INF/spring.handlers
and META-INF/spring.schemas?

br, maciek

On Tue, 2009-11-17 at 04:50 -0800, Ian de Beer wrote:
> Hi Claus
> I have tried with "http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd", but the
> problem persists.
> The puzzling part is that it works when the full classpath is specified
> (referencing the jars in the maven repo). Obviously the fat jar, containing
> all dependencies, is the only jar on the classpath and then it fails.  The
> jar does contain the  CamelNamespaceHandler.class. 
> Regards
> Ian
> 
> 
> Claus Ibsen-2 wrote:
> > 
> > Hi
> > 
> > You can change to use a fixed 2.0.0 version of the XSD
> > 
> >          http://camel.apache.org/schema/spring
> > http://camel.apache.org/schema/spring/camel-spring.xsd">
> > 
> > Should be
> > 
> >          http://camel.apache.org/schema/spring
> > http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd">
> > 
> > 
> > 
>