You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mick Knutson <mk...@baselogic.com> on 2009/08/21 16:02:13 UTC
Issue with Maven Camel plugin
I have the following declaration:
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel.version}</version>
<configuration>
<applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
*
<!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
*
</configuration>
</plugin>
The fileApplicationContextUri does not get picked up, thus I commented it
out.
I am trying to have a test version, then be able to switch out a PROD
version in my war.
I also tried:
<applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
But that also did not get picked up.
---
Thank You…
Mick Knutson, President
BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233
Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---
Re: Issue with Maven Camel plugin
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
Can you show me the stack trace ?
Camel uses the FileSystemXmlApplicationContext to create the application
context form the fileApplicationContextUri.
You need make sure the uri can work for the FileSystemXmlApplicationContext.
Willem
Mick Knutson wrote:
> What I want, it to use:
> *
> <fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>
> *
>
> Thus I can put this ctx in my src/test/resources and never jar them up at
> build time. AND not manually omit them from the jar. I know I can do this,
> but it seems cleaner to me to just put them as test resources instead.
> But the above also does not work. I still get the file not found error for
> some reason, even though the error depicts the Correct path.
>
>
>
> ---
> Thank You…
>
> Mick Knutson, President
>
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
>
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
>
>
>
> On Sat, Aug 22, 2009 at 12:02 AM, Willem Jiang <wi...@gmail.com>wrote:
>
>> Hi Mick,
>>
>> camel maven plugin don't support to specify the class path application
>> context and the file application context at the same time.
>>
>> Can you try to configure the plugin like this?
>>
>> <applicationContextUri>META-INF/spring/camel-server-aop.xml;applicationContext-test.xml</applicationContextUri>
>> You may need to add the test-jar into the plugin's dependency.
>> Or you specify the exactly application context url files in the
>> <fileApplicationContextUri></fileApplicationContextUri>
>>
>> Willem
>>
>>
>> Mick Knutson wrote:
>>
>>> I have the following declaration:
>>>
>>> <plugin>
>>> <groupId>org.apache.camel</groupId>
>>> <artifactId>camel-maven-plugin</artifactId>
>>> <version>${camel.version}</version>
>>> <configuration>
>>>
>>>
>>> <applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
>>> *
>>>
>>> <!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
>>> *
>>> </configuration>
>>> </plugin>
>>>
>>> The fileApplicationContextUri does not get picked up, thus I commented it
>>> out.
>>>
>>> I am trying to have a test version, then be able to switch out a PROD
>>> version in my war.
>>>
>>> I also tried:
>>>
>>>
>>> <applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
>>>
>>> But that also did not get picked up.
>>>
>>>
>>> ---
>>> Thank You…
>>>
>>> Mick Knutson, President
>>>
>>> BASE Logic, Inc.
>>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>>> p. (866) BLiNC-411: (254-6241-1)
>>> f. (415) 685-4233
>>>
>>> Website: http://baselogic.com
>>> Linked IN: http://linkedin.com/in/mickknutson
>>> Vacation Rental: http://tahoe.baselogic.com
>>> ---
>>>
>>>
>
Re: Issue with Maven Camel plugin
Posted by Mick Knutson <mk...@baselogic.com>.
What I want, it to use:
*
<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>
*
Thus I can put this ctx in my src/test/resources and never jar them up at
build time. AND not manually omit them from the jar. I know I can do this,
but it seems cleaner to me to just put them as test resources instead.
But the above also does not work. I still get the file not found error for
some reason, even though the error depicts the Correct path.
---
Thank You…
Mick Knutson, President
BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233
Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---
On Sat, Aug 22, 2009 at 12:02 AM, Willem Jiang <wi...@gmail.com>wrote:
> Hi Mick,
>
> camel maven plugin don't support to specify the class path application
> context and the file application context at the same time.
>
> Can you try to configure the plugin like this?
>
> <applicationContextUri>META-INF/spring/camel-server-aop.xml;applicationContext-test.xml</applicationContextUri>
> You may need to add the test-jar into the plugin's dependency.
> Or you specify the exactly application context url files in the
> <fileApplicationContextUri></fileApplicationContextUri>
>
> Willem
>
>
> Mick Knutson wrote:
>
>> I have the following declaration:
>>
>> <plugin>
>> <groupId>org.apache.camel</groupId>
>> <artifactId>camel-maven-plugin</artifactId>
>> <version>${camel.version}</version>
>> <configuration>
>>
>>
>> <applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
>> *
>>
>> <!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
>> *
>> </configuration>
>> </plugin>
>>
>> The fileApplicationContextUri does not get picked up, thus I commented it
>> out.
>>
>> I am trying to have a test version, then be able to switch out a PROD
>> version in my war.
>>
>> I also tried:
>>
>>
>> <applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
>>
>> But that also did not get picked up.
>>
>>
>> ---
>> Thank You…
>>
>> Mick Knutson, President
>>
>> BASE Logic, Inc.
>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>> p. (866) BLiNC-411: (254-6241-1)
>> f. (415) 685-4233
>>
>> Website: http://baselogic.com
>> Linked IN: http://linkedin.com/in/mickknutson
>> Vacation Rental: http://tahoe.baselogic.com
>> ---
>>
>>
>
Re: Issue with Maven Camel plugin
Posted by Willem Jiang <wi...@gmail.com>.
Hi Mick,
camel maven plugin don't support to specify the class path application
context and the file application context at the same time.
Can you try to configure the plugin like this?
<applicationContextUri>META-INF/spring/camel-server-aop.xml;applicationContext-test.xml</applicationContextUri>
You may need to add the test-jar into the plugin's dependency.
Or you specify the exactly application context url files in the
<fileApplicationContextUri></fileApplicationContextUri>
Willem
Mick Knutson wrote:
> I have the following declaration:
>
> <plugin>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-maven-plugin</artifactId>
> <version>${camel.version}</version>
> <configuration>
>
> <applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
> *
> <!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
> *
> </configuration>
> </plugin>
>
> The fileApplicationContextUri does not get picked up, thus I commented it
> out.
>
> I am trying to have a test version, then be able to switch out a PROD
> version in my war.
>
> I also tried:
>
> <applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
>
> But that also did not get picked up.
>
>
> ---
> Thank You…
>
> Mick Knutson, President
>
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
>
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
>
Re: Issue with Maven Camel plugin
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
I just did good study of the FileSystemXmlApplicationContext, it
supports to specify the absolute path file by using the URL :)
Like this
"file:///Users/jiangning/Work/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingProcessor.xml"
*Standalone XML application context, taking the context definition files
from the file system or from URLs, interpreting plain paths as relative
file system locations (e.g. "mydir/myfile.txt"). */
Willem
Mick Knutson wrote:
> Sorry, that is the one thing I did not try:
>
> <fileApplicationContextUri>src/test/resources*/*
> camel-server-test.xml</fileApplicationContextUri>
>
> Is this issue by design, or just how it ended up right now?
>
>
> btw, Thanks VERY much for your help.
>
> ---
> Thank You…
>
> Mick Knutson, President
>
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
>
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
>
>
>
> On Sun, Aug 23, 2009 at 6:06 AM, Willem Jiang <wi...@gmail.com>wrote:
>
>> Hi Mick,
>>
>> I just wrote a test for this fileApplicationContextUri. It looks like the
>> FileSystemXmlApplicationContext only consumer the relative configuration
>> file url.
>>
>> Can you try to set the fileApplicationContextUri with this string
>> src/test/resources.camel-server-test.xml ?
>>
>> Willem
>>
>>
>> Mick Knutson wrote:
>>
>>> I changed the plugin to this:
>>>
>>> <configuration>
>>>
>>>
>>> <fileApplicationContextUri>${project.build.directory}/test-classes/camel-server-test.xml</fileApplicationContextUri>
>>> </configuration>
>>>
>>>
>>> And I can see and open the file manually
>>>
>>> from*[/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/
>>> target/test-classes/camel-server-test.xml]* but I get the following FNF
>>> error.
>>>
>>>
>>> And this is the error I get:
>>>
>>> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStart
>>> INFO: Apache Camel 2.0-M3 starting
>>> Aug 23, 2009 4:39:34 AM
>>> org.springframework.context.support.AbstractApplicationContext
>>> prepareRefresh
>>> INFO: Refreshing
>>>
>>> org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76
>>> :
>>> display name
>>>
>>> [org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76
>>> ];
>>> startup date [Sun Aug 23 04:39:34 PDT 2009]; root of context hierarchy
>>> Aug 23, 2009 4:39:34 AM
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>>> loadBeanDefinitions
>>> INFO: Loading XML bean definitions from file
>>>
>>> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml]
>>> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStop
>>> INFO: Apache Camel 2.0-M3 stopping
>>> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport run
>>> SEVERE: Failed:
>>> org.springframework.beans.factory.BeanDefinitionStoreException:
>>> IOException
>>> parsing XML document from file
>>>
>>> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
>>> nested exception is java.io.FileNotFoundException:
>>>
>>> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
>>> (No such file or directory)
>>> org.springframework.beans.factory.BeanDefinitionStoreException:
>>> IOException
>>> parsing XML document from file
>>>
>>> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
>>> nested exception is java.io.FileNotFoundException:
>>>
>>> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
>>> (No such file or directory)
>>> at
>>>
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
>>> at
>>>
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
>>> at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
>>> at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
>>> at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
>>> at
>>>
>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
>>> at
>>>
>>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>>> at
>>>
>>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
>>> at
>>>
>>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>>> at
>>>
>>> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
>>> at
>>>
>>> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
>>> at
>>>
>>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:209)
>>> at org.apache.camel.spring.Main.doStart(Main.java:173)
>>> at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
>>> at org.apache.camel.impl.MainSupport.run(MainSupport.java:113)
>>> at org.apache.camel.impl.MainSupport.run(MainSupport.java:270)
>>> at org.apache.camel.spring.Main.main(Main.java:97)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>>
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>>
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415)
>>> at java.lang.Thread.run(Thread.java:637)
>>> *Caused by: java.io.FileNotFoundException:
>>>
>>> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
>>> (No such file or directory)*
>>> at java.io.FileInputStream.open(Native Method)
>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>> at
>>>
>>> org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108)
>>> at
>>>
>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
>>> ... 24 more
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] BUILD SUCCESSFUL
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 28 seconds
>>> [INFO] Finished at: Sun Aug 23 04:39:34 PDT 2009
>>> [INFO] Final Memory: 46M/81M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> mick-knutsons-macbook:table-service-su mickknutson$
>>>
>>>
>>>
>>> ---
>>> Thank You…
>>>
>>> Mick Knutson, President
>>>
>>> BASE Logic, Inc.
>>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>>> p. (866) BLiNC-411: (254-6241-1)
>>> f. (415) 685-4233
>>>
>>> Website: http://baselogic.com
>>> Linked IN: http://linkedin.com/in/mickknutson
>>> Vacation Rental: http://tahoe.baselogic.com
>>> ---
>>>
>>>
>>>
>>> On Fri, Aug 21, 2009 at 7:02 AM, Mick Knutson <mknutson@baselogic.com
>>>> wrote:
>>> I have the following declaration:
>>>> <plugin>
>>>> <groupId>org.apache.camel</groupId>
>>>> <artifactId>camel-maven-plugin</artifactId>
>>>> <version>${camel.version}</version>
>>>> <configuration>
>>>>
>>>>
>>>> <applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
>>>> *
>>>>
>>>> <!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
>>>> *
>>>> </configuration>
>>>> </plugin>
>>>>
>>>> The fileApplicationContextUri does not get picked up, thus I commented it
>>>> out.
>>>>
>>>> I am trying to have a test version, then be able to switch out a PROD
>>>> version in my war.
>>>>
>>>> I also tried:
>>>>
>>>>
>>>> <applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
>>>>
>>>> But that also did not get picked up.
>>>>
>>>>
>>>> ---
>>>> Thank You…
>>>>
>>>> Mick Knutson, President
>>>>
>>>> BASE Logic, Inc.
>>>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>>>> p. (866) BLiNC-411: (254-6241-1)
>>>> f. (415) 685-4233
>>>>
>>>> Website: http://baselogic.com
>>>> Linked IN: http://linkedin.com/in/mickknutson
>>>> Vacation Rental: http://tahoe.baselogic.com
>>>> ---
>>>>
>>>>
>>>>
>
Re: Issue with Maven Camel plugin
Posted by Mick Knutson <mk...@baselogic.com>.
Sorry, that is the one thing I did not try:
<fileApplicationContextUri>src/test/resources*/*
camel-server-test.xml</fileApplicationContextUri>
Is this issue by design, or just how it ended up right now?
btw, Thanks VERY much for your help.
---
Thank You…
Mick Knutson, President
BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233
Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---
On Sun, Aug 23, 2009 at 6:06 AM, Willem Jiang <wi...@gmail.com>wrote:
> Hi Mick,
>
> I just wrote a test for this fileApplicationContextUri. It looks like the
> FileSystemXmlApplicationContext only consumer the relative configuration
> file url.
>
> Can you try to set the fileApplicationContextUri with this string
> src/test/resources.camel-server-test.xml ?
>
> Willem
>
>
> Mick Knutson wrote:
>
>> I changed the plugin to this:
>>
>> <configuration>
>>
>>
>> <fileApplicationContextUri>${project.build.directory}/test-classes/camel-server-test.xml</fileApplicationContextUri>
>> </configuration>
>>
>>
>> And I can see and open the file manually
>>
>> from*[/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/
>> target/test-classes/camel-server-test.xml]* but I get the following FNF
>> error.
>>
>>
>> And this is the error I get:
>>
>> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStart
>> INFO: Apache Camel 2.0-M3 starting
>> Aug 23, 2009 4:39:34 AM
>> org.springframework.context.support.AbstractApplicationContext
>> prepareRefresh
>> INFO: Refreshing
>>
>> org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76
>> :
>> display name
>>
>> [org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76
>> ];
>> startup date [Sun Aug 23 04:39:34 PDT 2009]; root of context hierarchy
>> Aug 23, 2009 4:39:34 AM
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>> loadBeanDefinitions
>> INFO: Loading XML bean definitions from file
>>
>> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml]
>> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStop
>> INFO: Apache Camel 2.0-M3 stopping
>> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport run
>> SEVERE: Failed:
>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> IOException
>> parsing XML document from file
>>
>> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
>> nested exception is java.io.FileNotFoundException:
>>
>> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
>> (No such file or directory)
>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> IOException
>> parsing XML document from file
>>
>> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
>> nested exception is java.io.FileNotFoundException:
>>
>> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
>> (No such file or directory)
>> at
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
>> at
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
>> at
>>
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
>> at
>>
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
>> at
>>
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
>> at
>>
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
>> at
>>
>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>> at
>>
>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
>> at
>>
>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>> at
>>
>> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
>> at
>>
>> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
>> at
>>
>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:209)
>> at org.apache.camel.spring.Main.doStart(Main.java:173)
>> at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
>> at org.apache.camel.impl.MainSupport.run(MainSupport.java:113)
>> at org.apache.camel.impl.MainSupport.run(MainSupport.java:270)
>> at org.apache.camel.spring.Main.main(Main.java:97)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415)
>> at java.lang.Thread.run(Thread.java:637)
>> *Caused by: java.io.FileNotFoundException:
>>
>> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
>> (No such file or directory)*
>> at java.io.FileInputStream.open(Native Method)
>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>> at
>>
>> org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108)
>> at
>>
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
>> ... 24 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 28 seconds
>> [INFO] Finished at: Sun Aug 23 04:39:34 PDT 2009
>> [INFO] Final Memory: 46M/81M
>> [INFO]
>> ------------------------------------------------------------------------
>> mick-knutsons-macbook:table-service-su mickknutson$
>>
>>
>>
>> ---
>> Thank You…
>>
>> Mick Knutson, President
>>
>> BASE Logic, Inc.
>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>> p. (866) BLiNC-411: (254-6241-1)
>> f. (415) 685-4233
>>
>> Website: http://baselogic.com
>> Linked IN: http://linkedin.com/in/mickknutson
>> Vacation Rental: http://tahoe.baselogic.com
>> ---
>>
>>
>>
>> On Fri, Aug 21, 2009 at 7:02 AM, Mick Knutson <mknutson@baselogic.com
>> >wrote:
>>
>> I have the following declaration:
>>>
>>> <plugin>
>>> <groupId>org.apache.camel</groupId>
>>> <artifactId>camel-maven-plugin</artifactId>
>>> <version>${camel.version}</version>
>>> <configuration>
>>>
>>>
>>> <applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
>>> *
>>>
>>> <!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
>>> *
>>> </configuration>
>>> </plugin>
>>>
>>> The fileApplicationContextUri does not get picked up, thus I commented it
>>> out.
>>>
>>> I am trying to have a test version, then be able to switch out a PROD
>>> version in my war.
>>>
>>> I also tried:
>>>
>>>
>>> <applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
>>>
>>> But that also did not get picked up.
>>>
>>>
>>> ---
>>> Thank You…
>>>
>>> Mick Knutson, President
>>>
>>> BASE Logic, Inc.
>>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>>> p. (866) BLiNC-411: (254-6241-1)
>>> f. (415) 685-4233
>>>
>>> Website: http://baselogic.com
>>> Linked IN: http://linkedin.com/in/mickknutson
>>> Vacation Rental: http://tahoe.baselogic.com
>>> ---
>>>
>>>
>>>
>>
>
Re: Issue with Maven Camel plugin
Posted by Willem Jiang <wi...@gmail.com>.
Hi Mick,
I just wrote a test for this fileApplicationContextUri. It looks like
the FileSystemXmlApplicationContext only consumer the relative
configuration file url.
Can you try to set the fileApplicationContextUri with this string
src/test/resources.camel-server-test.xml ?
Willem
Mick Knutson wrote:
> I changed the plugin to this:
>
> <configuration>
>
> <fileApplicationContextUri>${project.build.directory}/test-classes/camel-server-test.xml</fileApplicationContextUri>
> </configuration>
>
>
> And I can see and open the file manually
> from*[/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/
> target/test-classes/camel-server-test.xml]* but I get the following FNF
> error.
>
>
> And this is the error I get:
>
> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStart
> INFO: Apache Camel 2.0-M3 starting
> Aug 23, 2009 4:39:34 AM
> org.springframework.context.support.AbstractApplicationContext
> prepareRefresh
> INFO: Refreshing
> org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76:
> display name
> [org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76];
> startup date [Sun Aug 23 04:39:34 PDT 2009]; root of context hierarchy
> Aug 23, 2009 4:39:34 AM
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from file
> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml]
> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStop
> INFO: Apache Camel 2.0-M3 stopping
> Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport run
> SEVERE: Failed:
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from file
> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
> nested exception is java.io.FileNotFoundException:
> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
> (No such file or directory)
> org.springframework.beans.factory.BeanDefinitionStoreException: IOException
> parsing XML document from file
> [/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
> nested exception is java.io.FileNotFoundException:
> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
> (No such file or directory)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
> at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
> at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
> at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
> at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
> at
> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
> at
> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
> at
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:209)
> at org.apache.camel.spring.Main.doStart(Main.java:173)
> at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
> at org.apache.camel.impl.MainSupport.run(MainSupport.java:113)
> at org.apache.camel.impl.MainSupport.run(MainSupport.java:270)
> at org.apache.camel.spring.Main.main(Main.java:97)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415)
> at java.lang.Thread.run(Thread.java:637)
> *Caused by: java.io.FileNotFoundException:
> Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
> (No such file or directory)*
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:106)
> at
> org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
> ... 24 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 28 seconds
> [INFO] Finished at: Sun Aug 23 04:39:34 PDT 2009
> [INFO] Final Memory: 46M/81M
> [INFO]
> ------------------------------------------------------------------------
> mick-knutsons-macbook:table-service-su mickknutson$
>
>
>
> ---
> Thank You…
>
> Mick Knutson, President
>
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
>
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
>
>
>
> On Fri, Aug 21, 2009 at 7:02 AM, Mick Knutson <mk...@baselogic.com>wrote:
>
>> I have the following declaration:
>>
>> <plugin>
>> <groupId>org.apache.camel</groupId>
>> <artifactId>camel-maven-plugin</artifactId>
>> <version>${camel.version}</version>
>> <configuration>
>>
>> <applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
>> *
>> <!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
>> *
>> </configuration>
>> </plugin>
>>
>> The fileApplicationContextUri does not get picked up, thus I commented it
>> out.
>>
>> I am trying to have a test version, then be able to switch out a PROD
>> version in my war.
>>
>> I also tried:
>>
>> <applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
>>
>> But that also did not get picked up.
>>
>>
>> ---
>> Thank You…
>>
>> Mick Knutson, President
>>
>> BASE Logic, Inc.
>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>> p. (866) BLiNC-411: (254-6241-1)
>> f. (415) 685-4233
>>
>> Website: http://baselogic.com
>> Linked IN: http://linkedin.com/in/mickknutson
>> Vacation Rental: http://tahoe.baselogic.com
>> ---
>>
>>
>
Re: Issue with Maven Camel plugin
Posted by Mick Knutson <mk...@baselogic.com>.
I changed the plugin to this:
<configuration>
<fileApplicationContextUri>${project.build.directory}/test-classes/camel-server-test.xml</fileApplicationContextUri>
</configuration>
And I can see and open the file manually
from*[/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/
target/test-classes/camel-server-test.xml]* but I get the following FNF
error.
And this is the error I get:
Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStart
INFO: Apache Camel 2.0-M3 starting
Aug 23, 2009 4:39:34 AM
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing
org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76:
display name
[org.springframework.context.support.FileSystemXmlApplicationContext@7ef3de76];
startup date [Sun Aug 23 04:39:34 PDT 2009]; root of context hierarchy
Aug 23, 2009 4:39:34 AM
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from file
[/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml]
Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport doStop
INFO: Apache Camel 2.0-M3 stopping
Aug 23, 2009 4:39:34 AM org.apache.camel.impl.MainSupport run
SEVERE: Failed:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from file
[/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
nested exception is java.io.FileNotFoundException:
Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
(No such file or directory)
org.springframework.beans.factory.BeanDefinitionStoreException: IOException
parsing XML document from file
[/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml];
nested exception is java.io.FileNotFoundException:
Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
(No such file or directory)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:209)
at org.apache.camel.spring.Main.doStart(Main.java:173)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:113)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:270)
at org.apache.camel.spring.Main.main(Main.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415)
at java.lang.Thread.run(Thread.java:637)
*Caused by: java.io.FileNotFoundException:
Development/Workspaces/freemarketgaming-tc/wiredducks/services/table-service-su/target/test-classes/camel-server-test.xml
(No such file or directory)*
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at
org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
... 24 more
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 28 seconds
[INFO] Finished at: Sun Aug 23 04:39:34 PDT 2009
[INFO] Final Memory: 46M/81M
[INFO]
------------------------------------------------------------------------
mick-knutsons-macbook:table-service-su mickknutson$
---
Thank You…
Mick Knutson, President
BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233
Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---
On Fri, Aug 21, 2009 at 7:02 AM, Mick Knutson <mk...@baselogic.com>wrote:
> I have the following declaration:
>
> <plugin>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-maven-plugin</artifactId>
> <version>${camel.version}</version>
> <configuration>
>
> <applicationContextUri>META-INF/spring/camel-server-aop.xml</applicationContextUri>
> *
> <!--<fileApplicationContextUri>${project.build.directory}/test-classes/applicationContext-test.xml</fileApplicationContextUri>-->
> *
> </configuration>
> </plugin>
>
> The fileApplicationContextUri does not get picked up, thus I commented it
> out.
>
> I am trying to have a test version, then be able to switch out a PROD
> version in my war.
>
> I also tried:
>
> <applicationContextUri>META-INF/spring/*.xml;*${project.build.directory}/test-classes/applicationContext-test.xml*</applicationContextUri>
>
> But that also did not get picked up.
>
>
> ---
> Thank You…
>
> Mick Knutson, President
>
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
>
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
>
>