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 <willem.ji...@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.filesystemxmlapplicationcont...@7ef3de76 >> : >> display name >> >> [org.springframework.context.support.filesystemxmlapplicationcont...@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 <mknut...@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 >>> --- >>> >>> >>> >> >