Re: camel error with simple program with camel-core-2.11.1.jar
Hi Try with ctx.getProperties().put(Exchange.LOG_DEBUG_BODY_STREAMS, true); On Thu, Jul 18, 2013 at 7:07 AM, vinay vinay_samu...@yahoo.com wrote: Hi All, I am new to camel, here is what I am trying and is giving me exception. $groovy -v Groovy Version: 2.1.3 JVM: 1.7.0_11 Vendor: Oracle Corporation OS: Linux $groovy CallCallista1.groovy give following exception... [main] INFO camelLogger - Exchange[ExchangePattern:InOut, BodyType:String, Body test message] Caught: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java. ang.String java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.Str ng at org.apache.camel.impl.DefaultCamelContext.getProperty(DefaultCamelCo text.java:2594) at org.apache.camel.util.MessageHelper.extractBodyForLogging(MessageHel er.java:161) at org.apache.camel.util.MessageHelper.extractBodyForLogging(MessageHel er.java:144) at org.apache.camel.impl.DefaultMessage.toString(DefaultMessage.java:46 at org.apache.camel.impl.DefaultExchange.toString(DefaultExchange.java: 0) at CallCallista1.run(CallCallista1.groovy:25) and, here is program... = @Grab('org.apache.camel:camel-core:') @Grab('org.slf4j:slf4j-simple:') import org.apache.camel.* import org.apache.camel.impl.* import org.apache.camel.builder.* class MyRouteBuilder extends org.apache.camel.builder.RouteBuilder { void configure() { from(direct://foo) .to(log://camelLogger?level=INFO) .to(mock://result?retainLast=10) } } def mrb = new MyRouteBuilder() def ctx = new org.apache.camel.impl.DefaultCamelContext() ctx.getProperties().put(Exchange.LOG_DEBUG_BODY_STREAMS, true); ctx.addRoutes mrb ctx.start() p = ctx.createProducerTemplate() p.sendBody(direct:foo, ExchangePattern.InOut, test message) e = ctx.getEndpoint(mock://result?retainLast=10); def ex = e.exchanges println INFO ${ex.first()} println INFO ${ex.first().getException()} -- View this message in context: http://camel.465427.n5.nabble.com/camel-error-with-simple-program-with-camel-core-2-11-1-jar-tp5735829.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: problem processing CSV to Database (camel-csv and camel-sql)
Hi I think CSV unmarshal to a ListMap so you would need to turn that into a Map. camel:unmarshal camel:csv/ /camel:unmarshal transform simple${body[0]}/simple /transform On Thu, Jul 18, 2013 at 2:24 AM, vs.souza vs.so...@gmail.com wrote: Hello guys, I built the following camel route using spring dsl: UserCSVToMySQL.xml http://camel.465427.n5.nabble.com/file/n5735821/UserCSVToMySQL.xml ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:camel=http://camel.apache.org/schema/spring; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:osgi=http://www.springframework.org/schema/osgi; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/spring-osgi.xsd; bean id=loaderDS class=org.apache.commons.dbcp.BasicDataSource property name=driverClassName value=com.mysql.jdbc.Driver / property name=url value=jdbc:mysql://localhost:3306/sandbox-db/ property name=username value=sanduser / property name=password value=sandpass / property name=initialSize value=5 / property name=maxIdle value=5 / property name=maxActive value=30 / property name=maxWait value=1 / property name=poolPreparedStatements value=true / property name=validationQuery value=SELECT 1 / /bean camel:camelContext id=CSVLoaderContext trace=false camel:route id=UserCSVToMYSQL camel:from uri=file:/home/jedi/Java/Workspaces/FileSandbox?delete=true / camel:split parallelProcessing=true streaming=true camel:tokenize token=\n / camel:unmarshal camel:csv/ /camel:unmarshal camel:to uri=sql:INSERT INTO user(`id`,`external_user_id`,`first_name`,`last_name`,`email`,`active`) VALUES (#,#,#,#,#)?dataSourceRef=loaderDS/ /camel:split /camel:route /camel:camelContext /beans but when I try to execute it keeps displaying the error: 21:12:53,677 | ERROR | read #46 - Split | DefaultErrorHandler | 95 - org.apache.camel.camel-core - 2.10.3 | Failed delivery for (MessageId: ID-ubuntu-32934-1374106272368-2-1 on ExchangeId: ID-ubuntu-32934-1374106272368-2-4370). Exhausted after delivery attempt: 1 caught: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO user(`id`,`external_user_id`,`first_name`,`last_name`,`email`,`active`) VALUES (?,?,?,?,?)]; SQL state [null]; error code [0]; Number of parameters mismatch. Expected: 5, was:1; nested exception is java.sql.SQLException: Number of parameters mismatch. Expected: 5, was:1 org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO user(`id`,`external_user_id`,`first_name`,`last_name`,`email`,`active`) VALUES (?,?,?,?,?)]; SQL state [null]; error code [0]; Number of parameters mismatch. Expected: 5, was:1; nested exception is java.sql.SQLException: Number of parameters mismatch. Expected: 5, was:1 Looks like that camel-sql is not understanding the ArrayList that is coming to assign to each Insert parameter. Below I send you a couple of registers that I have in my csv file that: 0,firstname0,lastname0,emailfromus...@usermail.com,1 1,firstname1,lastname1,emailfromus...@usermail.com,1 2,firstname2,lastname2,emailfromus...@usermail.com,1 3,firstname3,lastname3,emailfromus...@usermail.com,1 4,firstname4,lastname4,emailfromus...@usermail.com,1 5,firstname5,lastname5,emailfromus...@usermail.com,1 6,firstname6,lastname6,emailfromus...@usermail.com,1 7,firstname7,lastname7,emailfromus...@usermail.com,1 8,firstname8,lastname8,emailfromus...@usermail.com,1 9,firstname9,lastname9,emailfromus...@usermail.com,1 10,firstname10,lastname10,emailfromuse...@usermail.com,1 11,firstname11,lastname11,emailfromuse...@usermail.com,1 12,firstname12,lastname12,emailfromuse...@usermail.com,1 13,firstname13,lastname13,emailfromuse...@usermail.com,1 14,firstname14,lastname14,emailfromuse...@usermail.com,1 15,firstname15,lastname15,emailfromuse...@usermail.com,1 16,firstname16,lastname16,emailfromuse...@usermail.com,1 17,firstname17,lastname17,emailfromuse...@usermail.com,1
Re: Replacing standalone client with generic one in cxf component
Hi, What's the operation that your standalone client is invoking? If you know which operation your client should invoke, you can set it throughout the camel-cxf endpoint uri. If you want to change it dynamically, you can setup the message header per invocation. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Thursday, July 18, 2013 at 12:31 PM, cannykanna wrote: HI I have a wsdl with has many operations and input parameters defined for each. Now I wrote a standalone client with talks to my endpoint which exposes its services through webservices. This client talks with this endpoint and only one operation is defined in it. Now What I am looking is as follows. From my starting triggering point I say I have to hit the endpoint and do one operation on it say get operation. Now through Camel the the message has to pass as defined by our routing and hit that endpoint and give back the response as per our routing. For this my client has to be replaced by a generic one. How can I do this..? Any ideas? And through my endpoint I can do any operation uses SOAP messages only.? Does camel has SOAP Component? For Any Extra Information, feel free to ask. Regards, Kannaiah -- View this message in context: http://camel.465427.n5.nabble.com/Replacing-standalone-client-with-generic-one-in-cxf-component-tp5735827.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Groovy script synchronized issue with 2.10.x and 2.11.x prevents camel groovy script for High Concurrenc
The ScriptEngine evaluate method is not thread safe, I think you can use seda component to cache the request in the queue, then using one consumer to processing the groovy script. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, July 18, 2013 at 1:21 AM, apatel wrote: In below code why method is synchronized? This prevents camel groovy script for High Concurrency. protected synchronized Object evaluateScript(Exchange exchange) { try { getScriptContext(); populateBindings(getEngine(), exchange); addScriptEngineArguments(getEngine(), exchange); Object result = runScript(exchange); LOG.debug(The script evaluation result is: {}, result); return result; } catch (ScriptException e) { if (LOG.isDebugEnabled()) { LOG.debug(Script evaluation failed: + e.getMessage(), e); } throw createScriptEvaluationException(e.getCause()); } catch (IOException e) { throw createScriptEvaluationException(e); } } I've below two routes. When i tested this route with 1 tps it returns responses in avg 1005 ms but when i tested same route with 5tps it returns responses in avg 8005 ms. My goal is tuning this routes for High Concurrency. route xmlns=http://camel.apache.org/schema/spring; trace=true from uri=restlet:/test/v1.0/testGroovyWait/ to uri=direct:test.directGroovyWait.v1.0/ /route route xmlns=http://camel.apache.org/schema/spring; errorHandlerRef=noErrorHandler from uri=direct:test.directGroovyWait.v1.0/ setHeader headerName=foo groovy Thread.sleep(1000) return OK /groovy /setHeader setBody headerfoo/header /setBody /route I think we've found the root cause of our groovy performance problem. I did a little testing this morning and found that a single thread test with the route that waits 1 second had an average response time of about 1005 milliseconds. When I took this to 5 threads the average response time went up to 4389. When I went to 10 threads the average went to 9169. This is all without any pauses in the script so each thread is hitting the server as soon as the result returns. Here's the pattern of response times at the beginning of the 10 thread test: 1004, 1101, 2201, 3303, 4403, 5504, 6605, 7705, 8806, 9908, 2000, 4001, 6001, 8002, 10003, 12003, 14005, 16005, 18006 Interestingly the 3rd thread took 2.2 seconds, the 4th thread took 3.3 seconds, the 5th thread 5.5 seconds and so on. This clearly pointed to some sort of semaphore or single resource that each thread was waiting for in turn. I took a look at the active threads using console. Here's where most of the worker threads (http-bio-8080-exec-n) were waiting: Name: http-bio-8080-exec-3 State: BLOCKED on org.apache.camel.builder.script.ScriptBuilder@12349d8 owned by: http-bio-8080-exec-6 Total blocked: 99 Total waited: 271 Stack trace: org.apache.camel.builder.script.ScriptBuilder.evaluateScript(ScriptBuilder.java:338) org.apache.camel.builder.script.ScriptBuilder.evaluate(ScriptBuilder.java:92) org.apache.camel.builder.script.ScriptBuilder.evaluate(ScriptBuilder.java:96) org.apache.camel.builder.ProcessorBuilder$4.process(ProcessorBuilder.java:103) org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) from --Doug -- View this message in context: http://camel.465427.n5.nabble.com/Groovy-script-synchronized-issue-with-2-10-x-and-2-11-x-prevents-camel-groovy-script-for-High-Concurc-tp5735815.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Groovy script synchronized issue with 2.10.x and 2.11.x prevents camel groovy script for High Concurrenc
I think we can cache the ScriptEngine as a thread local variable, and we need to find a way to clean up these variables when the camel route is shutdown. So I just fill a JIRA[1] for it. [1] https://issues.apache.org/jira/browse/CAMEL-6559 -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, July 18, 2013 at 3:01 PM, Willem jiang wrote: The ScriptEngine evaluate method is not thread safe, I think you can use seda component to cache the request in the queue, then using one consumer to processing the groovy script. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, July 18, 2013 at 1:21 AM, apatel wrote: In below code why method is synchronized? This prevents camel groovy script for High Concurrency. protected synchronized Object evaluateScript(Exchange exchange) { try { getScriptContext(); populateBindings(getEngine(), exchange); addScriptEngineArguments(getEngine(), exchange); Object result = runScript(exchange); LOG.debug(The script evaluation result is: {}, result); return result; } catch (ScriptException e) { if (LOG.isDebugEnabled()) { LOG.debug(Script evaluation failed: + e.getMessage(), e); } throw createScriptEvaluationException(e.getCause()); } catch (IOException e) { throw createScriptEvaluationException(e); } } I've below two routes. When i tested this route with 1 tps it returns responses in avg 1005 ms but when i tested same route with 5tps it returns responses in avg 8005 ms. My goal is tuning this routes for High Concurrency. route xmlns=http://camel.apache.org/schema/spring; trace=true from uri=restlet:/test/v1.0/testGroovyWait/ to uri=direct:test.directGroovyWait.v1.0/ /route route xmlns=http://camel.apache.org/schema/spring; errorHandlerRef=noErrorHandler from uri=direct:test.directGroovyWait.v1.0/ setHeader headerName=foo groovy Thread.sleep(1000) return OK /groovy /setHeader setBody headerfoo/header /setBody /route I think we've found the root cause of our groovy performance problem. I did a little testing this morning and found that a single thread test with the route that waits 1 second had an average response time of about 1005 milliseconds. When I took this to 5 threads the average response time went up to 4389. When I went to 10 threads the average went to 9169. This is all without any pauses in the script so each thread is hitting the server as soon as the result returns. Here's the pattern of response times at the beginning of the 10 thread test: 1004, 1101, 2201, 3303, 4403, 5504, 6605, 7705, 8806, 9908, 2000, 4001, 6001, 8002, 10003, 12003, 14005, 16005, 18006 Interestingly the 3rd thread took 2.2 seconds, the 4th thread took 3.3 seconds, the 5th thread 5.5 seconds and so on. This clearly pointed to some sort of semaphore or single resource that each thread was waiting for in turn. I took a look at the active threads using console. Here's where most of the worker threads (http-bio-8080-exec-n) were waiting: Name: http-bio-8080-exec-3 State: BLOCKED on org.apache.camel.builder.script.ScriptBuilder@12349d8 owned by: http-bio-8080-exec-6 Total blocked: 99 Total waited: 271 Stack trace: org.apache.camel.builder.script.ScriptBuilder.evaluateScript(ScriptBuilder.java:338) org.apache.camel.builder.script.ScriptBuilder.evaluate(ScriptBuilder.java:92) org.apache.camel.builder.script.ScriptBuilder.evaluate(ScriptBuilder.java:96) org.apache.camel.builder.ProcessorBuilder$4.process(ProcessorBuilder.java:103) org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) from --Doug -- View this message in context: http://camel.465427.n5.nabble.com/Groovy-script-synchronized-issue-with-2-10-x-and-2-11-x-prevents-camel-groovy-script-for-High-Concurc-tp5735815.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Message Processing Performance while splitting
Hi , Camel is using java.util.Scanner for splitting the input stream by using token \n. So it makes sense that it is slower then using the BufferedReader to read the file. You can read the file yourself by implementing a customer splitter just like the ZipFile does[1] [1]https://issues.apache.org/jira/browse/CAMEL-6139 -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, July 18, 2013 at 10:28 AM, Vic wrote: I am processing big file - line by line with camel. The average amount of processed messages per second is 30k. When I do the same in java using BufferedReader - the average amount of processed messages per second is 500k. I am processing the same file. This is significant performance lost. Am I doing something wrong in Camel? camel route : from(file:C:/Test?fileName=test_file.txtnoop=true) .split().tokenize(\n).streaming() .to(log:INFO?groupSize=1); java code: FileReader fr = new FileReader(C:/Test/test_file.txt); BufferedReader br = new BufferedReader(fr); long count = 0; long start = System.currentTimeMillis(); while(br.readLine() != null) { count++; if(count % 1 == 0) { long now = System.currentTimeMillis(); long msgPerSecond = 1000*count/(now-start); System.out.println(msgPerSecond); } } br.close(); -- View this message in context: http://camel.465427.n5.nabble.com/Message-Processing-Performance-while-splitting-tp5735824.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: How to recover corrupted HawtDB files
Hi Claus I'm using camel-hawtdb 2.9.6 and (according to the classpath) hawtdb 1.6. The fact that hawtdb has no recovery tools but I need to build them by myself is bad news to me. After all I use the great Camel framework to avoid building general-purpose functionality like this by myself. How about LevelDB? Has it better tool support? And can I already use leveldb with a Camel 2.x release? I stumbled over LevelDB while searching for recovery options for HawtDB, but I didn't find an example how to use it with the aggregator. Is there a unittest or similar I can look at? Thanks Stefan Von aabändle bis zwüsche - das umfangreichste Berndeutsch-Wörterbuch im Internet: http://www.berndeutsch.ch Ausserdem: Das Blog zur Website unter http://blog.berndeutsch.ch Facebook-Seite unter https://www.facebook.com/berndeutsch Google+ Seite unter http://www.google.com/+berndeutsch On Wed, Jul 17, 2013 at 10:10 AM, Claus Ibsen claus.ib...@gmail.com wrote: What version of Camel and HawtDB are you using? To try to recover you would possible need to write some java code with the HawtDB API to load the corrupted file(s) and peak inside. Down the road we recommend using camel-leveldb instead of camel-hawtdb. This uses LevelDB as the store instead which is a much more mature and widespread used store. https://code.google.com/p/leveldb/ Apache ActiveMQ 5.9 offers leveldb out of the box, and is being considered as the recommended/default store over its KahaDB store. The camel-leveldb has the same functionality as camel-hawtdb and is very similar to setup. On Tue, Jul 16, 2013 at 10:12 AM, Stefan Burkard sburk...@gmail.com wrote: Hi Camel users I have a component with 2 persistent aggregators. One receives all messages, one only a part of them. After a lot of test runs without problems I had yesterday a serious problem with the aggregator persistence (hawtdb). I don't know yet what causes the problems, but however, problems can occur. My problem is that I cannot recover the data from the hawtdb-files. Im my logs, I got first of all about 8 stacktraces like the attached stacktrace1.txt. The number in the error message The requested page was not an extent: 35 is growing from stacktrace to stacktrace from 35 to 1163. Then, I got some stacktraces like the attached stacktrace2.txt. Finally I got A LOT of stacktraces like the attached stacktrace3.txt. After shutting down the component gracefully, I tried to restart it, but this throws stacktraces like the attached stacktrace-startup.txt. I can only start the component again if I rename the hawtdb-files so they are ignored and new hawtdb-files are created. This leaves me with the question: how can I recover the corrupted hawtdb-files? I didn't found anything about this subject and if this is not possible, this would be a real show-stopper. Thanks for any help Stefan -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Work with Exchange.HTTP_QUERY
Hi, I've an url with query parameters which is dynamically generated. i don't know how many parameters there are. i want to hit the url and get the body. say my url looks like : http://myhost.com?name=xxxid=yyy it needs basic authentication. so i request Object object = producerTemplate.requestBody(direct:get, url); and my route is : from(direct:epGet) .setHeader(Exchange.HTTP_METHOD, constant(GET)) .recipientList(simple(${body}?authMethod=BasicauthUsername=userauthPassword=pass)); but when i run there is an error. The exchange message body is set correctly Endpoint[direct://epGet] Exchange[Message: http://myhost.com?name=xxxid=yyy] but it creates the following endPoint which is not correct. DEBUG DefaultComponent:117 - Creating endpoint uri=[http://myhost.com?authPassword=**authUsername=userid=yyyname=xxx%3FauthMethod%3DBasic], path=[myhost.com] to resolve this query param what should i do? any idea? -- View this message in context: http://camel.465427.n5.nabble.com/Work-with-Exchange-HTTP-QUERY-tp5735839.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: File upload
I moved the question to CXF forums and I also added solution http://cxf.547215.n5.nabble.com/Multipart-file-upload-td5730547.html -- View this message in context: http://camel.465427.n5.nabble.com/File-upload-tp5735172p5735840.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Work with Exchange.HTTP_QUERY
There are two character of ?. Can you change the recipientList to .recipientList(simple(${body}authMethod=BasicauthUsername=userauthPassword=pass) -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, July 18, 2013 at 4:35 PM, humayun0156 wrote: Hi, I've an url with query parameters which is dynamically generated. i don't know how many parameters there are. i want to hit the url and get the body. say my url looks like : http://myhost.com?name=xxxid=yyy it needs basic authentication. so i request Object object = producerTemplate.requestBody(direct:get, url); and my route is : from(direct:epGet) .setHeader(Exchange.HTTP_METHOD, constant(GET)) .recipientList(simple(${body}?authMethod=BasicauthUsername=userauthPassword=pass)); but when i run there is an error. The exchange message body is set correctly Endpoint[direct://epGet] Exchange[Message: http://myhost.com?name=xxxid=yyy] but it creates the following endPoint which is not correct. DEBUG DefaultComponent:117 - Creating endpoint uri=[http://myhost.com?authPassword=**authUsername=userid=yyyname=xxx%3FauthMethod%3DBasic], path=[myhost.com (http://myhost.com)] to resolve this query param what should i do? any idea? -- View this message in context: http://camel.465427.n5.nabble.com/Work-with-Exchange-HTTP-QUERY-tp5735839.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Work with Exchange.HTTP_QUERY
Thanks it works. -- View this message in context: http://camel.465427.n5.nabble.com/Work-with-Exchange-HTTP-QUERY-tp5735839p5735842.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: jsf and apache camel
You could learn angularjs (instead of JSF) and camel together, which is way cooler and more fun - then hack on hawtio :) More below... On 17 July 2013 20:18, lassesvestergaard lassesvesterga...@gmail.com wrote: Hi all. I'm learning camel and jsf at the same time. What I want to do is to create a jsf web application where it is possible to create, edit and delete routes. This means that I need to have camel running in the background for ever. I want to put camel inside a war, and when the application is deployed on a tomcat server, Camel will start and I can begin making routes through a browser. My initial problem is that I don't know how to run camel in the background of a jsf application. Web applications are only request scoped, so how do i configure jsf to keep part of the web application alive constantly? I know this is not directly related to Camel, but it's part of my problem and I decided to start from this forum. Please post any articles you might find relevant on this matter. My next issue is more directly related to camel. I want to be able to create routes with anonymous Processor objects (for simple conversion of data). As far as I understand it, this is only possible through native java, and not using xml. This means that I can't create anonymous Processor objects with ex. Spring. Furthermore I can't use the Camel web applications without Spring example (http://www.javacodegeeks.com/2013/01/camel-2-11-camel-web-applications-without-spring.html). Is this correctly understood? If not, please provide a link to where I can learn more. I know about hawt.io, and it seems like you can't create an anonymous Processor objects there either. In Camel XML you can't create an anonymous inner class for a Processor (since that requires Java source and a Java compiler); so hawtio has the same limitation. Though if you write some Java bean/processor and register it into your registry (JNDI / Spring / CDI / guice / whatever) you can then reference it from the XML DSL (and so from hawtio, Fuse IDE etc) So a simpler solution than creating anonymous Processors is just to create Java methods and then invoke them from the Camel DSL (e.g. method call expressions or using bean integration) http://camel.apache.org/bean-integration.html or if its for converting between different data types; then Camel's type conversion approach is pretty good: http://camel.apache.org/type-converter.html -- James --- Red Hat Email: jstra...@redhat.com Web: http://fusesource.com Twitter: jstrachan, fusenews Blog: http://macstrac.blogspot.com/ Open Source Integration
Using a jpa endpoint with no entityClassName
Hi, The URI format for a jpa endpoint is: jpa:[entityClassName][?options] and according to Apache Camel:JPA http://camel.apache.org/jpa.html , for sending to the endpoint, the entityClassName is optional. So I would expect the following route to successfully persist a message (that contains a known entity): route from uri=activemq:my-queue / to uri=jpa: / /route Can someone tell me what I'm missing please? Thanks Martin -- View this message in context: http://camel.465427.n5.nabble.com/Using-a-jpa-endpoint-with-no-entityClassName-tp5735854.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: problem processing CSV to Database (camel-csv and camel-sql)
Hello Claus... thank you very much. That worked like a charm. My best regards. Vinícius. -- View this message in context: http://camel.465427.n5.nabble.com/problem-processing-CSV-to-Database-camel-csv-and-camel-sql-tp5735821p5735852.html Sent from the Camel - Users mailing list archive at Nabble.com.
invoking camel route
Hi, I want to invoke camel route from java code. CamelContext doesn't seem to have any method to invoke route. Here is what my code looks like: @Autowired private CamelContext cc; public void testMethod() { System.out.println(cc.getRouteStatus(route1)); // prints true // how to invoke this route - route1 from here? }
Re: invoking camel route
Hi See this page http://camel.apache.org/walk-through-an-example.html You can use a producer template to send a message to a Camel route from java code. On Thu, Jul 18, 2013 at 5:58 PM, Tarun Kumar agrawal.taru...@gmail.com wrote: Hi, I want to invoke camel route from java code. CamelContext doesn't seem to have any method to invoke route. Here is what my code looks like: @Autowired private CamelContext cc; public void testMethod() { System.out.println(cc.getRouteStatus(route1)); // prints true // how to invoke this route - route1 from here? } -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Round Robin in Camel Routes
Hi, In my architecture I am using Jboss+ActiveMQ (integrated) and activeMQ. is it possible to have a camel route that does round-robin from one or more ActiveMQ queues? The round-robin I am trying to get is at the consumer end. This way my route can pull/consume messages at an even/constant rate. regards D -- View this message in context: http://camel.465427.n5.nabble.com/Round-Robin-in-Camel-Routes-tp5735857.html Sent from the Camel - Users mailing list archive at Nabble.com.
Hello World? Maybe not :)
Hi All, I have the simplest problem that apparently I can't figure out. I've never used direct:start as an endpoint before and I can't seem to get it to work the way I would expect it to. My config is below . I would like the route to start and print hello world. Seems easy. What am I overlooking? Thanks for your help ?xml version=1.0 encoding=UTF-8? beans default-init-method=init xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:camel=http://camel.apache.org/schema/spring; xsi:noNamespaceSchemaLocation=http://camel.apache.org/schema/spring/cam el-spring.xsd xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd camelContext xmlns=http://camel.apache.org/schema/spring; dataFormats jaxb id=myJaxb prettyPrint=true contextPath=com.prasad.sample/ /dataFormats camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route /camelContext /beans Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===
Re: Round Robin in Camel Routes
Hi If you are asking whether you can have a route across 2 brokers, that is a definite yes. I didn't get the question behind your 2nd paragraph. Best rgds Andreas Sent from Samsung tabletdeepak_a angesh...@gmail.com wrote:Hi, In my architecture I am using Jboss+ActiveMQ (integrated) and activeMQ. is it possible to have a camel route that does round-robin from one or more ActiveMQ queues? The round-robin I am trying to get is at the consumer end. This way my route can pull/consume messages at an even/constant rate. regards D -- View this message in context: http://camel.465427.n5.nabble.com/Round-Robin-in-Camel-Routes-tp5735857.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Round Robin in Camel Routes
Hi, I was not clear in my earlier query. let me clarify. In my current architecture I have multiple routes set up. Each route has has a unique 'from' point and a 'to' end point (that is common for all routes) e.g. Route 1: From: MQ-Queue;To: inbound.Queue (in activeMQ) Route 2: From: FTP; To: inbound.Queue (in activeMQ) Route 3: From: Webservice; To: inbound.Queue (in activeMQ) The issue I am facing is - since my destination (To end point) is Queue that is common for all routes, I am not able to evenly process the messages from each endpoint. My query is is it possible to set up one route like this Route 1: From: MQ-Queue; From: FTP; From: Webservice; To: inbound.Queue (in activeMQ) The same route consumes messages from each from point in a round-robin manner and push message to the destination? regards D -- View this message in context: http://camel.465427.n5.nabble.com/Round-Robin-in-Camel-Routes-tp5735857p5735860.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Hello World? Maybe not :)
Hi I suggest to take a look at this page http://camel.apache.org/walk-through-an-example.html The direct component is here http://camel.apache.org/direct And if you just want to print hello world once or every X period then you can use a timer in the route http://camel.apache.org/timer And I suggest to try the console example as its good for learning and trying out Camel http://camel.apache.org/console-example.html The example is included in the Camel distro so you can compile and run it, as documented from the link above. On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: Hi All, I have the simplest problem that apparently I can't figure out. I've never used direct:start as an endpoint before and I can't seem to get it to work the way I would expect it to. My config is below . I would like the route to start and print hello world. Seems easy. What am I overlooking? Thanks for your help ?xml version=1.0 encoding=UTF-8? beans default-init-method=init xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:camel=http://camel.apache.org/schema/spring; xsi:noNamespaceSchemaLocation=http://camel.apache.org/schema/spring/cam el-spring.xsd xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd camelContext xmlns=http://camel.apache.org/schema/spring; dataFormats jaxb id=myJaxb prettyPrint=true contextPath=com.prasad.sample/ /dataFormats camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route /camelContext /beans Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Achieving Concurrency using a Load Balancer
Hi Folks, I'm wondering if it is possible to achieve concurrency when using a load balancer without using queues? Thanks, Edwin -- View this message in context: http://camel.465427.n5.nabble.com/Achieving-Concurrency-using-a-Load-Balancer-tp5735862.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Hello World? Maybe not :)
Hi Claus, Embarrassingly, I've used camel for quite some time. Always with quickfixj or jms with the spring config. I never had to kick things off. When I look at the examples, they look like mine. Shouldn't this be it? camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route Geoffrey A Gershaw Credit eTrading Development +1 919 994 6412 (*102 6412) -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Thursday, July 18, 2013 1:06 PM To: users@camel.apache.org Subject: Re: Hello World? Maybe not :) Hi I suggest to take a look at this page http://camel.apache.org/walk-through-an-example.html The direct component is here http://camel.apache.org/direct And if you just want to print hello world once or every X period then you can use a timer in the route http://camel.apache.org/timer And I suggest to try the console example as its good for learning and trying out Camel http://camel.apache.org/console-example.html The example is included in the Camel distro so you can compile and run it, as documented from the link above. On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: Hi All, I have the simplest problem that apparently I can't figure out. I've never used direct:start as an endpoint before and I can't seem to get it to work the way I would expect it to. My config is below . I would like the route to start and print hello world. Seems easy. What am I overlooking? Thanks for your help ?xml version=1.0 encoding=UTF-8? beans default-init-method=init xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:camel=http://camel.apache.org/schema/spring; xsi:noNamespaceSchemaLocation=http://camel.apache.org/schema/spring/cam el-spring.xsd xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd camelContext xmlns=http://camel.apache.org/schema/spring; dataFormats jaxb id=myJaxb prettyPrint=true contextPath=com.prasad.sample/ /dataFormats camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route /camelContext /beans Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===
Re: Round Robin in Camel Routes
Still kind of confused ;) If I understand correctly you have 3 inbound routes from different locations all of which point to a Active MQ Queue. If you have only one consumer the messages will be processed in the order they arrive in the queue (wellin the simplest case) regardless where they came from. If you have more than one consumer on the queue, that changes. The messages will be processed in a round robin fashion across your consumers. If you want to have a dedicated set of consumers for each inbound endpoint, I would suggest different queues. If you can't do that you can use message selectors or filters in camel. If you need to route groups of messages to the same consumer, you should have a look at ActiveMQ's message group feature (http://activemq.apache.org/message-groups.html). I *think* that reading between the lines you are expecting your consumers to actively fetch messages. IMHO an ESB architecture is primarily event driven, so that the inbound side pushes messages and the consumer side is notified when those messages arrive. The underlying JMS Broker (in this case ActiveMQ) allows all kind of dispatching strategies. Hope that helps Andreas Am 7/18/13(29) 7:02 PM schrieb deepak_a unter angesh...@gmail.com: Hi, I was not clear in my earlier query. let me clarify. In my current architecture I have multiple routes set up. Each route has has a unique 'from' point and a 'to' end point (that is common for all routes) e.g. Route 1: From: MQ-Queue;To: inbound.Queue (in activeMQ) Route 2: From: FTP; To: inbound.Queue (in activeMQ) Route 3: From: Webservice; To: inbound.Queue (in activeMQ) The issue I am facing is - since my destination (To end point) is Queue that is common for all routes, I am not able to evenly process the messages from each endpoint. My query is is it possible to set up one route like this Route 1: From: MQ-Queue; From: FTP; From: Webservice; To: inbound.Queue (in activeMQ) The same route consumes messages from each from point in a round-robin manner and push message to the destination? regards D -- View this message in context: http://camel.465427.n5.nabble.com/Round-Robin-in-Camel-Routes-tp5735857p57 35860.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Hello World? Maybe not :)
Hmmm Looks good enough to me. Is there any error message to share ? Which version of Camel are you using ? If you are willing to post your route I can drop it in my IDE tomorrow . Regards Andreas Am 7/18/13(29) 7:12 PM schrieb Gershaw, Geoffrey unter geoffrey.gers...@credit-suisse.com: Hi Claus, Embarrassingly, I've used camel for quite some time. Always with quickfixj or jms with the spring config. I never had to kick things off. When I look at the examples, they look like mine. Shouldn't this be it? camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route Geoffrey A Gershaw Credit eTrading Development +1 919 994 6412 (*102 6412) -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Thursday, July 18, 2013 1:06 PM To: users@camel.apache.org Subject: Re: Hello World? Maybe not :) Hi I suggest to take a look at this page http://camel.apache.org/walk-through-an-example.html The direct component is here http://camel.apache.org/direct And if you just want to print hello world once or every X period then you can use a timer in the route http://camel.apache.org/timer And I suggest to try the console example as its good for learning and trying out Camel http://camel.apache.org/console-example.html The example is included in the Camel distro so you can compile and run it, as documented from the link above. On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: Hi All, I have the simplest problem that apparently I can't figure out. I've never used direct:start as an endpoint before and I can't seem to get it to work the way I would expect it to. My config is below . I would like the route to start and print hello world. Seems easy. What am I overlooking? Thanks for your help ?xml version=1.0 encoding=UTF-8? beans default-init-method=init xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:camel=http://camel.apache.org/schema/spring; xsi:noNamespaceSchemaLocation=http://camel.apache.org/schema/spring/cam el-spring.xsd xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd camelContext xmlns=http://camel.apache.org/schema/spring; dataFormats jaxb id=myJaxb prettyPrint=true contextPath=com.prasad.sample/ /dataFormats camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route /camelContext /beans Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen == = Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == =
How to use hawtio with Camel web app?
I would like to use hawtio's Camel route diagram view for inspecting and displaying routes. http://hawt.io/getstarted/index.html Since the app will be deployed in a private Intranet, I tried their offline WAR: https://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default-offline/1.2-M1/hawtio-default-offline-1.2-M1.war This didn't work - the first problem was an incompletely declared WEB-INF/web.xml root element, which I fixed, this allowed the web app to deploy, but I still see this error in the server log: 13:02:21,940 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/hawtio]] Failed to startup blueprint container. org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean aetherFacade: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean aetherFacade Although I can navigate and inspect MBeans through the JMX view. If I download the full WAR, which includes a sample Camel context: https://oss.sonatype.org/content/repositories/public/io/hawt/sample/1.2-M1/sample-1.2-M1.war This also works, although with a large volume of assorted stack traces in the log. I don't need all the extra stuff that the full sample WAR has, e.g. ActiveMQ because JBoss6 uses HornetQ, etc. I just want to know how to combine my Camel web app with the most minimal hawtio web app to be able to view/inspect context(s) and routes in diagram view? I searched the list archive and only found a thread concerning the initial announcement: http://camel.465427.n5.nabble.com/ANN-hawtio-a-new-lightweight-HTML5-console-for-Apache-Camel-ActiveMQ-JMX-OSGi-amp-Fuse-Fabric-td5726244.html#a5726248 Does anyone have an idea? Thanks, Chris
Re: Hello World? Maybe not :)
Hey Geoffrey, A stacktrace would help us help you ;-) Where and how are you deploying this route? Apache ServiceMix? Tomcat, JBoss, etc.? And is there another Camel route or a unit test publishing to the direct endpoint? Bear in mind that a direct consumer doesn't listen on an external interface/protocol. It's rather intended for in-memory, internal Camel-to-Camel invocations. Thanks, *Raúl Kripalani* Apache Camel PMC Member Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: Hi All, I have the simplest problem that apparently I can't figure out. I've never used direct:start as an endpoint before and I can't seem to get it to work the way I would expect it to. My config is below . I would like the route to start and print hello world. Seems easy. What am I overlooking? Thanks for your help ?xml version=1.0 encoding=UTF-8? beans default-init-method=init xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:camel=http://camel.apache.org/schema/spring; xsi:noNamespaceSchemaLocation=http://camel.apache.org/schema/spring/cam el-spring.xsd xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd camelContext xmlns=http://camel.apache.org/schema/spring; dataFormats jaxb id=myJaxb prettyPrint=true contextPath=com.prasad.sample/ /dataFormats camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route /camelContext /beans Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===
Re: How to use hawtio with Camel web app?
On 18 July 2013 18:46, Chris Wolf cwolf.a...@gmail.com wrote: I would like to use hawtio's Camel route diagram view for inspecting and displaying routes. http://hawt.io/getstarted/index.html Since the app will be deployed in a private Intranet, I tried their offline WAR: https://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default-offline/1.2-M1/hawtio-default-offline-1.2-M1.war This didn't work - the first problem was an incompletely declared WEB-INF/web.xml root element, which I fixed, What change did you make? Any chance of a pull request or at least a gist of the latest version? :) this allowed the web app to deploy, but I still see this error in the server log: 13:02:21,940 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/hawtio]] Failed to startup blueprint container. org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean aetherFacade: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean aetherFacade Any chance of the whole log as a gist? Then we can figure out whats wrong. There's been a recent issue fixed which caused some startup noise - which we'll have a new milestone or full 1.2 release soon... https://github.com/hawtio/hawtio/issues/385 There's currently some other issues for the Maven indexer plugin as our fusesource nexus doesn't seem to have a downloadable index any more too... If you're having issues though, maybe try just hawtio-web.war which has the bare minimum stuff inside (so hopefully won't have many errors). Although I can navigate and inspect MBeans through the JMX view. Ah - in that case it might be working fine then? If you deploy your camel routes in a separate WAR, do you see them in the Camel tab? -- James --- Red Hat Email: jstra...@redhat.com Web: http://fusesource.com Twitter: jstrachan, fusenews Blog: http://macstrac.blogspot.com/ Open Source Integration
Re: Using a jpa endpoint with no entityClassName
Hi Martin, just use dummy class name (like jpa://foo ) and make sure the message body contains one or many entity instances Bilgin On 18 July 2013 16:37, fordm ford.j.mar...@gmail.com wrote: Hi, The URI format for a jpa endpoint is: jpa:[entityClassName][?options] and according to Apache Camel:JPA http://camel.apache.org/jpa.html , for sending to the endpoint, the entityClassName is optional. So I would expect the following route to successfully persist a message (that contains a known entity): route from uri=activemq:my-queue / to uri=jpa: / /route Can someone tell me what I'm missing please? Thanks Martin -- View this message in context: http://camel.465427.n5.nabble.com/Using-a-jpa-endpoint-with-no-entityClassName-tp5735854.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Using a jpa endpoint with no entityClassName
®®±³µ¥£¢Úàõøüÿ -Original Message- From: Bilgin Ibryam [mailto:bibr...@gmail.com] Sent: Thursday, July 18, 2013 3:22 PM To: users@camel.apache.org Subject: Re: Using a jpa endpoint with no entityClassName Hi Martin, just use dummy class name (like jpa://foo ) and make sure the message body contains one or many entity instances Bilgin On 18 July 2013 16:37, fordm ford.j.mar...@gmail.com wrote: Hi, The URI format for a jpa endpoint is: jpa:[entityClassName][?options] and according to Apache Camel:JPA http://camel.apache.org/jpa.html , for sending to the endpoint, the entityClassName is optional. So I would expect the following route to successfully persist a message (that contains a known entity): route from uri=activemq:my-queue / to uri=jpa: / /route Can someone tell me what I'm missing please? Thanks Martin -- View this message in context: http://camel.465427.n5.nabble.com/Using-a-jpa-endpoint-with-no-entityC lassName-tp5735854.html Sent from the Camel - Users mailing list archive at Nabble.com. ___ This message is for information purposes only, it is not a recommendation, advice, offer or solicitation to buy or sell a product or service nor an official confirmation of any transaction. It is directed at persons who are professionals and is not intended for retail customer use. Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer. For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer regarding market commentary from Barclays Sales and/or Trading, who are active market participants; and in respect of Barclays Research, including disclosures relating to specific issuers, please see http://publicresearch.barclays.com. ___
Re: How to use hawtio with Camel web app?
Thanks for getting back to me. This didn't work - the first problem was an incompletely declared WEB-INF/web.xml root element, which I fixed, What change did you make? Any chance of a pull request or at least a gist of the latest version? :) It was very minor. I think it it fails because JBoss-6 is configured to perform schema validation of web.xml, so I changed the declaration of the root element from: web-app version=2.4 xmlns=http://java.sun.com/xml/ns/javaee; to: web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; I don't think you need version 2.5, but I just had another web.xml I copy/pasted from, with the schemaLocation for 2.5. I will get back to you on the other items, right now I have it all ripped apart, temporarily.. Thanks, Chris
Re: Achieving Concurrency using a Load Balancer
Yes, take a look at the following unit test [1]. It use the thread() DSL to use a thread pool for parallel processing. [1] https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=camel-core/src/test/java/org/apache/camel/processor/ThreadsDefaultTest.java;h=97b7e84c71d57ca0d69d98eec26a81bf38f4e37d;hb=HEAD Christian Müller - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Thu, Jul 18, 2013 at 7:11 PM, Edwin edwin.rabbi...@gmail.com wrote: Hi Folks, I'm wondering if it is possible to achieve concurrency when using a load balancer without using queues? Thanks, Edwin -- View this message in context: http://camel.465427.n5.nabble.com/Achieving-Concurrency-using-a-Load-Balancer-tp5735862.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Ftp connection through SOCKS Proxy.
Thanks Willem ! The NET-468 patch was released as a part of the issue: https://issues.apache.org/jira/browse/NET-468 I guess the ticket is still open because they might need some more unit tests. I modified camel-fTP component to support setting the proxy object as well as setting up authentication info for a socks server. Seems to work. When I create a Jira can I upload my patch for consideration? -- View this message in context: http://camel.465427.n5.nabble.com/Ftp-connection-through-SOCKS-Proxy-tp5735735p5735873.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Hello World? Maybe not :)
I'm running this in a standalone java app using Spring. Its camel 2.11. I was under the impression from the various samples that I have seen that the below route should start and print Hello World without publishing a message to this route. Like a main class in java. Am I wrong? I am using the timer component right now to do the same job. Right now, there is no error. It just keeps running, but Hello World isn't printed. Thanks camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route Geoffrey A Gershaw Credit eTrading Development +1 919 994 6412 (*102 6412) -Original Message- From: Raul Kripalani [mailto:r...@evosent.com] Sent: Thursday, July 18, 2013 2:21 PM To: users@camel.apache.org Subject: Re: Hello World? Maybe not :) Hey Geoffrey, A stacktrace would help us help you ;-) Where and how are you deploying this route? Apache ServiceMix? Tomcat, JBoss, etc.? And is there another Camel route or a unit test publishing to the direct endpoint? Bear in mind that a direct consumer doesn't listen on an external interface/protocol. It's rather intended for in-memory, internal Camel-to-Camel invocations. Thanks, *Raúl Kripalani* Apache Camel PMC Member Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: Hi All, I have the simplest problem that apparently I can't figure out. I've never used direct:start as an endpoint before and I can't seem to get it to work the way I would expect it to. My config is below . I would like the route to start and print hello world. Seems easy. What am I overlooking? Thanks for your help ?xml version=1.0 encoding=UTF-8? beans default-init-method=init xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:camel=http://camel.apache.org/schema/spring; xsi:noNamespaceSchemaLocation=http://camel.apache.org/schema/spring/cam el-spring.xsd xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd camelContext xmlns=http://camel.apache.org/schema/spring; dataFormats jaxb id=myJaxb prettyPrint=true contextPath=com.prasad.sample/ /dataFormats camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route /camelContext /beans Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===
Camel in Openshift
Hi Everyone, Is there a Camel quickstart that can be deployed in openshift? Thanks, Walter -- View this message in context: http://camel.465427.n5.nabble.com/Camel-in-Openshift-tp5735877.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Hello World? Maybe not :)
Direct is used to link routes, such that one Camel route can call another directly without resorting to any external protocols. You want to use the Timer component instead, as you rightly noticed already. HTH, Raúl. On Thu, Jul 18, 2013 at 11:37 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: I'm running this in a standalone java app using Spring. Its camel 2.11. I was under the impression from the various samples that I have seen that the below route should start and print Hello World without publishing a message to this route. Like a main class in java. Am I wrong? I am using the timer component right now to do the same job. Right now, there is no error. It just keeps running, but Hello World isn't printed. Thanks camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route Geoffrey A Gershaw Credit eTrading Development +1 919 994 6412 (*102 6412) -Original Message- From: Raul Kripalani [mailto:r...@evosent.com] Sent: Thursday, July 18, 2013 2:21 PM To: users@camel.apache.org Subject: Re: Hello World? Maybe not :) Hey Geoffrey, A stacktrace would help us help you ;-) Where and how are you deploying this route? Apache ServiceMix? Tomcat, JBoss, etc.? And is there another Camel route or a unit test publishing to the direct endpoint? Bear in mind that a direct consumer doesn't listen on an external interface/protocol. It's rather intended for in-memory, internal Camel-to-Camel invocations. Thanks, *Raúl Kripalani* Apache Camel PMC Member Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: Hi All, I have the simplest problem that apparently I can't figure out. I've never used direct:start as an endpoint before and I can't seem to get it to work the way I would expect it to. My config is below . I would like the route to start and print hello world. Seems easy. What am I overlooking? Thanks for your help ?xml version=1.0 encoding=UTF-8? beans default-init-method=init xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xmlns:camel=http://camel.apache.org/schema/spring; xsi:noNamespaceSchemaLocation=http://camel.apache.org/schema/spring/cam el-spring.xsd xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd camelContext xmlns=http://camel.apache.org/schema/spring; dataFormats jaxb id=myJaxb prettyPrint=true contextPath=com.prasad.sample/ /dataFormats camel:route id=loginRoute camel:from uri=direct:start/ camel:log message=Hello World loggingLevel=INFO/ /camel:route /camelContext /beans Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===
Re: invoking camel route
Hi Claus, My camelContext has 1 route. From testMethod, i dont want to send any body or headers. i just want to invoke route1 from this method. On Thu, Jul 18, 2013 at 9:33 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi See this page http://camel.apache.org/walk-through-an-example.html You can use a producer template to send a message to a Camel route from java code. On Thu, Jul 18, 2013 at 5:58 PM, Tarun Kumar agrawal.taru...@gmail.com wrote: Hi, I want to invoke camel route from java code. CamelContext doesn't seem to have any method to invoke route. Here is what my code looks like: @Autowired private CamelContext cc; public void testMethod() { System.out.println(cc.getRouteStatus(route1)); // prints true // how to invoke this route - route1 from here? } -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: How to use hawtio with Camel web app?
On 18 July 2013 20:51, Chris Wolf cwolf.a...@gmail.com wrote: Thanks for getting back to me. This didn't work - the first problem was an incompletely declared WEB-INF/web.xml root element, which I fixed, What change did you make? Any chance of a pull request or at least a gist of the latest version? :) It was very minor. I think it it fails because JBoss-6 is configured to perform schema validation of web.xml, so I changed the declaration of the root element from: web-app version=2.4 xmlns=http://java.sun.com/xml/ns/javaee; to: web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; I don't think you need version 2.5, but I just had another web.xml I copy/pasted from, with the schemaLocation for 2.5. Ah thanks! I've added the XSD to all the web.xml files in the hawtio project; I kept it at 2.4 for now since I figured this would mean we'd work in more web containers https://github.com/hawtio/hawtio/commit/872bda892cc9aa5ec13f95d87bb9d61cf259e0f9 let me know if we need to change this to 2.5 though. Thanks again for the heads up -- James --- Red Hat Email: jstra...@redhat.com Web: http://fusesource.com Twitter: jstrachan, fusenews Blog: http://macstrac.blogspot.com/ Open Source Integration