Re: bean - camel-bindy - csv problem
Hi Kevin, I will have a look on that this afternoon and coming back to you with info. I have done the code and test it with Key value pair format but not yet for CSV. This could be possible. I think that @Section tag is not checked in bindyCSVFormat. Concerning version number, this should be camel 2.2 ? Can you confirm Claus ? Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com twitter : http://twitter.com/cmoulliard Linkedlin : http://www.linkedin.com/in/charlesmoulliard Apache Camel Group : http://www.linkedin.com/groups?home=gid=2447439trk=anet_ug_hm On Wed, Dec 23, 2009 at 8:55 AM, Kevin Jackson foamd...@gmail.com wrote: Hi, We have a requirement to generate CSV in the format header line,1,, line,2,, line,3,, footer,3 My reading of the docs (such as they are) suggests that this may be possible with @Link, @OneToMany and @Section I have the following model: @CsvRecord class PurchaseOrder { �...@link private Header; �...@link private Footer �...@onetomany private Line } @Link @Section(number=1) class Header { } @Link @Section(number=3) class Footer { } @Section(number=2) class Line { } Reading the docs [1] there is a suggestion that the @Section annotation is really only useful for FIX style k:v pairs, rather than vanilla CSV. The output I get with this is odd: line,1,,, line,2,,, line,3,,, header footer,3,,, - this actually contains the correct data in position 12, but then contains data in position 3-6 copied from the first line record, as the footer only has 1 field in the class I'm failing to see how this extra data is being bound. The @Section(number=1) etc seems to be ignored in this instance. Is it possible to create this format of structured CSV from bindy (camel 2.1)? If so what am I doing wrong? If it isn't possible (yet) I'm more than willing to contribute a patch to make this possible Thanks, Kev [1] http://camel.apache.org/bindy.html
Re: bean - camel-bindy - csv problem
Hi, I will have a look on that this afternoon and coming back to you with info. I have done the code and test it with Key value pair format but not yet for CSV. This could be possible. I think that @Section tag is not checked in bindyCSVFormat. Concerning version number, this should be camel 2.2 ? Can you confirm Claus ? I'm looking at trunk src which I believe will be 2.2, but I'm using 2.1 binary (I have tried to build trunk, but the poms are currently broken and the trunk won't build from a clean .m2 - also the binary doesn't contain camel-bindy.jar - so I had to download this separately from repo1) I'm happy to submit patches for fixes for these and any other problems, but until I can build the current trunk from src, I'm stuck Kev
camel-xmpp througth proxy
Hello all! My route: from(stream:in?promptMessage=You message: ).to(xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx); My problem: At home, without proxy server, this route send message to aleksey.ma...@gmail.com sucessfull. But at office computer, with proxy server, xmpp component throw exception after try to connect, and message not send. Tracer INFO 2e15772d-07ff-48e7-b720-0708c4aee90e (route1) from(stream://in?promptMessage=You message: ) -- xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx Pattern:InOnly, BodyType:String, Body:mymessage XmppPrivateChatProducerDEBUG Creating XmppPrivateChatProducer to participant aleksey.ma...@gmail.com DefaultManagementAgent DEBUG Registered MBean with objectname: org.apache.camel:context=masny/camelContext,type=producers,name=XmppPrivateChatProducer(0x14627a) XmppPrivateChatProducerDEBUG Starting producer: Producer[xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx] ProducerCache DEBUG Adding to producer cache with key: Endpoint[xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx] for producer: Producer[xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx] DefaultErrorHandlerDEBUG Failed delivery for exchangeId: 2e15772d-07ff-48e7-b720-0708c4aee90e. On delivery attempt: 0 caught: java.lang.NullPointerException DefaultErrorHandlerDEBUG This exchange is not handled so its marked as failed: Exchange[Message: mymessage] I try to set proxy before init Camel public static void main(String... args) throws Exception { System.getProperties().put(proxySet, true); System.getProperties().put(proxyHost, 127.0.0.1); System.getProperties().put(proxyPort, 8989); Main.main(args); } But message not sended. I try to set VM parameters when running my route -DproxyHost=osaka.mti.net -DproxyPort=3128 Yes, message not sended also. How settings proxy for camel-xmpp component? For example, in camel-http component have own proxy settings. Sorry my English. -- View this message in context: http://old.nabble.com/camel-xmpp-througth-proxy-tp26897637p26897637.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: bean - camel-bindy - csv problem
On Wed, Dec 23, 2009 at 9:54 AM, Kevin Jackson foamd...@gmail.com wrote: Hi, I will have a look on that this afternoon and coming back to you with info. I have done the code and test it with Key value pair format but not yet for CSV. This could be possible. I think that @Section tag is not checked in bindyCSVFormat. Concerning version number, this should be camel 2.2 ? Can you confirm Claus ? I'm looking at trunk src which I believe will be 2.2, but I'm using 2.1 binary (I have tried to build trunk, but the poms are currently broken and the trunk won't build from a clean .m2 - also the binary doesn't contain camel-bindy.jar - so I had to download this separately from repo1) And you follow the guidelines from http://camel.apache.org/building.html Doing a quick clean build? And consider using nexus as its goes much faster and easier with maven. I'm happy to submit patches for fixes for these and any other problems, but until I can build the current trunk from src, I'm stuck Kev -- 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
Re: bean - camel-bindy - csv problem
Hi, I will have a look on that this afternoon and coming back to you with info. I have done the code and test it with Key value pair format but not yet for CSV. This could be possible. I think that @Section tag is not checked in bindyCSVFormat. Concerning version number, this should be camel 2.2 ? Can you confirm Claus ? I'm looking at trunk src which I believe will be 2.2, but I'm using 2.1 binary (I have tried to build trunk, but the poms are currently broken and the trunk won't build from a clean .m2 - also the binary doesn't contain camel-bindy.jar - so I had to download this separately from repo1) And you follow the guidelines from http://camel.apache.org/building.html Doing a quick clean build? And consider using nexus as its goes much faster and easier with maven. I am using maven to build the camel-trunk but I'm having to hack pom files to correct version numbers of jars which are not available in the repos. I'm running mvn -Dtest=false -DfailIfNoTests=false clean install from the building page and I get multiple failures which I have to fix each one before I can re-run and then fix the next Can you confirm that with an empty ~/.m2 that the camel-trunk source is actually buildable? kjack...@ws55:~/tools/camel$ mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100) Java version: 1.6.0_16 Java home: /usr/lib/jvm/java-6-sun-1.6.0.16/jre Default locale: en_GB, platform encoding: UTF-8 OS name: linux version: 2.6.31-16-generic arch: i386 Family: unix Thanks, Kev
Re: bean - camel-bindy - csv problem
Hi Kevin, Modifying camel-bindy to allow @Section will take more time than a few minutes because the existing code is based on a recursive method (required to generate in output a CSV with several repeat group) and is a but complicated to modified. Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com twitter : http://twitter.com/cmoulliard Linkedlin : http://www.linkedin.com/in/charlesmoulliard Apache Camel Group : http://www.linkedin.com/groups?home=gid=2447439trk=anet_ug_hm On Wed, Dec 23, 2009 at 2:55 PM, Kevin Jackson foamd...@gmail.com wrote: Hi, I will have a look on that this afternoon and coming back to you with info. I have done the code and test it with Key value pair format but not yet for CSV. This could be possible. I think that @Section tag is not checked in bindyCSVFormat. Concerning version number, this should be camel 2.2 ? Can you confirm Claus ? I'm looking at trunk src which I believe will be 2.2, but I'm using 2.1 binary (I have tried to build trunk, but the poms are currently broken and the trunk won't build from a clean .m2 - also the binary doesn't contain camel-bindy.jar - so I had to download this separately from repo1) And you follow the guidelines from http://camel.apache.org/building.html Doing a quick clean build? And consider using nexus as its goes much faster and easier with maven. I am using maven to build the camel-trunk but I'm having to hack pom files to correct version numbers of jars which are not available in the repos. I'm running mvn -Dtest=false -DfailIfNoTests=false clean install from the building page and I get multiple failures which I have to fix each one before I can re-run and then fix the next Can you confirm that with an empty ~/.m2 that the camel-trunk source is actually buildable? kjack...@ws55:~/tools/camel$ mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100) Java version: 1.6.0_16 Java home: /usr/lib/jvm/java-6-sun-1.6.0.16/jre Default locale: en_GB, platform encoding: UTF-8 OS name: linux version: 2.6.31-16-generic arch: i386 Family: unix Thanks, Kev
Re: camel-xmpp througth proxy
Hi Alexey, XMPP is used for connecting to IRC based endpoints. Are you sure that this is allowed at your company. Most companies block these ports to prevent this exact kind of communication from taking place. Also, is port 8989 available for you. I hope no other process has locked up this port :). Cheers, Ashwin... Aleksey Masny wrote: Hello all! My route: from(stream:in?promptMessage=You message: ).to(xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx); My problem: At home, without proxy server, this route send message to aleksey.ma...@gmail.com sucessfull. But at office computer, with proxy server, xmpp component throw exception after try to connect, and message not send. Tracer INFO 2e15772d-07ff-48e7-b720-0708c4aee90e (route1) from(stream://in?promptMessage=You message: ) -- xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx Pattern:InOnly, BodyType:String, Body:mymessage XmppPrivateChatProducerDEBUG Creating XmppPrivateChatProducer to participant aleksey.ma...@gmail.com DefaultManagementAgent DEBUG Registered MBean with objectname: org.apache.camel:context=masny/camelContext,type=producers,name=XmppPrivateChatProducer(0x14627a) XmppPrivateChatProducerDEBUG Starting producer: Producer[xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx] ProducerCache DEBUG Adding to producer cache with key: Endpoint[xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx] for producer: Producer[xmpp://pi...@qip.ru/aleksey.ma...@gmail.com?password=xx] DefaultErrorHandlerDEBUG Failed delivery for exchangeId: 2e15772d-07ff-48e7-b720-0708c4aee90e. On delivery attempt: 0 caught: java.lang.NullPointerException DefaultErrorHandlerDEBUG This exchange is not handled so its marked as failed: Exchange[Message: mymessage] I try to set proxy before init Camel public static void main(String... args) throws Exception { System.getProperties().put(proxySet, true); System.getProperties().put(proxyHost, 127.0.0.1); System.getProperties().put(proxyPort, 8989); Main.main(args); } But message not sended. I try to set VM parameters when running my route -DproxyHost=osaka.mti.net -DproxyPort=3128 Yes, message not sended also. How settings proxy for camel-xmpp component? For example, in camel-http component have own proxy settings. Sorry my English. - --- Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence Progress Software Corporation 14 Oak Park Drive Bedford, MA 01730 --- +1-972-304-9084 (Office) +1-972-971-1700 (Mobile) Blog: http://opensourceknowledge.blogspot.com/ -- View this message in context: http://old.nabble.com/camel-xmpp-througth-proxy-tp26897637p26905065.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Web Console configuration
The webconsole is not picking your routes because you're not telling it to :D If you only change the packaging of your pom to war and add the camel-web dependency, the application context will load a provided sample applicationContext.xml, but if you already provide a web application folder structure, and drop your own applicationContext.xml file in the WEB-INF directory, then your routes will be taken in account as the application is loaded. As James said if you use package-scan in your xml routes then all the classes which extend RouteBuilder and specify the right packages, you'll be able to load your DSL based routes. this link is relevant: http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html willem.jiang wrote: You can use the Spring to load the Java DSL route configure() like this camelContext id=camel5 xmlns=http://camel.apache.org/schema/spring; routeBuilder ref=myBuilder / /camelContext bean id=myBuilder class=org.apache.camel.spring.example.test1.MyRouteBuilder/ And you can find more information here[1] [1] http://camel.apache.org/spring.html Willem mistrz wrote: So I have to define my routes explicitly in Spring? If I define my routes inside configure() the Web Console will not recognize them? James.Strachan wrote: 2009/12/21 mistrz grok...@edmunds.com: How do I configure Web Console to look at my routes? The web console starts by loading the Spring applicationContext.xml file in WEB-INF. Put whatever routes you want in there (or include them from that spring XML file). Is there a parameter to define the broker uri? (Currently I have tcp://localhost:61616). Configure the activemq component in the spring XML file. There's an example WAR using camel-web which uses ActiveMQ and creates an embedded broker here... http://svn.apache.org/repos/asf/camel/sandbox/components/camel-activemq-web/ -- James --- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/ -- View this message in context: http://old.nabble.com/Web-Console-configuration-tp26878983p26905546.html Sent from the Camel - Users mailing list archive at Nabble.com.
The latest camel java archetype (2.1.0) is not working correctly
Hello Community, When I run the following mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-java -DarchetypeVersion=2.1.0 -DgroupId=com.corp.projects -DartifactId=camel-jira-ws Everything looks ok, but glancing at the generated pom.xml in the newly created project, it seems the archetype didn't pick the groupId and the artifactID = groupId${project.groupId}/groupId artifactId${project.artifactId}/artifactId packagingjar/packaging version1.0-SNAPSHOT/version = the 2.0.0 archetype works fine. just a FYI Should a JIRA issue be raised? -- View this message in context: http://old.nabble.com/The-latest-camel-java-archetype-%282.1.0%29-is-not-working-correctly-tp26905679p26905679.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: The latest camel java archetype (2.1.0) is not working correctly
Hi Ryadh, Thanks for pointing that out. Yes, a jira should be created, please mark it as a bug. If you know what the cause is and could submit a patch, even better. Thanks, Hadrian On Dec 23, 2009, at 1:29 PM, Ryadh Amar wrote: Hello Community, When I run the following mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-java -DarchetypeVersion=2.1.0 -DgroupId=com.corp.projects -DartifactId=camel-jira-ws Everything looks ok, but glancing at the generated pom.xml in the newly created project, it seems the archetype didn't pick the groupId and the artifactID = groupId${project.groupId}/groupId artifactId${project.artifactId}/artifactId packagingjar/packaging version1.0-SNAPSHOT/version = the 2.0.0 archetype works fine. just a FYI Should a JIRA issue be raised? -- View this message in context: http://old.nabble.com/The-latest-camel-java-archetype-%282.1.0%29-is-not-working-correctly-tp26905679p26905679.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: The latest camel java archetype (2.1.0) is not working correctly
Darn! Looks like a change I made to support Maven 3 broke Maven 2. I've put a fix on trunk so the artifact/group substitution will work for next time. On Wed, Dec 23, 2009 at 2:59 PM, Ryadh Amar magnetic.gan...@gmail.comwrote: Hello Community, When I run the following mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-java -DarchetypeVersion=2.1.0 -DgroupId=com.corp.projects -DartifactId=camel-jira-ws Everything looks ok, but glancing at the generated pom.xml in the newly created project, it seems the archetype didn't pick the groupId and the artifactID = groupId${project.groupId}/groupId artifactId${project.artifactId}/artifactId packagingjar/packaging version1.0-SNAPSHOT/version = the 2.0.0 archetype works fine. just a FYI Should a JIRA issue be raised? -- View this message in context: http://old.nabble.com/The-latest-camel-java-archetype-%282.1.0%29-is-not-working-correctly-tp26905679p26905679.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
Camel-Cache: Processors not released?
It looks like camel-cache processor are not released? I did unjar camel-cache 2.1.0 jar, it does not have processor (ex: CacheBasedTokenReplacer) classes, and on exploding source jar it does seem to have processor sources. Are those missing or am I mis-understanding something? or do I need some other dependency? Thanks! -- View this message in context: http://old.nabble.com/Camel-Cache%3A-Processors-not-released--tp26908653p26908653.html Sent from the Camel - Users mailing list archive at Nabble.com.
Dose The Camel client connect to, send, and receive messages from a remote Camel Server?
We know the camel clients( ProducerTemplate and ConsumerTemplate) can send and receive messages from loacal Camel server(DefaultCamelContext). But how can i send and receive messages from remote Camel server with camel client or camel api ? -- View this message in context: http://old.nabble.com/Dose-The-Camel-client-connect-to%2C-send%2C-and-receive-messages-from-a-remote-Camel-Server--tp26910031p26910031.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Dose The Camel client connect to, send, and receive messages from a remote Camel Server?
Hi, If you are using the component that can send/receive the message across the JVM, such as camel-jms, camel-http, camel-cxf, camel-mina. All you need to do is setting the right endpoint uri on the Template API. Willem honno wrote: We know the camel clients( ProducerTemplate and ConsumerTemplate) can send and receive messages from loacal Camel server(DefaultCamelContext). But how can i send and receive messages from remote Camel server with camel client or camel api ?
Re: Dose The Camel client connect to, send, and receive messages from a remote Camel Server?
Yes.We can send and receive messages to the remote camel server with some components(camel-jms,camel-cxf...),but i want to kown that which camel client api i can use to access remote camel server. willem.jiang wrote: Hi, If you are using the component that can send/receive the message across the JVM, such as camel-jms, camel-http, camel-cxf, camel-mina. All you need to do is setting the right endpoint uri on the Template API. Willem honno wrote: We know the camel clients( ProducerTemplate and ConsumerTemplate) can send and receive messages from loacal Camel server(DefaultCamelContext). But how can i send and receive messages from remote Camel server with camel client or camel api ? -- View this message in context: http://old.nabble.com/Dose-The-Camel--clients%28-ProducerTemplate-and-ConsumerTemplate%29-canconnect-to%2C-send%2C-and-receive-messages-from-a-remote-Camel-Server--tp26910031p26911134.html Sent from the Camel - Users mailing list archive at Nabble.com.