Re: Blueprint, property-place-holder error name is already instanciated as null and cannot be removed

2018-02-22 Thread Quinn Stevenson
Is that really the XML?  It’s not well formed - you start with a 
cm:property-placeholder element and end with a cm:default-properties element.

> On Feb 22, 2018, at 12:48 PM, Alex Soto  wrote:
> 
> Hello, 
> 
> I am having some problems migrating to Camel 2.20.2 from 2.17.4.  I have 
> blueprint configuration:
> 
>  persistent-id=“audit.log” 
>   update-strategy="reload” 
>   placeholder-prefix="#{" placeholder-suffix="}”>
> 
>   
>   
>   
> 
> A component configuration (in this case for Quartz2, but I don’t think this 
> is related to Quartz2):
> 
>class="org.apache.camel.component.quartz2.QuartzComponent">
>value="#{startDelaySeconds}" />
>   
> 
> Then use this in a route:
> 
>   
>   
>   ...
> 
> When I run this (Karaf 4.2.5) an exception is thrown:
> 
> org.osgi.service.blueprint.container.ComponentDefinitionException: Name 
> audit-log-reaper-quartz is already instanciated as null and cannot be removed.
>   at 
> org.apache.aries.blueprint.container.BlueprintRepository.removeRecipe(BlueprintRepository.java:131)
>  [38:org.apache.aries.blueprint.core:1.8.3]
>   at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.updateUninstantiatedRecipes(BlueprintContainerImpl.java:572)
>  [38:org.apache.aries.blueprint.core:1.8.3]
>   at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:559)
>  [38:org.apache.aries.blueprint.core:1.8.3]
>   at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:394)
>  [38:org.apache.aries.blueprint.core:1.8.3]
>   at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:275)
>  [38:org.apache.aries.blueprint.core:1.8.3]
> 
> 
> This was working fine in Camel 2.17.4.  Interestingly,  if I remove property 
> place holder:
> 
>class="org.apache.camel.component.quartz2.QuartzComponent">
>   
>   
> 
> Then it works fine, no errors.  So this seems to be related to the property 
> placeholders.  Has anybody seen this? 
> I appreciate any insight on how to solve this problem.
> 
> Best regards,
> Alex soto
> 
> 
> 



Empty/null response from netty4-http template producer

2018-02-22 Thread Alex Soto
Hello,

I am having some problems migrating to Camel 2.20.2 from 2.17.4.This has 
been working before, but now the response is null.
I have access to the server logs and everything there looks good, i.e., the 
server is sending a response, but client is unable to get it.
Here is the client code:

SimpleRegistry registry = new SimpleRegistry();
registry.put("sslParams", sslContextParams);

DefaultCamelContext defaultCamelContext = new 
DefaultCamelContext(registry);
defaultCamelContext.addComponent("netty4-http", new 
NettyHttpComponent());
defaultCamelContext.setTracing(true);
defaultCamelContext.setName("itest");
defaultCamelContext.setStreamCaching(true);
defaultCamelContext.start();

ProducerTemplate producerTemplate = 
defaultCamelContext.createProducerTemplate();
producerTemplate.start();

final BytesAndDecParams requestMessage = makeEnrolCertRequest();

byte[] response = producerTemplate.requestBody(

"netty4-http:https://localhost:8895/service?sslContextParameters=#sslParams=true;,
requestMessage.message,
byte[].class);

assertNotNull(response);


I appreciate any help with this problem.
Best regards,
Alex soto




Re: Mybatis component L2 cache and OUT mode

2018-02-22 Thread Rahman USTA
Thanks man.

22 Şub 2018 09:48 tarihinde "Claus Ibsen"  yazdı:

> Hi
>
> Its more of a MyBatis question then Camel, so I suggest to ask on
> their user forum.
>
> On Thu, Feb 22, 2018 at 12:17 AM, Rahman USTA 
> wrote:
> > Hello,
> >
> > I try to activate L2 cache for mybatis component in an application. There
> > are several stored procedure calls which have IN and OUT parameters. My
> > goal is caching returned OUT parameters and serving this data on upcoming
> > endpoint calls.
> >
> > Mybatis rejects to cache callables that has OUT mode parameter.
> >
> > Cause: org.apache.ibatis.executor.ExecutorException: Caching stored
> > procedures with OUT params is not supported. Please configure
> useCache=false
> >
> > How way can I activate caching for this kind of mybatis calls?
> >
> > Thanks.
> > Rahman.
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Rép. : Rest Service / redirect with camel-http / No serializer found for class org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream

2018-02-22 Thread Daniel Langevin
HI,  i found my problem.

sorry for the disturb.


The answer is in:
the servername.org already format the response in JSON format, so don't
have to transform the BODY receive.

it's Wrong, rest servlet try to generat automatically Json, thats the
probleme.

i only add 

after http://dummyhost>

and now it Works.


Thank's 



Daniel











>>> "Daniel Langevin"  2018-02-22 14:20
>>>
Hi,

i try to implement a Rest service In OSGI Karaf 4.0.9  with Camel
2.17.7
this service redirect with camel‑http to another URL.

like 
http://serverA.org:8181/rest/XXX/geocode/30%20rue%20larue,%20quebec/adress/geom

redirect to
http://www.servername.org/search/geocode?q=300%20rue%20larue,%20quebec=adress=geom


the servername.org already format the response in JSON format, so don't
have to transform the BODY receive.

When i try with a standard Browser like, Firefox, Safari, Google
Chrome, etc. it works very well .

When i try with application Browser like utl_http from Oracle or wget
or Curl i receive and HTTP error 500 from Jetty 
Nothing in the karaf LOG

The request send to my remote server, it respond 200 OK and return de
DATA as well 
but after all data was receive 
jetty return an error to my application 

witch TCPDUMP i saw:

HTTP/1.1 500 Server Error
Date: Thu, 22 Feb 2018 18:54:23 GMT
Server: Jetty(9.2.19.v20160908)
Content‑Type: text/plain; charset=ISO‑8859‑1
Connection: close
com.fasterxml.jackson.databind.JsonMappingException: No serializer
found for class
org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream
and no properties discovered to create BeanSerializer (to avoid
exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) )


I DON'T find what happend ??  Any idea 

Thank's  in Advance



Daniel



Here my code:


http://www.springframework.org/schema/beans;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema‑instance;
  
xmlns:wsse="http://docs.oasis‑open.org/wss/2004/01/oasis‑200401‑wss‑wssecurity‑secext‑1.0.xsd;
   xmlns:cxf="http://camel.apache.org/schema/cxf;
   xmlns:camel="http://camel.apache.org/schema/spring;
   xmlns:osgi="http://www.springframework.org/schema/osgi;
   xsi:schemaLocation="
  http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring‑beans‑2.5.xsd 
  http://camel.apache.org/schema/cxf 
http://camel.apache.org/schema/cxf/camel‑cxf.xsd 
  http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel‑spring‑2.17.7.xsd 
  http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring‑osgi.xsd;>




  
  
  
  


http://camel.apache.org/schema/spring; trace="false" >


  
  




   
 
 
   
 
 
   
 


   
   ...   
   ...
   some validation
   ...
   ...
   http://www.servername.org/search
   geocode
   q=${header.geoRequete}${header.geoType}${header.geoGeometries}${headergeoFiltre}
   http://dummyhost>
   
  
org.apache.camel.http.common.HttpOperationFailedException
true 
   
  













"Le présent courriel peut contenir des renseignements confidentiels et
ne s'adresse qu'au destinataire dont le nom apparaît ci‑dessus. Si ce
courriel vous est parvenu par mégarde, veuillez le supprimer et nous en
aviser aussitôt."


"Le présent courriel peut contenir des renseignements confidentiels et ne 
s'adresse qu'au destinataire dont le nom apparaît ci-dessus. Si ce courriel 
vous est parvenu par mégarde, veuillez le supprimer et nous en aviser aussitôt."


Blueprint, property-place-holder error name is already instanciated as null and cannot be removed

2018-02-22 Thread Alex Soto
Hello, 

I am having some problems migrating to Camel 2.20.2 from 2.17.4.  I have 
blueprint configuration:





A component configuration (in this case for Quartz2, but I don’t think this is 
related to Quartz2):





Then use this in a route:



...

When I run this (Karaf 4.2.5) an exception is thrown:

org.osgi.service.blueprint.container.ComponentDefinitionException: Name 
audit-log-reaper-quartz is already instanciated as null and cannot be removed.
at 
org.apache.aries.blueprint.container.BlueprintRepository.removeRecipe(BlueprintRepository.java:131)
 [38:org.apache.aries.blueprint.core:1.8.3]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.updateUninstantiatedRecipes(BlueprintContainerImpl.java:572)
 [38:org.apache.aries.blueprint.core:1.8.3]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:559)
 [38:org.apache.aries.blueprint.core:1.8.3]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:394)
 [38:org.apache.aries.blueprint.core:1.8.3]
at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:275)
 [38:org.apache.aries.blueprint.core:1.8.3]


This was working fine in Camel 2.17.4.  Interestingly,  if I remove property 
place holder:





Then it works fine, no errors.  So this seems to be related to the property 
placeholders.  Has anybody seen this? 
I appreciate any insight on how to solve this problem.

Best regards,
Alex soto





Rest Service / redirect with camel-http / No serializer found for class org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream

2018-02-22 Thread Daniel Langevin
Hi,

i try to implement a Rest service In OSGI Karaf 4.0.9  with Camel 2.17.7
this service redirect with camel-http to another URL.

like 
http://serverA.org:8181/rest/XXX/geocode/30%20rue%20larue,%20quebec/adress/geom
redirect to
http://www.servername.org/search/geocode?q=300%20rue%20larue,%20quebec=adress=geom

the servername.org already format the response in JSON format, so don't have to 
transform the BODY receive.

When i try with a standard Browser like, Firefox, Safari, Google Chrome, etc. 
it works very well .

When i try with application Browser like utl_http from Oracle or wget or Curl i 
receive and HTTP error 500 from Jetty 
Nothing in the karaf LOG

The request send to my remote server, it respond 200 OK and return de DATA as 
well 
but after all data was receive 
jetty return an error to my application 

witch TCPDUMP i saw:

HTTP/1.1 500 Server Error
Date: Thu, 22 Feb 2018 18:54:23 GMT
Server: Jetty(9.2.19.v20160908)
Content-Type: text/plain; charset=ISO-8859-1
Connection: close
com.fasterxml.jackson.databind.JsonMappingException: No serializer found for 
class org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream 
and no properties discovered to create BeanSerializer (to avoid exception, 
disable SerializationFeature.FAIL_ON_EMPTY_BEANS) )


I DON'T find what happend ??  Any idea 

Thank's  in Advance



Daniel



Here my code:


http://www.springframework.org/schema/beans;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
   xmlns:cxf="http://camel.apache.org/schema/cxf;
   xmlns:camel="http://camel.apache.org/schema/spring;
   xmlns:osgi="http://www.springframework.org/schema/osgi;
   xsi:schemaLocation="
  http://www.springframework.org/schema/beans  
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
  http://camel.apache.org/schema/cxf  
http://camel.apache.org/schema/cxf/camel-cxf.xsd 
  http://camel.apache.org/schema/spring  
http://camel.apache.org/schema/spring/camel-spring-2.17.7.xsd 
  http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi.xsd;>




  
  
  
  


http://camel.apache.org/schema/spring; trace="false" >


  
  




   
 
 
   
 
 
   
 


   
   ...   
   ...
   some validation
   ...
   ...
   http://www.servername.org/search
   geocode
   q=${header.geoRequete}${header.geoType}${header.geoGeometries}${headergeoFiltre}
   http://dummyhost>
   
   
org.apache.camel.http.common.HttpOperationFailedException
true 
   
  













"Le présent courriel peut contenir des renseignements confidentiels et ne 
s'adresse qu'au destinataire dont le nom apparaît ci-dessus. Si ce courriel 
vous est parvenu par mégarde, veuillez le supprimer et nous en aviser aussitôt."


Re: Filtering files with the File2 component

2018-02-22 Thread Meissa Sakho
It was not required to include the txt filter.
I've removed it and it works. There was some errors elsewhere but the code
above works.

I've borrowed the example from Camel in Action 2 chapter two to handle
another use case (handling extra extension).
The extract of my route look like the following:

public void configure() throws Exception {

   from("file:loans")
.choice()
.when(header("CamelFileName").endsWith(".xml"))
.log("XML loan processed: ${header.camelFileName}")

.to("file:loans/results?fileName=loan.txt=Append")
.otherwise()
.log("Invalid format: ${header.camelFileName}")
.to("file:loans/badloans")

Meissa

2018-02-21 13:46 GMT+01:00 Claus Ibsen :

> Using both include and exclude is a bit meaningless unless there are
> some overlaps.
>
> But here you filter on file extensions, so you cannot have something
> that is both xml and txt.
>
> Also mind its using regular expression syntax, so its technically
> .*xml$  to indicate ends with xml.
>
>
>
> On Wed, Feb 21, 2018 at 8:53 AM, Meissa Sakho  wrote:
> > Hello everyone,
> > I need to write a route with the requirements below:
> > 1) The route will pool a source folder and takes only files whose name
> ends
> > with .xml
> > 2) The source file content must be saved into a single journal file named
> > loan.xml
> > 3)If a file name ends with .txt, it should not be included in the
> message.
> >
> > I'm trying to combine the include and the exclude option to achieve this.
> > Below is an extract of my route:
> >
> > public void configure() throws Exception {
> >
> >from("file:loans?include=.*xml=.*txt")
> >.to("file:loans/results?fileName=loan.txt=Append");
> >
> >
> > It's not working as expected.
> > Do you have any idea about how to include only files ending with a
> defined
> > value and excluding others?
> >
> > thanks,
> > Meissa
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-22 Thread Claus Ibsen
You can try to specify beanio as a  where you configure the
charset via  - then its a  style where you specify the
FQN class name and all that stuff.
Then you should be able to setup the encoding as a javaCharset type.

The   stuff may be a bit cumbersome to get right, but
it ought to be possible.

Then you can refer to the bean via  where xxx is
the bean id.

The FQN class would be the beanio dataformat class you can find in the
camel-beanio JAR file.



On Thu, Feb 22, 2018 at 4:16 PM,   wrote:
> I tried all possible to set CamelCharsetName property/header/whatever
> manually, in hope it would be used by beanio, but it doesn't work.
> I even tried to convert body to ISO-8859-2, which is single byte character
> representation, but whatever I try, unmarshalling fixed length stream with
> beanio fails
> as soon as there are diacritic characters in a message, otherwise it is
> OK.
>
> 
> 
> 
>  id="_setHeader1">
> queue://QM_TEST/INPUTQ?targetClient=1
> 
>  uri="websphere:queue:SYSTEM.DEFAULT.LOCAL.QUEUE?useMessageIDAsCorrelationID=truereplyTo=REPLYQ"/>
> 
> 
> UTF-8
> 
>  propertyName="CamelCharsetName">
> UTF-8
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> This excludes everything but the first suggestion from the web as a
> possible solution with beanio, I may use something else, or get Red Hat
> support to utilize your fix.
>
>
> Hrvoje Đurđević
> Specijalist
>
> IT
> Raiffeisenbank Austria d.d.
> Magazinska cesta 69/2, 1 Zagreb
> Tel. +385 1 4695 022
> Fax. +385 1 4604 907
> Mob. +385 98 416 032
> www.rba.hr
> __
>
> Napomena:
> Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
> povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
> primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
> odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene 
> priloge i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. 
> Neovlaštena uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove 
> poruke je zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća 
> pravno obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije 
> nije izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
> Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, 
> kao ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili 
> drugim štetnim programom, te zbog eventualnih tehničkih problema prilikom 
> dostave ove poruke.
>
> Disclaimer:
> This e-mail message and any attachment may contain confidental and/or 
> privileged information and is intended for use by the indicated addressee 
> only. If you have received this message in error, please notify the sender 
> immediately, destroy the original message and any attachment and delete this 
> message and any attachment from your system. Unauthorized use, distribution, 
> disclosure, reproduction, or alteration of this e-mail message is forbidden. 
> Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
> statements via e-mail unless otherwise stated. Considering that internet 
> communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
> for the content of this message, for potential damage occured due to 
> infection of this message with a virus or other malicious program, and for 
> potential technical problems during delivery of this message.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-22 Thread hrvoje . djurdjevic
I tried all possible to set CamelCharsetName property/header/whatever 
manually, in hope it would be used by beanio, but it doesn't work.
I even tried to convert body to ISO-8859-2, which is single byte character 
representation, but whatever I try, unmarshalling fixed length stream with 
beanio fails
as soon as there are diacritic characters in a message, otherwise it is 
OK.





queue://QM_TEST/INPUTQ?targetClient=1




UTF-8


UTF-8











This excludes everything but the first suggestion from the web as a 
possible solution with beanio, I may use something else, or get Red Hat 
support to utilize your fix.


Hrvoje Đurđević
Specijalist

IT
Raiffeisenbank Austria d.d.
Magazinska cesta 69/2, 1 Zagreb
Tel. +385 1 4695 022
Fax. +385 1 4604 907
Mob. +385 98 416 032
www.rba.hr
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: failover with zookeeper-master component

2018-02-22 Thread Dennis Holunder
Undestood. The question is, is the camel zookeeper-master component
capable to reconnect, if after some longer time zk nodes come back? In
logs I've seen something like "retry gave up", which is not desirable.
IMHO, it should never give up, regardles of how many zk nodes are
available


ERROR [Curator-Framework-0] o.a.c.f.i.CuratorFrameworkImpl: Background
operation retry gave up
org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.checkBackgroundRetry(CuratorFrameworkImpl.java:728)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:857)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:809)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.access$300(CuratorFrameworkImpl.java:64)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:267)
at java.util.concurrent.FutureTask.run(Unknown Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown
Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
ERROR [Curator-Framework-0] o.a.c.f.i.CuratorFrameworkImpl: Background
retry gave up
org.apache.curator.CuratorConnectionLossException: KeeperErrorCode =
ConnectionLoss
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:838)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:809)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.access$300(CuratorFrameworkImpl.java:64)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:267)
at java.util.concurrent.FutureTask.run(Unknown Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown
Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

2018-02-22 11:31 GMT+01:00 Claus Ibsen-2 [via Camel]
:
> It uses the zookeeper leader election so only the node that is the
> master is active, anyone else is in slave mode.
>
> Also mind that zk requires a running quorum to function, eg so if you
> have 3, you need 51%+ to be up and running, eg 2 nodes.
> So if you lose 2 nodes, and only have 1 then zk is in zombie mode
> (cant recall what they call this situation) and wont function, you
> need to bring up at least 1 more node to have a quorum.
>
>
>
>
> On Wed, Feb 21, 2018 at 10:13 AM, Dennis Holunder <[hidden email]> wrote:
>
>> Hi guys,
>>
>> having setup with 3 zookeeper servers the zookeeper master policy
>> works fine if one of clients is gone and the new master is then
>> selected. But what will happen if one or two of zookeeper servers are
>> gone and only one is still available? For example, if client is
>> connected to zookeper1 and it is gone, will the client reconnect to
>> zookeeper2 or zookeeper3?
>>
>> Kind regards, D
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
>
> 
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/failover-with-zookeeper-master-component-tp5817804p5817843.html
> To unsubscribe from Camel, click here.
> NAML


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-22 Thread hrvoje . djurdjevic
This info should be available to jms layer:

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q032060_.htm

The question is also does camel-beanio use Exchange.CHARSET_NAME property, 
even if properly set to UTF-8?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: failover with zookeeper-master component

2018-02-22 Thread Claus Ibsen
It uses the zookeeper leader election so only the node that is the
master is active, anyone else is in slave mode.

Also mind that zk requires a running quorum to function, eg so if you
have 3, you need 51%+ to be up and running, eg 2 nodes.
So if you lose 2 nodes, and only have 1 then zk is in zombie mode
(cant recall what they call this situation) and wont function, you
need to bring up at least 1 more node to have a quorum.




On Wed, Feb 21, 2018 at 10:13 AM, Dennis Holunder  wrote:
> Hi guys,
>
> having setup with 3 zookeeper servers the zookeeper master policy
> works fine if one of clients is gone and the new master is then
> selected. But what will happen if one or two of zookeeper servers are
> gone and only one is still available? For example, if client is
> connected to zookeper1 and it is gone, will the client reconnect to
> zookeeper2 or zookeeper3?
>
> Kind regards, D



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException: charset

2018-02-22 Thread hrvoje . djurdjevic
I'm looking into it right now, here are some ideas that I found on web:

https://stackoverflow.com/questions/11580248/how-to-set-character-encoding-in-beanio
https://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html#CHARSET_NAME
http://camel.apache.org/string.html

So basically, I would like the last java dsl example rewritten in spring 
xml,

from("jms://queue/order").unmarshal().string("UTF-8").processRef("newOrder");

and I would think that I need to set string to UTF-8 charset before doing 
unmarshal with BeanIO?
There is always an alternative to use something else, like Bindy, but if 
possible I would stick to BeanIO, 
and maybe setting CHARSET_NAME property of Exchange would be an 
alternative way to pass that info to camel-beanio?
__

Napomena:
Ova elektronička poruka i njeni prilozi mogu sadržavati povjerljive i/ili 
povlaštene informacije, a namijenjena je isključivo za upotrebu naznačenog 
primatelja. Ako ste ovu poruku primili greškom, molimo Vas da o tome bez 
odlaganja obavijestite pošiljatelja, da uništite izvornu poruku i njene priloge 
i bez odlaganja poruku i njene priloge izbrišete iz Vašeg sistema. Neovlaštena 
uporaba, distribucija, otkrivanje, umnožavanje ili izmjena ove poruke je 
zabranjena. Raiffeisenbank Austria d.d. ne daje niti ne prihvaća pravno 
obvezujuće izjave putem elektroničkih poruka osim ukoliko drugačije nije 
izričito navedeno. Budući da komunikacija internetom nije zaštićena, 
Raiffeisenbank Austria d.d. ne prihvaća odgovornost za sadržaj ove poruke, kao 
ni za eventualnu štetu nastalu zbog zaraženosti ove poruke virusom ili drugim 
štetnim programom, te zbog eventualnih tehničkih problema prilikom dostave ove 
poruke.

Disclaimer:
This e-mail message and any attachment may contain confidental and/or 
privileged information and is intended for use by the indicated addressee only. 
If you have received this message in error, please notify the sender 
immediately, destroy the original message and any attachment and delete this 
message and any attachment from your system. Unauthorized use, distribution, 
disclosure, reproduction, or alteration of this e-mail message is forbidden. 
Raiffeisenbank Austria d.d. neither makes nor accepts legally binding 
statements via e-mail unless otherwise stated. Considering that internet 
communication is not secured, Raiffeisenbank Austria d.d. is not responsible 
for the content of this message, for potential damage occured due to infection 
of this message with a virus or other malicious program, and for potential 
technical problems during delivery of this message.


Re: Mybatis component L2 cache and OUT mode

2018-02-22 Thread Claus Ibsen
Hi

Its more of a MyBatis question then Camel, so I suggest to ask on
their user forum.

On Thu, Feb 22, 2018 at 12:17 AM, Rahman USTA  wrote:
> Hello,
>
> I try to activate L2 cache for mybatis component in an application. There
> are several stored procedure calls which have IN and OUT parameters. My
> goal is caching returned OUT parameters and serving this data on upcoming
> endpoint calls.
>
> Mybatis rejects to cache callables that has OUT mode parameter.
>
> Cause: org.apache.ibatis.executor.ExecutorException: Caching stored
> procedures with OUT params is not supported. Please configure useCache=false
>
> How way can I activate caching for this kind of mybatis calls?
>
> Thanks.
> Rahman.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2