camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kostabanderas <kostabande...@gmail.com>
Subject Re: The dreaded: Unable to locate Spring NamespaceHandler for XML schema
Date Thu, 18 Mar 2010 11:33:00 GMT

Had no luck with assembly plugin. I tried the shade plugin but gave up on it
after adding a number of dependencies and still getting runtime errors for
the missing classes. In the end, I used the combination of jar plugin to
build my jar and manifest file and dependency plugin to copy required
dependencies to an appropriate location so I could start the app with java
-jar.

Thanks, cheers and keep up the good work,
Kosta


kostabanderas wrote:
> 
> Thanks for the reply.
> 
> I did create the spring.schemas, spring.handlers files but I believe that
> the assembly plugin overwrites them. When I change the names of the files
> they appear regularly in the generated META-INF folder but when I name
> them properly, they get overwriten...
> 
> I took a look at the file you've suggested. Basically, you're suggesting I
> should drop the assembly plugin and use the shade plugin instead? I'll
> give it a try and let you know how it turned out.
> 
> Thanks,
> Kosta
> 
> 
> willem.jiang wrote:
>> 
>> Hi,
>> 
>> You can take a look at this pom.xml[1]. If you go through the 
>> camel-spring-osgi module, you will find most of thing that you want to
>> know.
>> 
>> You need to create spring.schemas, spring.handlers file yourself, to 
>> includes the schemas and handlers those you wrap into a big jar.
>> 
>> [1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-osgi/pom.xml
>> 
>> 
>> Willem
>> 
>> 
>> kostabanderas wrote:
>>> Hi all,
>>> 
>>> For my first post here, first of all, big respect to all developers
>>> working
>>> on Camel projects.
>>> 
>>> I'm having the same problem but I can't seem to deal with it in the way
>>> described above. It is the same handler that is stated missing.
>>> 
>>> I'm also using maven and assembly plugin. I checked the "fat jar"
>>> created by
>>> this plugin and it does have
>>> (spring.schemas and spring.handlers) files in the META-INF dir (without
>>> my
>>> intervention) but they don't declare this specific schema/handler. I
>>> tried
>>> modifying the assembly descriptor but it didn't work out. I'm completely
>>> new
>>> to these concepts so there's a big chance that I'm doing something wrong
>>> but
>>> what confuses me are those existing (spring.schemas and spring.handlers) 
>>> files. I tried adding spring-integration jar to my classpath and those
>>> schema/handler got inserted in the two files above but this one is still
>>> causing me problems and I can't seem to start my app with the java -jar
>>> command.
>>> Furthermore, camel-spring-v2.2.xsd and camel-spring.xsd exist in the
>>> root of
>>> the "fat jar". 
>>> 
>>> I checked my classpath and the pom file contains everything I believe is
>>> needed. More specific, it does contain camel-spring (2.2.0) jar which I
>>> believe holds this handler.
>>> 
>>> I'm using java 1.6.0_17. and Camel 2.2.0.
>>> 
>>> Thanks and please let me know if there's anything more I can provide to
>>> help
>>> you help me solve this problem :)
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Ian de Beer wrote:
>>>> Hi
>>>> Thanks to all - it works with the two files (spring.schemas and
>>>> spring.handlers) added to my META-INF
>>>> Regards
>>>> Ian
>>>>
>>>>
>>>> willem.jiang wrote:
>>>>> Can you check your "fat-jar" if it contains the file 
>>>>> /META-INF/spring.handles and /META-INF/spring.schemas like these files
>>>>> [1]
>>>>>
>>>>> If not , you need to update your assembly plugin is configuration to

>>>>> contain upper files.
>>>>>
>>>>> [1] 
>>>>> https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-osgi/src/main/resources/META-INF
>>>>>
>>>>> Willem
>>>>>
>>>>
>>> 
>> 
>> 
>> 
> 
> 

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


Mime
View raw message