Camel Mina or Netty to read NMEA 0183 buffer

2014-11-05 Thread Morgan Hautman
Hello all,

I'm trying to implement a endpoint who can read an NMEA 0183 buffer using
TCP.
I already tried to implement it using a codec (
https://code.google.com/p/cellengine/source/browse/trunk/engine_java/002_Engine_Server/mina/com/net/minaimpl/server/telnet/TelnetCodec.java?r=1198)
but it requires a Charset and non of them fullfit my needs.

I also tried with the option textline=true but my route stops:

09:07:49,767 | INFO  | rint Extender: 2 | troller.internal.JobLauncherImpl
119 | 421 - org.talend.esb.job.controller - 5.2.3 | Adding route
TCP_CONNECTION.
09:07:49,770 | INFO  | ool-13-thread-44 |
controller.internal.RouteAdapter   66 | 421 - org.talend.esb.job.controller
- 5.2.3 | Starting route TCP_CONNECTION
09:07:49,773 | INFO  | ool-13-thread-44 | rg.apache.camel.main.MainSupport
307 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel  starting
09:07:49,775 | INFO  | ool-13-thread-44 |
gement.ManagementStrategyFactory   43 | 400 - org.apache.camel.camel-core -
2.10.2 | JMX enabled.
09:07:49,776 | INFO  | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1398 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is starting
09:07:49,812 | INFO  | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
classes to load
09:07:49,813 | INFO  | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
classes to load
09:07:49,813 | INFO  | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO  | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO  | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO  | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,841 | INFO  | ool-13-thread-44 |
amel.component.mina.MinaConsumer   59 | 750 - org.apache.camel.camel-mina -
2.10.2 | Binding to server address: /192.168.100.109:1212 using acceptor:
org.apache.mina.transport.socket.n
io.SocketAcceptor@6334ef33
09:07:49,842 | INFO  | ool-13-thread-44 |
amel.component.mina.MinaConsumer   67 | 750 - org.apache.camel.camel-mina -
2.10.2 | Unbinding from server address: /192.168.100.109:1212 using
acceptor: org.apache.mina.transport.sock
et.nio.SocketAcceptor@6334ef33
09:07:49,844 | INFO  | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1590 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is shutting down
09:07:49,845 | INFO  | ool-13-thread-44 | verter.BaseTypeConverterRegistry
522 | 400 - org.apache.camel.camel-core - 2.10.2 | TypeConverterRegistry
utilization[attempts=3, hits=3, misses=0, failures=0] mappings[total=211,
mis
ses=0]
09:07:49,846 | INFO  | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1656 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is shutdown in 0.002 seconds. Uptime
0.071 s
econds.
09:07:49,846 | INFO  | ool-13-thread-44 | rg.apache.camel.main.MainSupport
301 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel  stopping
09:07:49,847 | INFO  | ool-13-thread-44 |
controller.internal.RouteAdapter   79 | 421 - org.talend.esb.job.controller
- 5.2.3 | Route TCP_CONNECTION finished, return code is 1

I understand that there should be something wrong but why does it tell me
"attempts=3, hits=3" and don't keep processing?

Hope someone can help.

Morgan


Re: Camel 2.15-SNAPSHOT dependency missing sources in repo

2014-11-05 Thread Willem Jiang
I just kicked the CI build of Camel trunk, the deployment[1] is OK now.

[1]https://builds.apache.org/job/Camel.trunk.notest/2212/

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On November 5, 2014 at 4:52:57 AM, Christian Müller 
(christian.muel...@gmail.com) wrote:
> Maybe because the build failed because the source artifact was published.
>  
> Best,
>  
> Christian
> -
>  
> Software Integration Specialist
>  
> Apache Member
> V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
> Apache Incubator PMC Member
>  
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>  
> On Tue, Nov 4, 2014 at 10:02 AM, vasilievip wrote:
>  
> >
> > https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-core/2.15-SNAPSHOT/
> >   
> >
> > If you take a look at latest snapshot build - it does not contain sources,
> > sources as published for the previous snapshot, but maven sees that there
> > newest build and ignores sources.
> > Something with daily build configuration?
> >
> > no_sources.PNG
> >  
> >
> >
> >
> > --
> > View this message in context:
> > http://camel.465427.n5.nabble.com/Camel-2-15-SNAPSHOT-dependency-missing-sources-in-repo-tp5758495.html
> >   
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>  



Re: Camel Mina or Netty to read NMEA 0183 buffer

2014-11-05 Thread Willem Jiang
Can you share the camel route with us?
I didn’t find anything wrong by going through the log you pasted.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On November 5, 2014 at 4:22:22 PM, Morgan Hautman (morgan.haut...@gmail.com) 
wrote:
> Hello all,
>  
> I'm trying to implement a endpoint who can read an NMEA 0183 buffer using
> TCP.
> I already tried to implement it using a codec (
> https://code.google.com/p/cellengine/source/browse/trunk/engine_java/002_Engine_Server/mina/com/net/minaimpl/server/telnet/TelnetCodec.java?r=1198)
>   
> but it requires a Charset and non of them fullfit my needs.
>  
> I also tried with the option textline=true but my route stops:
>  
> 09:07:49,767 | INFO | rint Extender: 2 | troller.internal.JobLauncherImpl
> 119 | 421 - org.talend.esb.job.controller - 5.2.3 | Adding route
> TCP_CONNECTION.
> 09:07:49,770 | INFO | ool-13-thread-44 |
> controller.internal.RouteAdapter 66 | 421 - org.talend.esb.job.controller
> - 5.2.3 | Starting route TCP_CONNECTION
> 09:07:49,773 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
> 307 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel starting
> 09:07:49,775 | INFO | ool-13-thread-44 |
> gement.ManagementStrategyFactory 43 | 400 - org.apache.camel.camel-core -
> 2.10.2 | JMX enabled.
> 09:07:49,776 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
> 1398 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
> (CamelContext: TCP_CONNECTION-ctx) is starting
> 09:07:49,812 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
> classes to load
> 09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
> classes to load
> 09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> classes to load
> 09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> classes to load
> 09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> classes to load
> 09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> classes to load
> 09:07:49,841 | INFO | ool-13-thread-44 |
> amel.component.mina.MinaConsumer 59 | 750 - org.apache.camel.camel-mina -
> 2.10.2 | Binding to server address: /192.168.100.109:1212 using acceptor:
> org.apache.mina.transport.socket.n
> io.SocketAcceptor@6334ef33
> 09:07:49,842 | INFO | ool-13-thread-44 |
> amel.component.mina.MinaConsumer 67 | 750 - org.apache.camel.camel-mina -
> 2.10.2 | Unbinding from server address: /192.168.100.109:1212 using
> acceptor: org.apache.mina.transport.sock
> et.nio.SocketAcceptor@6334ef33
> 09:07:49,844 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
> 1590 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
> (CamelContext: TCP_CONNECTION-ctx) is shutting down
> 09:07:49,845 | INFO | ool-13-thread-44 | verter.BaseTypeConverterRegistry
> 522 | 400 - org.apache.camel.camel-core - 2.10.2 | TypeConverterRegistry
> utilization[attempts=3, hits=3, misses=0, failures=0] mappings[total=211,
> mis
> ses=0]
> 09:07:49,846 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
> 1656 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
> (CamelContext: TCP_CONNECTION-ctx) is shutdown in 0.002 seconds. Uptime
> 0.071 s
> econds.
> 09:07:49,846 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
> 301 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel stopping
> 09:07:49,847 | INFO | ool-13-thread-44 |
> controller.internal.RouteAdapter 79 | 421 - org.talend.esb.job.controller
> - 5.2.3 | Route TCP_CONNECTION finished, return code is 1
>  
> I understand that there should be something wrong but why does it tell me
> "attempts=3, hits=3" and don't keep processing?
>  
> Hope someone can help.
>  
> Morgan
>  



Re: POJO to DB

2014-11-05 Thread Charlie Mordant
​​
Hi,

Either you have to use a message converter (transforming you pojo to a key
value hashmap): http://camel.apache.org/messaging-mapper.html
Or you can use camel-jpa if it's a jpa entity.

Regards,

2014-11-05 8:51 GMT+01:00 Router :

> Hi,
>
> I have got a POJO which contains values for two sequential SQL inserts. How
> can I achieve this?
>
> I tried something like this, but it fails due to the fact that named query
> parameters (:#column) just work for HashMaps. I cannot find any
> documentation how to proceed with my POJO. The conversion of my POJO to a
> HashMap feels wrong..
>
> 
> 
> 
> 
> 
> 
>
> Unfortunatelly, I need to keep my insert statements configurable via
> spring.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/POJO-to-DB-tp5758520.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


Re: Camel Mina or Netty to read NMEA 0183 buffer

2014-11-05 Thread Morgan Hautman
from("mina:tcp://192.168.100.109:1212?sync=true&textline=true").routeId("TCP_CONNECTION").setExchangePattern(org.apache.camel.ExchangePattern.InOnly).id("ExchangePattern").to("log:cLog_1?level=INFO").id("cJMSConnectionFactory1"
+ ":queue:netty")).id("jms");

javax.jms.ConnectionFactory jmsConnectionFactory = new
org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:7043");
camelContext.addComponent("cJMSConnectionFactory1",
org.apache.camel.component.jms.JmsComponent.jmsComponent(jmsConnectionFactory));

2014-11-05 10:32 GMT+01:00 Willem Jiang :

> Can you share the camel route with us?
> I didn’t find anything wrong by going through the log you pasted.
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On November 5, 2014 at 4:22:22 PM, Morgan Hautman (
> morgan.haut...@gmail.com) wrote:
> > Hello all,
> >
> > I'm trying to implement a endpoint who can read an NMEA 0183 buffer using
> > TCP.
> > I already tried to implement it using a codec (
> >
> https://code.google.com/p/cellengine/source/browse/trunk/engine_java/002_Engine_Server/mina/com/net/minaimpl/server/telnet/TelnetCodec.java?r=1198
> )
> > but it requires a Charset and non of them fullfit my needs.
> >
> > I also tried with the option textline=true but my route stops:
> >
> > 09:07:49,767 | INFO | rint Extender: 2 | troller.internal.JobLauncherImpl
> > 119 | 421 - org.talend.esb.job.controller - 5.2.3 | Adding route
> > TCP_CONNECTION.
> > 09:07:49,770 | INFO | ool-13-thread-44 |
> > controller.internal.RouteAdapter 66 | 421 - org.talend.esb.job.controller
> > - 5.2.3 | Starting route TCP_CONNECTION
> > 09:07:49,773 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
> > 307 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel starting
> > 09:07:49,775 | INFO | ool-13-thread-44 |
> > gement.ManagementStrategyFactory 43 | 400 - org.apache.camel.camel-core -
> > 2.10.2 | JMX enabled.
> > 09:07:49,776 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
> > 1398 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
> > (CamelContext: TCP_CONNECTION-ctx) is starting
> > 09:07:49,812 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> > 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
> > classes to load
> > 09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> > 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
> > classes to load
> > 09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> > 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> > classes to load
> > 09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> > 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> > classes to load
> > 09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> > 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> > classes to load
> > 09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
> > 353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
> > classes to load
> > 09:07:49,841 | INFO | ool-13-thread-44 |
> > amel.component.mina.MinaConsumer 59 | 750 - org.apache.camel.camel-mina -
> > 2.10.2 | Binding to server address: /192.168.100.109:1212 using
> acceptor:
> > org.apache.mina.transport.socket.n
> > io.SocketAcceptor@6334ef33
> > 09:07:49,842 | INFO | ool-13-thread-44 |
> > amel.component.mina.MinaConsumer 67 | 750 - org.apache.camel.camel-mina -
> > 2.10.2 | Unbinding from server address: /192.168.100.109:1212 using
> > acceptor: org.apache.mina.transport.sock
> > et.nio.SocketAcceptor@6334ef33
> > 09:07:49,844 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
> > 1590 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
> > (CamelContext: TCP_CONNECTION-ctx) is shutting down
> > 09:07:49,845 | INFO | ool-13-thread-44 | verter.BaseTypeConverterRegistry
> > 522 | 400 - org.apache.camel.camel-core - 2.10.2 | TypeConverterRegistry
> > utilization[attempts=3, hits=3, misses=0, failures=0] mappings[total=211,
> > mis
> > ses=0]
> > 09:07:49,846 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
> > 1656 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
> > (CamelContext: TCP_CONNECTION-ctx) is shutdown in 0.002 seconds. Uptime
> > 0.071 s
> > econds.
> > 09:07:49,846 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
> > 301 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel stopping
> > 09:07:49,847 | INFO | ool-13-thread-44 |
> > controller.internal.RouteAdapter 79 | 421 - org.talend.esb.job.controller
> > - 5.2.3 | Route TCP_CONNECTION finished, return code is 1
> >
> > I understand that there should be something wrong but why does it tell me
> > "attempts=3, hits=3" 

Rest DSL - how to configure SSL/Basic Auth for jetty component?

2014-11-05 Thread Roman Vottner
This is a repost of the nabble forum entry as my account was obviously not 
correctly verified at the time when I posted this issue (post has NOT been 
accepted …). 

In order to test the new REST feature in 2.14.0 I created a simple route class: 

public class RestTestRoute extends RouteBuilder { 

   @Override 
   public void configure() throws Exception { 

   restConfiguration() 
   .component("jetty") 
   .port(8383) 
   .scheme("https") 
   .contextPath("/api/v1") 
   .endpointProperty("sslKeystore", "/security/serverKey.jks") 
   .endpointProperty("sslPassword", "keystorePW") 
   .endpointProperty("sslKeyPassword", "jettyPW") 
   // .componentProperty("sslContextParameters", 
"#sslContextParameters") 
   .componentProperty("handlers", "#jettyAuthHandler"); 

   rest("/service4") 
   .get().route().log("Service4 GET request received").endRest() 
   .post().route().log("Service4 POST request received").endRest() 
   .delete().route().log("Service4 DELETE request received").endRest(); 
   } 
} 

However, special-characters like "/" or ":" get replaced by "%2F" and "%3A" 
which cause a UnknownFormatConversionException: Conversion = 'F' in the primer 
case and a MissingFormatArgumentException: Format specifier '3A' in the latter 
case. As endpoint- or componentProperty only allows for string value 
declarations, I also tried to set Spring beans as used with a leading # before 
but without any success. 

If I leave out the sslKeystore stuff the example fails with a 
FileNotFoundException as it can't locate the keystore in my home-directory - 
which I have none. Though, I'd like to use the JKS located in the 
security-subfolder of my project. The documentation lacks a full example which 
showcases a bit more complex scenario. 

From debugging, I also figured out that the contextPath is not added on top of 
the "jetty:..." generated URL - is this only valid in servlet scenarios? 
Moreover, I'm a bit confused about the generated URL in JettyHttpComponent as 
it contains two '?' symbols: 

jetty:%s://%s:%s/%s?httpMethodRestrict=%s?sslPassword=keystorePW&sslKeyPassword=jettyPW&sslKeystore=%2Fsecurity%2FserverKey.jks

A simple test-project setup can be gathered in rest-dsl branch on github: 
https://github.com/RovoMe/CamelMultipleJettyComponents/tree/rest-dsl

Kind regards,

Roman

Re: Exception in the bean after onException

2014-11-05 Thread Vadim Vararu
Solved, it was an issue on the Throwable object, not a Camel one. Thanks.

On Tue, Nov 4, 2014 at 9:27 AM, Vadim Vararu  wrote:

> Yes, that works, but as i've observed, i get this way only the cause
> message, and not the whole stacktrace.
>
> On Mon, Nov 3, 2014 at 6:55 PM, Claus Ibsen  wrote:
>
>> Hi
>>
>> This is by design. As the on exception routes the exchange, so the
>> exchange needs to not have the exception in getException as that is
>> used to detect if a new exception is thrown during routing with
>> onException.
>>
>> So you can grab the caused exception from the exchange property, or if
>> you use a bean instead of .process, then just define an Exception type
>> in the method signature and Camel will provide the caused exception in
>> the parameter.
>>
>> On Mon, Nov 3, 2014 at 4:53 PM, Vadim Vararu 
>> wrote:
>> > Hi,
>> >
>> > I have a global error handler that passes the exchange to a processor.
>> > I wonder why the exception attribute of the injected Exchange is null in
>> > this case?
>> >
>> > //GLOBAL ERROR MANAGEMENT
>> > onException(Throwable.class)
>> > .process(new GlobalLoggerProcessor());
>> >
>> > I can find the message of the exception in a property of the exchange,
>> but
>> > the exception itself if NULL.
>> >
>> > Thanks in advance, Vadim.
>>
>>
>>
>> --
>> 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
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/
>>
>
>


StackOverflowError on configuring JettyHttpComponents with handlers for the same port

2014-11-05 Thread Roman Vottner
We upgraded from Camel 2.13.0 to 2.14.0 a couple of days ago and noticed some 
problems during the upgrade. While we managed to fix certain issues with CXF 
based services in Camel (extending spring configurations didn’t work for us in 
2.14.0 but using @Import({…}) does achieve the same), we noticed that on having 
multiple routes that define „RESTful services“ via Camels JettyComponent 
initialization fails with a StackOverflowException.

Each route injects the component-string from a property file which is 
furthermore used inside the from(…) statement inside the route. In Camel 2.13.0 
this was working fine (which can be seen in a github project: 
https://github.com/RovoMe/CamelMultipleJettyComponents) but Camel 2.14.0 
(https://github.com/RovoMe/CamelMultipleJettyComponents/tree/version-upgrade) 
produces a StackOverflowError as mentioned earlier. If enableMultipartFilter is 
set to false (as parameter for the configuration-string) the error is delayed 
to invocation time instead of setup time.

The (updated?) documentation states "Important: You can not use different 
handlers with different Jetty endpoints using the same port number. The 
handlers is associated to the port number. If you need different handlers, then 
use different port numbers.„  So on removing handler=#jettyAuthHandler from all 
but the first route 
(https://github.com/RovoMe/CamelMultipleJettyComponents/tree/version-upgrade-fix)
 the services are working again. So is the injected jetty basic auth handler a 
different handler for every service? In that case, there should be a more 
expressive exception rather than a StackOverflowError IMO.

Kind regards,

Roman
 


Re: Camel 2.15-SNAPSHOT dependency missing sources in repo

2014-11-05 Thread vasilievip
There is still no sources for latest build only for previous one. I guess
this has something to do with set of profiles enabled for "no tests" build
and "all tests" build.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-15-SNAPSHOT-dependency-missing-sources-in-repo-tp5758495p5758530.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Rest DSL - how to configure SSL/Basic Auth for jetty component?

2014-11-05 Thread Claus Ibsen
Hi

You can configure the jetty component regularly without the rest dsl,
and just refer to jetty as the component. Then the Rest DSL uses the
jetty with the security settings you have configured on it.

And I think we have fixed the double ? in the uri in the upcoming
2.14.1 release.

On Wed, Nov 5, 2014 at 10:53 AM, Roman Vottner  wrote:
> This is a repost of the nabble forum entry as my account was obviously not 
> correctly verified at the time when I posted this issue (post has NOT been 
> accepted …).
>
> In order to test the new REST feature in 2.14.0 I created a simple route 
> class:
>
> public class RestTestRoute extends RouteBuilder {
>
>@Override
>public void configure() throws Exception {
>
>restConfiguration()
>.component("jetty")
>.port(8383)
>.scheme("https")
>.contextPath("/api/v1")
>.endpointProperty("sslKeystore", "/security/serverKey.jks")
>.endpointProperty("sslPassword", "keystorePW")
>.endpointProperty("sslKeyPassword", "jettyPW")
>// .componentProperty("sslContextParameters", 
> "#sslContextParameters")
>.componentProperty("handlers", "#jettyAuthHandler");
>
>rest("/service4")
>.get().route().log("Service4 GET request received").endRest()
>.post().route().log("Service4 POST request received").endRest()
>.delete().route().log("Service4 DELETE request 
> received").endRest();
>}
> }
>
> However, special-characters like "/" or ":" get replaced by "%2F" and "%3A" 
> which cause a UnknownFormatConversionException: Conversion = 'F' in the 
> primer case and a MissingFormatArgumentException: Format specifier '3A' in 
> the latter case. As endpoint- or componentProperty only allows for string 
> value declarations, I also tried to set Spring beans as used with a leading # 
> before but without any success.
>
> If I leave out the sslKeystore stuff the example fails with a 
> FileNotFoundException as it can't locate the keystore in my home-directory - 
> which I have none. Though, I'd like to use the JKS located in the 
> security-subfolder of my project. The documentation lacks a full example 
> which showcases a bit more complex scenario.
>
> From debugging, I also figured out that the contextPath is not added on top 
> of the "jetty:..." generated URL - is this only valid in servlet scenarios? 
> Moreover, I'm a bit confused about the generated URL in JettyHttpComponent as 
> it contains two '?' symbols:
>
> jetty:%s://%s:%s/%s?httpMethodRestrict=%s?sslPassword=keystorePW&sslKeyPassword=jettyPW&sslKeystore=%2Fsecurity%2FserverKey.jks
>
> A simple test-project setup can be gathered in rest-dsl branch on github: 
> https://github.com/RovoMe/CamelMultipleJettyComponents/tree/rest-dsl
>
> Kind regards,
>
> Roman



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: [ANNOUNCE] Apache Camel 2.13.3 Released

2014-11-05 Thread James Green
The [4] link below does not exist.

The download page shows 2.13.3 but is linked to 2.13.2.

On 1 November 2014 07:53, Christian Mueller  wrote:

> The Apache Camel project [1] is a powerful open source integration
> framework based on known Enterprise Integration Patterns [2].
>
> The Camel community announces the immediate availability of the new patch
> release camel-2.13.3.
>
> The artifacts are published and ready for you to download [3] either from
> the Apache mirrors or from the Central Maven repository.
> For more details please take a look at the release notes [4].
>
> Many thanks to the Camel community for the hard work.
>
> Christian
>
> [1]http://camel.apache.org/
> [2]http://camel.apache.org/enterprise-integration-patterns.html
> [3]http://camel.apache.org/download.html
> [4]http://camel.apache.org/camel-2133-release.html
>


Re: Camel 2.15-SNAPSHOT dependency missing sources in repo

2014-11-05 Thread Willem Jiang
It looks the Jenkins deploy the projects twice. 
I just did some change on the Camel.trunk.notest job of the Jenkins, now I just 
kicked another build, to see if the change works.
 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On November 5, 2014 at 6:22:40 PM, vasilievip (vasilie...@gmail.com) wrote:
> There is still no sources for latest build only for previous one. I guess
> this has something to do with set of profiles enabled for "no tests" build
> and "all tests" build.
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-2-15-SNAPSHOT-dependency-missing-sources-in-repo-tp5758495p5758530.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: Camel Mina or Netty to read NMEA 0183 buffer

2014-11-05 Thread Jean-Baptiste Onofré

Can you try with mina2 instead of mina ?

mina2:tcp://0.0.0.0:1212?sync=true&textline=true&textlineDelimiter=AUTO

Try to put a bean or processor after the mina endpoint to see what you 
receive (before going to a JMS queue).


You can find details here: http://camel.apache.org/mina2.html

Regards
JB

On 11/05/2014 10:49 AM, Morgan Hautman wrote:

from("mina:tcp://192.168.100.109:1212?sync=true&textline=true").routeId("TCP_CONNECTION").setExchangePattern(org.apache.camel.ExchangePattern.InOnly).id("ExchangePattern").to("log:cLog_1?level=INFO").id("cJMSConnectionFactory1"
+ ":queue:netty")).id("jms");

javax.jms.ConnectionFactory jmsConnectionFactory = new
org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:7043");
camelContext.addComponent("cJMSConnectionFactory1",
org.apache.camel.component.jms.JmsComponent.jmsComponent(jmsConnectionFactory));

2014-11-05 10:32 GMT+01:00 Willem Jiang :


Can you share the camel route with us?
I didn’t find anything wrong by going through the log you pasted.

--
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem



On November 5, 2014 at 4:22:22 PM, Morgan Hautman (
morgan.haut...@gmail.com) wrote:

Hello all,

I'm trying to implement a endpoint who can read an NMEA 0183 buffer using
TCP.
I already tried to implement it using a codec (


https://code.google.com/p/cellengine/source/browse/trunk/engine_java/002_Engine_Server/mina/com/net/minaimpl/server/telnet/TelnetCodec.java?r=1198
)

but it requires a Charset and non of them fullfit my needs.

I also tried with the option textline=true but my route stops:

09:07:49,767 | INFO | rint Extender: 2 | troller.internal.JobLauncherImpl
119 | 421 - org.talend.esb.job.controller - 5.2.3 | Adding route
TCP_CONNECTION.
09:07:49,770 | INFO | ool-13-thread-44 |
controller.internal.RouteAdapter 66 | 421 - org.talend.esb.job.controller
- 5.2.3 | Starting route TCP_CONNECTION
09:07:49,773 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
307 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel starting
09:07:49,775 | INFO | ool-13-thread-44 |
gement.ManagementStrategyFactory 43 | 400 - org.apache.camel.camel-core -
2.10.2 | JMX enabled.
09:07:49,776 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1398 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is starting
09:07:49,812 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
classes to load
09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
classes to load
09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,841 | INFO | ool-13-thread-44 |
amel.component.mina.MinaConsumer 59 | 750 - org.apache.camel.camel-mina -
2.10.2 | Binding to server address: /192.168.100.109:1212 using

acceptor:

org.apache.mina.transport.socket.n
io.SocketAcceptor@6334ef33
09:07:49,842 | INFO | ool-13-thread-44 |
amel.component.mina.MinaConsumer 67 | 750 - org.apache.camel.camel-mina -
2.10.2 | Unbinding from server address: /192.168.100.109:1212 using
acceptor: org.apache.mina.transport.sock
et.nio.SocketAcceptor@6334ef33
09:07:49,844 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1590 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is shutting down
09:07:49,845 | INFO | ool-13-thread-44 | verter.BaseTypeConverterRegistry
522 | 400 - org.apache.camel.camel-core - 2.10.2 | TypeConverterRegistry
utilization[attempts=3, hits=3, misses=0, failures=0] mappings[total=211,
mis
ses=0]
09:07:49,846 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1656 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is shutdown in 0.002 seconds. Uptime
0.071 s
econds.
09:07:49,846 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
301 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel stopping
09:07:49,847 | INFO | ool-13-thread-44 |
controller.internal.RouteAdapter 79 | 421 - org.talend.esb.job.controller
- 5.2.3 | Route TCP_CONNECTION finished, return code is 1

I understand that there should be something wrong but why do

Re: Camel 2.15-SNAPSHOT dependency missing sources in repo

2014-11-05 Thread vasilievip
I see some snapshot sources now.
Thanks!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-15-SNAPSHOT-dependency-missing-sources-in-repo-tp5758495p5758541.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Mina or Netty to read NMEA 0183 buffer

2014-11-05 Thread Jean-Baptiste Onofré
By the way, are you sure the 192.168.100.109 is a valid interface for 
the local machine ?


Regards
JB

On 11/05/2014 10:49 AM, Morgan Hautman wrote:

from("mina:tcp://192.168.100.109:1212?sync=true&textline=true").routeId("TCP_CONNECTION").setExchangePattern(org.apache.camel.ExchangePattern.InOnly).id("ExchangePattern").to("log:cLog_1?level=INFO").id("cJMSConnectionFactory1"
+ ":queue:netty")).id("jms");

javax.jms.ConnectionFactory jmsConnectionFactory = new
org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:7043");
camelContext.addComponent("cJMSConnectionFactory1",
org.apache.camel.component.jms.JmsComponent.jmsComponent(jmsConnectionFactory));

2014-11-05 10:32 GMT+01:00 Willem Jiang :


Can you share the camel route with us?
I didn’t find anything wrong by going through the log you pasted.

--
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem



On November 5, 2014 at 4:22:22 PM, Morgan Hautman (
morgan.haut...@gmail.com) wrote:

Hello all,

I'm trying to implement a endpoint who can read an NMEA 0183 buffer using
TCP.
I already tried to implement it using a codec (


https://code.google.com/p/cellengine/source/browse/trunk/engine_java/002_Engine_Server/mina/com/net/minaimpl/server/telnet/TelnetCodec.java?r=1198
)

but it requires a Charset and non of them fullfit my needs.

I also tried with the option textline=true but my route stops:

09:07:49,767 | INFO | rint Extender: 2 | troller.internal.JobLauncherImpl
119 | 421 - org.talend.esb.job.controller - 5.2.3 | Adding route
TCP_CONNECTION.
09:07:49,770 | INFO | ool-13-thread-44 |
controller.internal.RouteAdapter 66 | 421 - org.talend.esb.job.controller
- 5.2.3 | Starting route TCP_CONNECTION
09:07:49,773 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
307 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel starting
09:07:49,775 | INFO | ool-13-thread-44 |
gement.ManagementStrategyFactory 43 | 400 - org.apache.camel.camel-core -
2.10.2 | JMX enabled.
09:07:49,776 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1398 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is starting
09:07:49,812 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
classes to load
09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 2 @Converter
classes to load
09:07:49,813 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,814 | INFO | ool-13-thread-44 | BundleTypeConverterLoader$Loader
353 | 400 - org.apache.camel.camel-core - 2.10.2 | Found 1 @Converter
classes to load
09:07:49,841 | INFO | ool-13-thread-44 |
amel.component.mina.MinaConsumer 59 | 750 - org.apache.camel.camel-mina -
2.10.2 | Binding to server address: /192.168.100.109:1212 using

acceptor:

org.apache.mina.transport.socket.n
io.SocketAcceptor@6334ef33
09:07:49,842 | INFO | ool-13-thread-44 |
amel.component.mina.MinaConsumer 67 | 750 - org.apache.camel.camel-mina -
2.10.2 | Unbinding from server address: /192.168.100.109:1212 using
acceptor: org.apache.mina.transport.sock
et.nio.SocketAcceptor@6334ef33
09:07:49,844 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1590 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is shutting down
09:07:49,845 | INFO | ool-13-thread-44 | verter.BaseTypeConverterRegistry
522 | 400 - org.apache.camel.camel-core - 2.10.2 | TypeConverterRegistry
utilization[attempts=3, hits=3, misses=0, failures=0] mappings[total=211,
mis
ses=0]
09:07:49,846 | INFO | ool-13-thread-44 | e.camel.impl.DefaultCamelContext
1656 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel 2.10.2
(CamelContext: TCP_CONNECTION-ctx) is shutdown in 0.002 seconds. Uptime
0.071 s
econds.
09:07:49,846 | INFO | ool-13-thread-44 | rg.apache.camel.main.MainSupport
301 | 400 - org.apache.camel.camel-core - 2.10.2 | Apache Camel stopping
09:07:49,847 | INFO | ool-13-thread-44 |
controller.internal.RouteAdapter 79 | 421 - org.talend.esb.job.controller
- 5.2.3 | Route TCP_CONNECTION finished, return code is 1

I understand that there should be something wrong but why does it tell me
"attempts=3, hits=3" and don't keep processing?

Hope someone can help.

Morgan








--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.c

Camel-boot autowiring issue

2014-11-05 Thread vasilievip
I see strange behavior when trying to use camel boot. 
When config class for camel creates beans (RoutesBuilder's) it does not see
autowired fields - they are not initialized, but in @PostConstruct method
they are getting initialized. When I add additional config file (see
Boot2.java in my example) camel config is skipped at all.
At this point I'm not sure where the problem is, this maybe related to
spring itself, but my main suspected is camel-boot at this point.

Here is sample project I prepared to demonstrate the issue:
camel-spring-boot-example.zip
 
 

Any advices are appreciated :)



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-boot-autowiring-issue-tp5758543.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-boot autowiring issue

2014-11-05 Thread Henryk Konsek
Hi,

> Here is sample project I prepared to demonstrate the issue:

I will take a look it shortly. Thanks for reporting :) .

Cheers.

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com


Calling a camel route seems to commit an outside transaction

2014-11-05 Thread Christian Schneider
I have an application running in OSGi that uses aries blueprint and 
aries jpa.


My class A is marked as transactional in blueprint and uses an XA 
transaction.

Inside such a transactional method from class A I
- first create a persistent entity in the DB
- then call a camel route using producer.requestBodyAndHeaders
- then I do some other changes on the entity

After the method I expect aries to commit the transaction.

The problem is that camel seems to already commit the transaction at the 
end of the route processing. I have not done any special transactional 
settings on the camel route.


Any idea why this happens and how I could avoid it?

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Camel-boot autowiring issue

2014-11-05 Thread Henryk Konsek
OK, I can see possible improvement for camel-spring-boot, as well as
small misconfiguration in your project. I'll send more details later
today. Stay tuned :)


Cheers.

On Wed, Nov 5, 2014 at 3:53 PM, Henryk Konsek  wrote:
> Hi,
>
>> Here is sample project I prepared to demonstrate the issue:
>
> I will take a look it shortly. Thanks for reporting :) .
>
> Cheers.
>
> --
> Henryk Konsek
> http://henryk-konsek.blogspot.com



-- 
Henryk Konsek
http://henryk-konsek.blogspot.com


Strange issue with JDBC add Postgres

2014-11-05 Thread Tim Dudgeon
I'm encountering a strange problem with using the JDBC component with 
Postgresql.
Postgresql by default fetches large result sets into memory. To avoid 
this you need to use

statement.setFetchSize()
to make it use a cursor.
This works fine in a simple Java example.  But when I try to use it in 
Camel I get a strange exception thrown from deep down in Postgresql.

My route looks a bit like this:

from('direct:databasequery')
.to('jdbc:myDataSoruce?outputType=StreamList&statement.fetchSize=100')
.split(body()).streaming()
.log('Processing row')

I then send it a body containing something like:
select * from a_very_large_table

When I combine it with maxRowSize=10 its fine.
When I combine it with maxRowSize=1000 it blows up, so it looks like it 
fails when it needs to go back for a second chunk of data.

The error from Postgresql is this:

Caused by: org.postgresql.util.PSQLException: ERROR: portal "C_2" does 
not exist
at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
at 
org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:2130)
at 
org.postgresql.jdbc2.AbstractJdbc2ResultSet.next(AbstractJdbc2ResultSet.java:1917)
at 
org.apache.camel.component.jdbc.ResultSetIterator.loadNext(ResultSetIterator.java:117)
at 
org.apache.camel.component.jdbc.ResultSetIterator.next(ResultSetIterator.java:83)



Anyone got any idea what's going on here?

Tim



getting default value Connection: Keep-Alive in

2014-11-05 Thread ashwin74268
Hi ,
I am trying to connect to an external entity which does not support
Persistent Connections. I tried to set the Connection:close Header in
Exchange object but it appears to be getting filtered out by
DefaultCXFBinding. I saw some post where it says the following HTTP Headers
will be filtered before the request is sent:

content-length
content-type
cache-control
*connection*
date
pragma
trailer
transfer-encoding
upgrade
via
warning

Here is my code to requestBody:-

Object response =
_camelEndpointProducerTemplate.requestBody(submitEndpointName,
camelRouteData);

How can avoid Connection Header from getting filtered ?

Any suggestion would help me progress.

Best Ragards,
Ashwin



--
View this message in context: 
http://camel.465427.n5.nabble.com/getting-default-value-Connection-Keep-Alive-in-tp5758547.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: There is a problem with the dataFormat MESSAGE and an XSLT transformation?

2014-11-05 Thread aioria3077
thanks for your answer, had been stuck with this problem since few weeks ago,
that's why he was trying in every possible way, but since it can resolve, 

a solution was put in the xslt, xpath full route from 

*soapenv:Envelope/soap:Body/.. *

and the response was another problem because it did not come with the
appropriate prefixes



--
View this message in context: 
http://camel.465427.n5.nabble.com/There-is-a-problem-with-the-dataFormat-MESSAGE-and-an-XSLT-transformation-tp5758477p5758549.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Strange issue with JDBC add Postgres

2014-11-05 Thread Claus Ibsen
On Wed, Nov 5, 2014 at 6:46 PM, Tim Dudgeon  wrote:
> I'm encountering a strange problem with using the JDBC component with
> Postgresql.
> Postgresql by default fetches large result sets into memory. To avoid this
> you need to use
> statement.setFetchSize()
> to make it use a cursor.
> This works fine in a simple Java example.  But when I try to use it in Camel
> I get a strange exception thrown from deep down in Postgresql.
> My route looks a bit like this:
>
> from('direct:databasequery')
> .to('jdbc:myDataSoruce?outputType=StreamList&statement.fetchSize=100')
> .split(body()).streaming()
> .log('Processing row')
>
> I then send it a body containing something like:
> select * from a_very_large_table
>
> When I combine it with maxRowSize=10 its fine.
> When I combine it with maxRowSize=1000 it blows up, so it looks like it
> fails when it needs to go back for a second chunk of data.
> The error from Postgresql is this:
>

maxRowSize ??? do you mean fetchSize?

Also which version of Camel do you use?


> Caused by: org.postgresql.util.PSQLException: ERROR: portal "C_2" does not
> exist
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
> at
> org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:2130)
> at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.next(AbstractJdbc2ResultSet.java:1917)
> at
> org.apache.camel.component.jdbc.ResultSetIterator.loadNext(ResultSetIterator.java:117)
> at
> org.apache.camel.component.jdbc.ResultSetIterator.next(ResultSetIterator.java:83)
>
>
> Anyone got any idea what's going on here?
>
> Tim
>



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Strange issue with JDBC add Postgres

2014-11-05 Thread Tim Dudgeon

On 05/11/2014 19:07, Claus Ibsen wrote:

maxRowSize ??? do you mean fetchSize?


Sorry, I mean maxRows (as in the example here: 
http://camel.apache.org/jdbc.html).

So something like:

.to('jdbc:myDataSoruce?outputType=StreamList&statement.fetchSize=100&statement.maxRows=1000')




Also which version of Camel do you use?


2.14

Tim



Re: Setting rest response json directly

2014-11-05 Thread Gary Kennedy
I'm using blueprint, but yes, it does not work.


{ "exception": "${exception.message}" }


Produces response content of:
"{ \"error\": \"${exception.message}\" }"

Instead of:
{ "error": "${exception.message}" }


I'm using the servlet/rest config, ie:





< !-- lots of magic -->

net.me.MyException
true
< !-- more magic -->

{ "error": "${exception.message}"
}







(Sorry. I should have included this snippet in the first email)

Cheers,
Gary




--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-rest-response-json-directly-tp5758518p5758563.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Ack by the end of WS chain (client WS - [WS - Camel - client WS] - WS) *image inside

2014-11-05 Thread chainbuck
Hello all,

Does this ack (OK Reply) at the end of the chain looks feasable to you?

 

Thx.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Ack-by-the-end-of-WS-chain-client-WS-WS-Camel-client-WS-WS-image-inside-tp5758561.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Ack by the end of WS chain (client WS - [WS - Camel - client WS] - WS) *image inside

2014-11-05 Thread chainbuck
In other words, I'm wondering if the following is feasable:
SYSTEM  CAMEL SYSTEM
   - data -> 
  - data ->
  <- ack -
   <- ack –

Here is what I don't want:
SYSTEM  CAMEL SYSTEM
- data -> 
<- ack -
  - data ->
  <- ack -




--
View this message in context: 
http://camel.465427.n5.nabble.com/Ack-by-the-end-of-WS-chain-client-WS-WS-Camel-client-WS-WS-image-inside-tp5758561p5758562.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Support for CXF dispatch api in the latest release of camel

2014-11-05 Thread santosh das
Our application is already using its webservice engine as CXF via the
dispatch api,
Now we are evaluating to add camel to utilize its EIP capabilities and
still yse CXF.

I could find no documentation whatsoever for using Camel with CXF dispatch
API.
Any hep is highly appreciated in this regard.


Re: Ack by the end of WS chain (client WS - [WS - Camel - client WS] - WS) *image inside

2014-11-05 Thread Henryk Konsek
Hi,

> In other words, I'm wondering if the following is feasable:

Sending status code after endpoint call is common practice. Looks fair
for me :) .

Cheers.

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com


Camel to ingest data more than 200 HTTP url endpoints

2014-11-05 Thread Vins Yu
Hi,

I'm building an app that grabs DATA from dynamic URLs which can reach
more than 200.

I tried the following

// this bean just generates dynamic url

 public void createUrls(Exchange exchange) {
List list = new ArrayList();
for (int i = 0; i < 9; i++) {
list.add("resources" + i + data[i]);
}

exchange.getIn().setHeader("theList", list);

}


then I have a camel route

camel routes:






theList

${body}


${null}








GET


http://${in.header.currentURL}





The above works if the list of URL is less than 90 but if it's more
than that, all the requests are getting

On delivery attempt: 0 caught: java.net.SocketException: Connection reset


I've also tried using:


   


codeURLS

${body}



${null}


${in.header.currentUrl}

http://dummyhost"/>



but same thing. It works for few URLS but anything more throws Connect reset.

Any idea what's the best way to do this?


I'm using Camel ver 2.12.3 and JDK 7


Thanks,
/Vins