Ah, mr. Ibsen, thanks for the reply.

I'm sure there are numerous ways to achieve this goal. The assembly plugin
sounded like the quickest (and maybe the dirtiest, since I wanted to pack up
all the dependency jars for this test project). Maybe the problem I had was
more suited for the assembly plugin group but what confused me the most and
what I think should be the main topic here is the existence of
spring.schemas and spring.handlers files in the META-INF folder. Right now,
with the solution I've applied, those two files don't even exist in the
META-INF folder and everything works. When using the assembly plugin, these
two files are auto generated but include some schemas/namespaces that I
haven't specifically added anywhere. When I provide these two files myself
(in the META-INF folder), these two files get overwritten.
Again, I'm new to these concepts and it's quite possible that I haven't
configured the plugin properly, but, again, I'm wondering now how does
everything work without the two files mentioned above?

Thanks and cheers,
Kosta


Claus Ibsen-2 wrote:
> 
> On Thu, Mar 18, 2010 at 12:33 PM, kostabanderas <[email protected]>
> wrote:
>>
>> 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
>>
> 
> Maybe an ANT task can do the assembly the way you like.
> 
> 
> 
>>
>> 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.
>>
>>
> 
> 
> 
> -- 
> 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
> 
> 

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

Reply via email to