Great, I have it working now, polling a single directory and sending each file to another directory. I have removed camelContext stanza due to errors, which I will troubleshoot.
Thanks for the help. I will be creating documentation for these simple examples as I go. Glenn -----Original Message----- From: Guillaume Nodet [mailto:[email protected]] Sent: 31 March 2009 15:05 To: [email protected] Subject: Re: Example problem Btw, a workaround for this issue is not not specify "file:" in the file attribute: <file:poller service="b:service" endpoint="endpoint" targetService="b:receiver" file="${servicemix.home}/input" /> On Tue, Mar 31, 2009 at 15:37, Guillaume Nodet <[email protected]> wrote: > Here is a working configuration: > > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:util="http://www.springframework.org/schema/util" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:file="http://servicemix.apache.org/file/1.0" > xmlns:camel="http://activemq.apache.org/camel/schema/spring" > xmlns:osgi="http://www.springframework.org/schema/osgi" > xmlns:b="http://servicemix.apache.org/examples/camel" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > http://www.springframework.org/schema/util > http://www.springframework.org/schema/util/spring-util.xsd > http://www.springframework.org/schema/osgi > http://www.springframework.org/schema/osgi/spring-osgi.xsd > http://www.springframework.org/schema/osgi-compendium > > http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd > http://servicemix.apache.org/file/1.0 > http://servicemix.apache.org/file/1.0/servicemix-file.xsd > http://activemq.apache.org/camel/schema/spring > http://activemq.apache.org/camel/schema/spring/camel-spring.xsd > http://www.springframework.org/schema/osgi > http://www.springframework.org/schema/osgi/spring-osgi.xsd"> > > <camel:camelContext> > <camel:route> > <camel:from > uri="jbi:endpoint:http://servicemix.apache.org/examples/camel/receiver/endpoint" > /> > <camel:to uri="log:test" /> > </camel:route> > </camel:camelContext> > > <file:poller service="b:service" endpoint="endpoint" > targetService="b:receiver" file="file:${servicemix.home}/input" /> > > <bean class="org.apache.servicemix.common.osgi.EndpointExporter" /> > > <bean > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > /> > > </beans> > > You need to create the "input" directory before deploying this file > else you'll run into > https://issues.apache.org/activemq/browse/SMXCOMP-496 which I just > raised. > > On Tue, Mar 31, 2009 at 15:00, Glenn Macgregor > <[email protected]> wrote: >> I assume you mean adding the <bean >> class="org.apache.servicemix.common.osgi.EndpointExporter" /> which I did >> add, still no luck. >> >> Is it possible to give me a complete spring file for this application? >> >> Any concrete examples would be very helpful. >> >> Thanks >> >> Glenn >> >> -----Original Message----- >> From: Guillaume Nodet [mailto:[email protected]] >> Sent: 31 March 2009 13:50 >> To: [email protected] >> Subject: Re: Example problem >> >> Your configuration is not sufficient. >> You need to add the endpoint exporter bean to your spring >> configuration file as shown in the examples from the simple/ directory >> in the distribution. >> >> On Tue, Mar 31, 2009 at 14:37, Glenn Macgregor >> <[email protected]> wrote: >>> Is there anything I can do to debug this. I realize I am new to servicemix >>> (and ESB's in general) but developing for servicemix seems overly complex >>> and/or not well documented. >>> >>> I think my proof of concept is simple enough, read from one directory and >>> write to another. It is now coming on a week of trying to get this simple >>> use case working. Admittedly this is the first ESB I have tested so they >>> all could be this way, but it just seems like I must be missing a big piece >>> of understanding because I don't even know where to look to begin. >>> >>> I am nervous to try my second use case which is polling an imap folder for >>> new mail and putting those messages on the activemq bus. It seems quite a >>> bit more complex especially when I can not get a file poller and sender >>> working. >>> >>> I do not mean to start a flame war, I am very impressed by the concept and >>> endless functionally that is implemented. As a newbie the barriers to begin >>> working with servicemix seem impossibly high. >>> >>> Thanks for all your help. >>> >>> Glenn >>> >>> -----Original Message----- >>> From: Glenn Macgregor [mailto:[email protected]] >>> Sent: 31 March 2009 12:49 >>> To: [email protected] >>> Subject: RE: Example problem >>> >>> After the deploy I see many log entries referring to the deploy but nothing >>> jumps out as an error... >>> >>> At the end I see: >>> >>> Not publishing application context OSGi service for bundle null (beans.xml) >>> >>> Glenn >>> >>> -----Original Message----- >>> From: Guillaume Nodet [mailto:[email protected]] >>> Sent: 31 March 2009 12:39 >>> To: [email protected] >>> Subject: Re: Example problem >>> >>> You can check the log for any errors. >>> From the console, run >>> > log/set DEBUG >>> >>> then deploy your file, last run >>> >>>> log/d >>> >>> On Tue, Mar 31, 2009 at 13:36, Glenn Macgregor >>> <[email protected]> wrote: >>>> Sorry , hit send to soon. >>>> >>>> I changed the line endings from unix to dos and it seems to load. I >>>> started it using osgi start 109 but the directory /tmp/test was not >>>> created, which I thought it should. >>>> >>>> Glenn >>>> >>>> -----Original Message----- >>>> From: Sebastian Gomez [mailto:[email protected]] >>>> Sent: 31 March 2009 12:25 >>>> To: [email protected] >>>> Subject: Re: Example problem >>>> >>>> Hi. >>>> The exception is caused by the line jump after the xsi:schemaLocation=". >>>> Remove it and it should work. >>>> >>>> Sebastian Gomez. >>>> >>>> >>>> On Tue, Mar 31, 2009 at 1:10 PM, Glenn Macgregor >>>> <[email protected]>wrote: >>>> >>>>> I hate to keep on this subject, but I can not get this simple example >>>>> going. I realize the XML validation is strict...I have taken the groovy >>>>> example file and updated it. >>>>> >>>>> <beans xmlns="http://www.springframework.org/schema/beans" >>>>> xmlns:util="http://springframework.org/schema/util" >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>> xmlns:quartz="http://servicemix.apache.org/quartz/1.0" >>>>> xmlns:file="http://servicemix.apache.org/file/1.0" >>>>> xmlns:scripting="http://servicemix.apache.org/scripting/1.0" >>>>> xmlns:camel="http://activemq.apache.prg/camel/schema/spring" >>>>> xmlns:osgi="http://www.springframework.org/schema/osgi" >>>>> xmlns:b="http://servicemix.apache.org/examples/groovy" >>>>> xsi:schemaLocation=" >>>>> http://www.springframework.org/schema/beans >>>>> http://www.springframework.org/schema/beans/spring-beans.xsd >>>>> http://www.springframework.org/schema/util >>>>> http://www.springframework.org/schema/util/spring-util.xsd >>>>> http://www.springframework.org/schema/osgi >>>>> http://www.springframework.org/schema/osgi/spring-osgi.xsd >>>>> http://www.springframework.org/schema/osgi-compendium >>>>> http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd >>>>> http://servicemix.apache.org/quartz/1.0 >>>>> http://servicemix.apache.org/quartz/1.0/servicemix-quartz.xsd >>>>> http://servicemix.apache.org/scripting/1.0 >>>>> http://servicemix.apache.org/scripting/1.0/servicemix-scripting.xsd >>>>> http://servicemix.apache.org/file/1.0 >>>>> http://servicemix.apache.org/file/1.0/servicemix-file.xsd >>>>> http://activemq.apache.org/camel/schema/spring >>>>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd >>>>> http://www.springframework.org/schema/osgi >>>>> http://www.springframework.org/schema/osgi/spring-osgi.xsd"> >>>>> >>>>> <file:poller service="testFilePoller" endpoint="poller" >>>>> file="/tmp/test/"/> >>>>> >>>>> </beans> >>>>> >>>>> Installing this file into the deploy directory and issuing a log d I get >>>>> the same error as before: >>>>> >>>>> org.springframework.beans.factory.xml.xmlBeanDefinitionStoreException: >>>>> Line >>>>> 18 in XML document from URL [bundle://92.0:0/META-INF/spring/test.xml] is >>>>> invalid; nested exception is org.xml.sax.SAXParseException: >>>>> cvc-complex-type.2.4.c: The matching wildcards is strict, but no >>>>> declaration >>>>> can be found for element 'file:poller'. >>>>> >>>>> I have been over the documentation and examples multiple times and have >>>>> found no clues about the problem. I realize servicemix 4 is new and the >>>>> docs >>>>> may not be updated. Once I get this issue solved I would be happy to begin >>>>> documenting simple examples for servicemix 4. >>>>> >>>>> Thanks for you support. >>>>> >>>>> Glenn >>>>> >>>>> -----Original Message----- >>>>> From: Guillaume Nodet [mailto:[email protected]] >>>>> Sent: 29 March 2009 19:39 >>>>> To: users >>>>> Subject: Re: Example problem >>>>> >>>>> The xml validation rules are a bit more strict. You need to define >>>>> the xml schemas in the root xsi:schemaLocation tags as shown in the >>>>> examples from the distribution. >>>>> >>>>> >>>>> 2009/3/27 Glenn Macgregor <[email protected]>: >>>>> > Thanks for all the input. >>>>> > >>>>> > I have created a config file and tried to deploy in, with no luck. >>>>> > >>>>> > I copied the groovy.xml to test.xml and added: >>>>> > >>>>> > Xmlns:file="http://servicemix.apache.org/file/1.0" >>>>> > >>>>> > In the beans tag. >>>>> > >>>>> > Removed everything in between the <beans> and </beans> and put in: >>>>> > >>>>> > <file:poller service="tmpFilePoller" endpoint="tmpFilePoller" >>>>> targetService="tmpFileSender" file="/tmp/test"/> >>>>> > >>>>> > I copy test.xml into the deploy directory and look at the log using 'log >>>>> d' >>>>> > >>>>> > Pre refresh error >>>>> org.springframework.beans.factory.xml.xmlBeanDefinitionStoreException: >>>>> Line >>>>> 18 in XML dpcument from URL [bundle://92.0:0/META-INF/spring/test.xml] is >>>>> invalid; nested exception is org.xml.sax.SAXParseException: >>>>> cvc-complex-type.2.4.c: The matching wildcards is strict, but no >>>>> declaration >>>>> can be found for element 'file:poller'. >>>>> > >>>>> > Line 18 the open beans (<beans...) line. >>>>> > >>>>> > Thanks >>>>> > >>>>> > Glenn >>>>> > >>>>> > -----Original Message----- >>>>> > From: Guillaume Nodet [mailto:[email protected]] >>>>> > Sent: 26 March 2009 23:30 >>>>> > To: users >>>>> > Subject: Re: Example problem >>>>> > >>>>> > There are a few simple examples you can look at in the distribution. >>>>> > Some of them are available in the examples/simple folder. >>>>> > They're not really using the file component, but you should be able to >>>>> > adapt those easily. >>>>> > >>>>> > 2009/3/26 Glenn Macgregor <[email protected]>: >>>>> >> Ok, sorry for jumping the gun on the post. It seems like it takes a few >>>>> mvn runs before all the dependencies get resolved... >>>>> >> >>>>> >> So now I have SMX4 built, installed and running and I want to create a >>>>> simple example. >>>>> >> >>>>> >> How would I configure the servicemix-file component to watch a >>>>> >> directory >>>>> and put all files that appear in that dir on an activemq queue? Is this >>>>> possible without java code? >>>>> >> >>>>> >> Thanks >>>>> >> >>>>> >> Glenn >>>>> >> >>>>> >> From: Glenn Macgregor >>>>> >> Sent: 26 March 2009 14:26 >>>>> >> To: '[email protected]' >>>>> >> Subject: Example problem >>>>> >> >>>>> >> Hi all, >>>>> >> >>>>> >> Just getting started with servicemix...and maven, I am having a problem >>>>> building the cxf-wsdl-first example. I run maven install and it goes off >>>>> and >>>>> downloads many packages but for many of them I get: >>>>> >> >>>>> >> Unable to find resource >>>>> >> >>>>> >> Downloading: >>>>> http://download.java.net/maven/2/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom >>>>> >> [INFO] Unable to find resource >>>>> 'org.codehaus.plexus:plexus-interpolation:pom:1.6' in repository >>>>> java.net.2 >>>>> (http://download.java.net/maven/2) >>>>> >> >>>>> >> I am really looking forward to getting servicemix going, so any help on >>>>> this issue would be great. >>>>> >> >>>>> >> Thanks >>>>> >> >>>>> >> Glenn >>>>> >> >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > Cheers, >>>>> > Guillaume Nodet >>>>> > ------------------------ >>>>> > Blog: http://gnodet.blogspot.com/ >>>>> > ------------------------ >>>>> > Open Source SOA >>>>> > http://fusesource.com >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> Cheers, >>>>> Guillaume Nodet >>>>> ------------------------ >>>>> Blog: http://gnodet.blogspot.com/ >>>>> ------------------------ >>>>> Open Source SOA >>>>> http://fusesource.com >>>>> >>>> >>> >>> >>> >>> -- >>> Cheers, >>> Guillaume Nodet >>> ------------------------ >>> Blog: http://gnodet.blogspot.com/ >>> ------------------------ >>> Open Source SOA >>> http://fusesource.com >>> >> >> >> >> -- >> Cheers, >> Guillaume Nodet >> ------------------------ >> Blog: http://gnodet.blogspot.com/ >> ------------------------ >> Open Source SOA >> http://fusesource.com >> > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com
