Camel website: documentation or projects

2020-06-17 Thread Zoran Regvart
Hi Cameleers,
we have a discussion on pull request #397[1] about merging the
Documentation and Projects sections on the website. This came about
from a fair bit of duplication we currently have between those two
pages and we're trying to consolidate and simplify.

We're looking for community feedback on this:
 - would you expect this unified page to be under "Projects" or under
"Documentation"?
 - what do you expect to find on this page (description, links, etc?)

thanks :)

zoran

[1] https://github.com/apache/camel-website/pull/397
-- 
Zoran Regvart


RE: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Mrinal Sharma
No, it's not wrong. The Keystore works with the same password if I remove Camel 
dependency. With camel added, it gives the error. Some more Information from 
Java Security Logs. Not sure why in non-working logs code picks bouncycastle.

Non-working logs:
Provider: KeyStore.JKS type from: SUN
Provider: MessageDigest.SHA algorithm from: SUN
pkcs12: Loading PKCS#7 data
pkcs12: Loading PKCS#7 encryptedData (PBEWithSHA1AndRC2_40 iterations: 5)
jar: beginEntry 
org/bouncycastle/jcajce/provider/symmetric/RC2$PBEWithSHAAnd40BitRC2.class
jar: Manifest Entry: 
org/bouncycastle/jcajce/provider/symmetric/RC2$PBEWithSHAAnd40BitRC2.class 
digest=SHA-256
jar:   manifest 
3654e2acabc5ecdfbc8e5c1b37356975ead6804bd65560e61e190999cc14fbf28
jar:   computed 
3654e2acabc5ecdfbc8e51cb37356975ead6804bd65560e61e190999cc14fbf28
jar:
jar: beginEntry 
org/bouncycastle/jcajce/provider/symmetric/util/BaseBlockCipher.class
jar: Manifest Entry:


Working Logs:
Provider: KeyStore.JKS type from: SUN
Provider: MessageDigest.SHA algorithm from: SUN
pkcs12: Loading PKCS#7 data
ProviderConfig: Loading provider: com.sun.crypto.provider.SunJCE
policy: getPermissions:
PD CodeSource: 
(file:/C:/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/sunjce_provider.jar 
)
PD ClassLoader: sun.misc.Launcher$ExtClassLoader@3c4c4927
PD Principals: 
policy: evaluate codesources:
Policy CodeSource: 
(file:/C:/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/* )
Active CodeSource: (file:/C: 
/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/sunjce_provider.jar )
policy: evaluate principals:
Policy Principals: []
Active Principals: []
policy:   granting ("java.security.AllPermission" "" "")
policy: evaluation (codesource/principals) passed


Thanks,
Mrinal
-Original Message-
From: Andrea Cosentino  
Sent: Wednesday, June 17, 2020 4:55 PM
To: users@camel.apache.org
Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

CAUTION - EXTERNAL EMAIL This email originated from outside of Smith Micro 
Software. Do not click links or open attachments unless you recognize the 
sender and know the content is safe.


The keystore password is wrong.

Il mer 17 giu 2020, 22:33 Mrinal Sharma  ha scritto:

> Can you elaborate more?
>
> -Original Message-
> From: Andrea Cosentino 
> Sent: Wednesday, June 17, 2020 3:54 PM
> To: users@camel.apache.org
> Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE
>
> CAUTION - EXTERNAL EMAIL This email originated from outside of Smith 
> Micro Software. Do not click links or open attachments unless you 
> recognize the sender and know the content is safe.
>
>
> The error is explicit.
>
> Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha
> scritto:
>
> > Hello,
> >
> > I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) 
> > application which loads PKCS12 file in UAAServer. Once I added Camel 
> > 3 Dependency the KeyStore API's started giving errors.
> >
> > 
> > --
> > 
> > --
> > ---
> >
> > KeyPair keyPair = new KeyStoreKeyFactory(
> >  new
> > ClassPathResource(uaaProperties.getKeyStore().getName()),
> > uaaProperties.getKeyStore().getPassword().toCharArray())
> >  .getKeyPair(uaaProperties.getKeyStore().getAlias());
> >
> > 
> > --
> > 
> > --
> > ---
> > The error that is thrown is :
> > Caused by: java.io.IOException: keystore password was incorrect
> >
> > Why would addition of Camel 3 cause this error?
> >
> > Thanks,
> > Mrinal Sharma
> >
> >
> >
>


Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Andrea Cosentino
The keystore password is wrong.

Il mer 17 giu 2020, 22:33 Mrinal Sharma  ha scritto:

> Can you elaborate more?
>
> -Original Message-
> From: Andrea Cosentino 
> Sent: Wednesday, June 17, 2020 3:54 PM
> To: users@camel.apache.org
> Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE
>
> CAUTION - EXTERNAL EMAIL This email originated from outside of Smith Micro
> Software. Do not click links or open attachments unless you recognize the
> sender and know the content is safe.
>
>
> The error is explicit.
>
> Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha
> scritto:
>
> > Hello,
> >
> > I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE)
> > application which loads PKCS12 file in UAAServer. Once I added Camel 3
> > Dependency the KeyStore API's started giving errors.
> >
> > --
> > --
> > ---
> >
> > KeyPair keyPair = new KeyStoreKeyFactory(
> >  new
> > ClassPathResource(uaaProperties.getKeyStore().getName()),
> > uaaProperties.getKeyStore().getPassword().toCharArray())
> >  .getKeyPair(uaaProperties.getKeyStore().getAlias());
> >
> > --
> > --
> > ---
> > The error that is thrown is :
> > Caused by: java.io.IOException: keystore password was incorrect
> >
> > Why would addition of Camel 3 cause this error?
> >
> > Thanks,
> > Mrinal Sharma
> >
> >
> >
>


RE: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Mrinal Sharma
Can you elaborate more?

-Original Message-
From: Andrea Cosentino  
Sent: Wednesday, June 17, 2020 3:54 PM
To: users@camel.apache.org
Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

CAUTION - EXTERNAL EMAIL This email originated from outside of Smith Micro 
Software. Do not click links or open attachments unless you recognize the 
sender and know the content is safe.


The error is explicit.

Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha scritto:

> Hello,
>
> I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) 
> application which loads PKCS12 file in UAAServer. Once I added Camel 3 
> Dependency the KeyStore API's started giving errors.
>
> --
> --
> ---
>
> KeyPair keyPair = new KeyStoreKeyFactory(
>  new 
> ClassPathResource(uaaProperties.getKeyStore().getName()),
> uaaProperties.getKeyStore().getPassword().toCharArray())
>  .getKeyPair(uaaProperties.getKeyStore().getAlias());
>
> --
> --
> ---
> The error that is thrown is :
> Caused by: java.io.IOException: keystore password was incorrect
>
> Why would addition of Camel 3 cause this error?
>
> Thanks,
> Mrinal Sharma
>
>
>


Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Andrea Cosentino
The error is explicit.

Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha scritto:

> Hello,
>
> I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) application
> which loads PKCS12 file in UAAServer. Once I added Camel 3 Dependency the
> KeyStore API's started giving errors.
>
> ---
>
> KeyPair keyPair = new KeyStoreKeyFactory(
>  new ClassPathResource(uaaProperties.getKeyStore().getName()),
> uaaProperties.getKeyStore().getPassword().toCharArray())
>  .getKeyPair(uaaProperties.getKeyStore().getAlias());
>
> ---
> The error that is thrown is :
> Caused by: java.io.IOException: keystore password was incorrect
>
> Why would addition of Camel 3 cause this error?
>
> Thanks,
> Mrinal Sharma
>
>
>


Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Mrinal Sharma
Hello,

I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) application which 
loads PKCS12 file in UAAServer. Once I added Camel 3 Dependency the KeyStore 
API's started giving errors.
---

KeyPair keyPair = new KeyStoreKeyFactory(
 new ClassPathResource(uaaProperties.getKeyStore().getName()), 
uaaProperties.getKeyStore().getPassword().toCharArray())
 .getKeyPair(uaaProperties.getKeyStore().getAlias());
---
The error that is thrown is :
Caused by: java.io.IOException: keystore password was incorrect

Why would addition of Camel 3 cause this error?

Thanks,
Mrinal Sharma




Re: split with tokenizeXML in complex XML

2020-06-17 Thread Mikael Andersson Wigander
Well now my original problem has turned to a split/xpath problem. 

Trying to split on either the tag as Tx or using //Tx or using 
//FinInstrmRptgTxRpt/Tx returns nothing. 

Tried online xpath parsers and they return the correct xml for the last two (as 
mentioned above). 

Tried 2.25.1 and 3.3.0 of camel with the same result. 
File is xml and body converted to String and then 

split(xpath(“//FinInstrmRptgTxRpt/Tx”))

Also tried an XPathBuilder with the same result. 

Pls advice

// Mikael Andersson Wigander


> 17 juni 2020 kl. 13:22 skrev Claus Ibsen :
> 
> Hi
> 
> It can be both, hower its a little better as an argument
> 
> split(xpath(), )
> 
> 
> 
>> On Wed, Jun 17, 2020 at 1:10 PM Mikael Andersson Wigander
>>  wrote:
>> 
>> Hi
>> 
>> Makes sense.
>> 
>> Tried splitting using xpath but it didn’t work either.
>> Should xpath be as argument of split or own statement (.xpath())?
>> 
>> // Mikael Andersson Wigander
>> 
>> 
 17 juni 2020 kl. 10:14 skrev Claus Ibsen :
>>> 
>>> Hi
>>> 
>>> No tokenizeXml is for not complex XML with tags that are nested. It
>>> uses regexp parsing etc.
>>> 
>>> Instead using camel-stax or camel-jaxb or something like that.
>>> 
>>> 
 On Wed, Jun 17, 2020 at 9:14 AM Mikael Andersson Wigander
  wrote:
 
 Hi
 
 We have a XML file to split on tag .
 However this tag is also present in a node further down the tree as well.
 
 tokenizeXML is used in our application but now this won’t work because it 
 ends prematurely.
 
 Here’s the XML
 
 
 
   
   
   1312312
   
   
   
   >>> xmlns="urn:iso:std:iso:20022:tech:xsd:DRAFT15auth.016.001.01">
   
   
   
   197X85138XMT
   1231231
   true
   312312
   
   
   
   123123
   
   NL
   
   
   549300DLR3UX38D4Z689
   
   
   
   
   
   123123123
   
   
   
   
   true
   
   
   2020-06-05T21:18:32.000Z
   AOTC
   
   3.57
   
   
   
   
   1.131818
   
   
   
   XOFF
   
   
   
   
   USD/EUR
   JFTXFP
   USD
   
   
   2020-06-09
   1
   
   
   
   
   
   
   USD/EUR
   
   
   
   
   
   
   PHYS
   
   
   
   
   NORE
   
   
   
 false
   
   
   
   
   
 
 
 In the debugger it reveals that it is “broken”
 
 
   
   197X85138XMT
   549300DLR3UX38D4Z689
   true
   549300FVRWYPDFJTH118
   
   
  

Re: split with tokenizeXML in complex XML

2020-06-17 Thread Claus Ibsen
Hi

Yeah there is the problem with some xml libraries not working in
streaming mode where they can process the data in chunks, so they have
to load all content into memory.
The tokenizer from Camel does not have that problem, but it can have
others like not being able to match the right ending tag.

Btw have you tried the non xml tokenizer, the older one was more
basic. Not sure if we had some way to configure a parent tag for the
matching, or if we could add such functionality.

So if you look for  and  pairs and configure a parent tag
as  then it will attempt to match  and


Anyway yeah it can get a bit more complex. Also sometimes if you not
the content of the data will always be like X, then some regexp
matcher may do the trick, which is what the general tokenizer can work
with.

But on the other hand if you solve a problem with regexp, then they
say you introduce a new problem.



On Wed, Jun 17, 2020 at 4:20 PM bob anderson  wrote:
>
> HI
>
> Some time back (couple of years) I  used split xtokenize on a large XML
> file at three levels which has worked very well. Two of the three elements
> had the same tags, however I needed elements from each level so did the
> split tokenize in separate routes i.e. split/tokenize (get an element) call
> the next route which split tokenized the next section(s) and then finally
> the third level. I use the XML DSL (and this was using Camel  2.15.1 - so
> I'm sure it will work still)
> The file had 50 rows to 100 rows and I tried different
> approaches to handle both the size and speed of processing (Claus had a
> good article on processing large xml files which I followed)
>
> Cheers
>
> Bob
>
>
>
>
> On Wed, Jun 17, 2020 at 1:22 PM Claus Ibsen  wrote:
>
> > Hi
> >
> > It can be both, hower its a little better as an argument
> >
> > split(xpath(), )
> >
> >
> >
> > On Wed, Jun 17, 2020 at 1:10 PM Mikael Andersson Wigander
> >  wrote:
> > >
> > > Hi
> > >
> > > Makes sense.
> > >
> > > Tried splitting using xpath but it didn’t work either.
> > > Should xpath be as argument of split or own statement (.xpath())?
> > >
> > > // Mikael Andersson Wigander
> > >
> > >
> > > > 17 juni 2020 kl. 10:14 skrev Claus Ibsen :
> > > >
> > > > Hi
> > > >
> > > > No tokenizeXml is for not complex XML with tags that are nested. It
> > > > uses regexp parsing etc.
> > > >
> > > > Instead using camel-stax or camel-jaxb or something like that.
> > > >
> > > >
> > > >> On Wed, Jun 17, 2020 at 9:14 AM Mikael Andersson Wigander
> > > >>  wrote:
> > > >>
> > > >> Hi
> > > >>
> > > >> We have a XML file to split on tag .
> > > >> However this tag is also present in a node further down the tree as
> > well.
> > > >>
> > > >> tokenizeXML is used in our application but now this won’t work
> > because it ends prematurely.
> > > >>
> > > >> Here’s the XML
> > > >>
> > > >> 
> > > >>  > xmlns="urn:uv:xsd:unavista.mifir.iso20022.001.001.001">
> > > >>
> > > >>
> > > >>1312312
> > > >>
> > > >>
> > > >>
> > > >> > xmlns="urn:iso:std:iso:20022:tech:xsd:DRAFT15auth.016.001.01">
> > > >>
> > > >>
> > > >>
> > > >>197X85138XMT
> > > >>1231231
> > > >>true
> > > >>312312
> > > >>
> > > >>
> > > >>
> > > >>123123
> > > >>
> > > >>NL
> > > >>
> > > >>
> > > >>549300DLR3UX38D4Z689
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>123123123
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>true
> > > >>
> > > >>
> > > >>2020-06-05T21:18:32.000Z
> > > >>AOTC
> > > >>
> > > >>3.57
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>1.131818
> > > >>
> > > >>
> > > >>
> > > >>XOFF
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>USD/EUR
> > > >> 

Re: split with tokenizeXML in complex XML

2020-06-17 Thread bob anderson
HI

Some time back (couple of years) I  used split xtokenize on a large XML
file at three levels which has worked very well. Two of the three elements
had the same tags, however I needed elements from each level so did the
split tokenize in separate routes i.e. split/tokenize (get an element) call
the next route which split tokenized the next section(s) and then finally
the third level. I use the XML DSL (and this was using Camel  2.15.1 - so
I'm sure it will work still)
The file had 50 rows to 100 rows and I tried different
approaches to handle both the size and speed of processing (Claus had a
good article on processing large xml files which I followed)

Cheers

Bob




On Wed, Jun 17, 2020 at 1:22 PM Claus Ibsen  wrote:

> Hi
>
> It can be both, hower its a little better as an argument
>
> split(xpath(), )
>
>
>
> On Wed, Jun 17, 2020 at 1:10 PM Mikael Andersson Wigander
>  wrote:
> >
> > Hi
> >
> > Makes sense.
> >
> > Tried splitting using xpath but it didn’t work either.
> > Should xpath be as argument of split or own statement (.xpath())?
> >
> > // Mikael Andersson Wigander
> >
> >
> > > 17 juni 2020 kl. 10:14 skrev Claus Ibsen :
> > >
> > > Hi
> > >
> > > No tokenizeXml is for not complex XML with tags that are nested. It
> > > uses regexp parsing etc.
> > >
> > > Instead using camel-stax or camel-jaxb or something like that.
> > >
> > >
> > >> On Wed, Jun 17, 2020 at 9:14 AM Mikael Andersson Wigander
> > >>  wrote:
> > >>
> > >> Hi
> > >>
> > >> We have a XML file to split on tag .
> > >> However this tag is also present in a node further down the tree as
> well.
> > >>
> > >> tokenizeXML is used in our application but now this won’t work
> because it ends prematurely.
> > >>
> > >> Here’s the XML
> > >>
> > >> 
> > >>  xmlns="urn:uv:xsd:unavista.mifir.iso20022.001.001.001">
> > >>
> > >>
> > >>1312312
> > >>
> > >>
> > >>
> > >> xmlns="urn:iso:std:iso:20022:tech:xsd:DRAFT15auth.016.001.01">
> > >>
> > >>
> > >>
> > >>197X85138XMT
> > >>1231231
> > >>true
> > >>312312
> > >>
> > >>
> > >>
> > >>123123
> > >>
> > >>NL
> > >>
> > >>
> > >>549300DLR3UX38D4Z689
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>123123123
> > >>
> > >>
> > >>
> > >>
> > >>true
> > >>
> > >>
> > >>2020-06-05T21:18:32.000Z
> > >>AOTC
> > >>
> > >>3.57
> > >>
> > >>
> > >>
> > >>
> > >>1.131818
> > >>
> > >>
> > >>
> > >>XOFF
> > >>
> > >>
> > >>
> > >>
> > >>USD/EUR
> > >>JFTXFP
> > >>USD
> > >>
> > >>
> > >>2020-06-09
> > >>1
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> USD/EUR
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>PHYS
> > >>
> > >>
> > >>
> > >>
> > >>NORE
> > >>
> > >>
> > >>
> false
> > >> 

Re: split with tokenizeXML in complex XML

2020-06-17 Thread Claus Ibsen
Hi

It can be both, hower its a little better as an argument

split(xpath(), )



On Wed, Jun 17, 2020 at 1:10 PM Mikael Andersson Wigander
 wrote:
>
> Hi
>
> Makes sense.
>
> Tried splitting using xpath but it didn’t work either.
> Should xpath be as argument of split or own statement (.xpath())?
>
> // Mikael Andersson Wigander
>
>
> > 17 juni 2020 kl. 10:14 skrev Claus Ibsen :
> >
> > Hi
> >
> > No tokenizeXml is for not complex XML with tags that are nested. It
> > uses regexp parsing etc.
> >
> > Instead using camel-stax or camel-jaxb or something like that.
> >
> >
> >> On Wed, Jun 17, 2020 at 9:14 AM Mikael Andersson Wigander
> >>  wrote:
> >>
> >> Hi
> >>
> >> We have a XML file to split on tag .
> >> However this tag is also present in a node further down the tree as well.
> >>
> >> tokenizeXML is used in our application but now this won’t work because it 
> >> ends prematurely.
> >>
> >> Here’s the XML
> >>
> >> 
> >> 
> >>
> >>
> >>1312312
> >>
> >>
> >>
> >> >> xmlns="urn:iso:std:iso:20022:tech:xsd:DRAFT15auth.016.001.01">
> >>
> >>
> >>
> >>197X85138XMT
> >>1231231
> >>true
> >>312312
> >>
> >>
> >>
> >>123123
> >>
> >>NL
> >>
> >>
> >>549300DLR3UX38D4Z689
> >>
> >>
> >>
> >>
> >>
> >>123123123
> >>
> >>
> >>
> >>
> >>true
> >>
> >>
> >>2020-06-05T21:18:32.000Z
> >>AOTC
> >>
> >>3.57
> >>
> >>
> >>
> >>
> >>1.131818
> >>
> >>
> >>
> >>XOFF
> >>
> >>
> >>
> >>
> >>USD/EUR
> >>JFTXFP
> >>USD
> >>
> >>
> >>2020-06-09
> >>1
> >>
> >>
> >>
> >>
> >>
> >>
> >>USD/EUR
> >>
> >>
> >>
> >>
> >>
> >>
> >>PHYS
> >>
> >>
> >>
> >>
> >>NORE
> >>
> >>
> >>
> >> false
> >>
> >>
> >>
> >>
> >>
> >> 
> >>
> >> In the debugger it reveals that it is “broken”
> >>
> >> 
> >>
> >>197X85138XMT
> >>549300DLR3UX38D4Z689
> >>true
> >>549300FVRWYPDFJTH118
> >>
> >>
> >>
> >>5493000WZY3YLO3WB727
> >>
> >>NL
> >>
> >>
> >>549300DLR3UX38D4Z689
> >>
> >>
> >>
> >>
> >>
> >>5493006KMX1VFTPYPW14
> >>

Re: split with tokenizeXML in complex XML

2020-06-17 Thread Mikael Andersson Wigander
Hi

Makes sense.

Tried splitting using xpath but it didn’t work either. 
Should xpath be as argument of split or own statement (.xpath())?

// Mikael Andersson Wigander


> 17 juni 2020 kl. 10:14 skrev Claus Ibsen :
> 
> Hi
> 
> No tokenizeXml is for not complex XML with tags that are nested. It
> uses regexp parsing etc.
> 
> Instead using camel-stax or camel-jaxb or something like that.
> 
> 
>> On Wed, Jun 17, 2020 at 9:14 AM Mikael Andersson Wigander
>>  wrote:
>> 
>> Hi
>> 
>> We have a XML file to split on tag .
>> However this tag is also present in a node further down the tree as well.
>> 
>> tokenizeXML is used in our application but now this won’t work because it 
>> ends prematurely.
>> 
>> Here’s the XML
>> 
>> 
>> 
>>
>>
>>1312312
>>
>>
>>
>>> xmlns="urn:iso:std:iso:20022:tech:xsd:DRAFT15auth.016.001.01">
>>
>>
>>
>>197X85138XMT
>>1231231
>>true
>>312312
>>
>>
>>
>>123123
>>
>>NL
>>
>>
>>549300DLR3UX38D4Z689
>>
>>
>>
>>
>>
>>123123123
>>
>>
>>
>>
>>true
>>
>>
>>2020-06-05T21:18:32.000Z
>>AOTC
>>
>>3.57
>>
>>
>>
>>
>>1.131818
>>
>>
>>
>>XOFF
>>
>>
>>
>>
>>USD/EUR
>>JFTXFP
>>USD
>>
>>
>>2020-06-09
>>1
>>
>>
>>
>>
>>
>>
>>USD/EUR
>>
>>
>>
>>
>>
>>
>>PHYS
>>
>>
>>
>>
>>NORE
>>
>>
>>
>> false
>>
>>
>>
>>
>>
>> 
>> 
>> In the debugger it reveals that it is “broken”
>> 
>> 
>>
>>197X85138XMT
>>549300DLR3UX38D4Z689
>>true
>>549300FVRWYPDFJTH118
>>
>>
>>
>>5493000WZY3YLO3WB727
>>
>>NL
>>
>>
>>549300DLR3UX38D4Z689
>>
>>
>>
>>
>>
>>5493006KMX1VFTPYPW14
>>
>>
>>
>>
>>true
>>
>>
>>2020-06-05T21:18:32.000Z
>>AOTC
>>
>>3.57
>>
>>
>> 

Re: Camel netty requestTimeout doesn't work properly

2020-06-17 Thread Zheng Feng
It seems that we can use the NettyRequestTimeoutIussueTest to reproduer
this issue. But it needs to be run manually and I have checked it with the
master branch and there is a failure in the camel-netty-test.log

I sent the PR [2] with my proposal to fix this issue.

[1]
https://github.com/apache/camel/blob/master/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyRequestTimeoutIssueTest.java
[2] https://github.com/apache/camel/pull/3925

On Tue, Jun 16, 2020 at 5:32 PM Zheng Feng  wrote:

> I just took some investigating with this issue. It looks like that the
> "timeout" handler is removed and has not been added until the next request.
> So I proposal that
> 1) revert some part of the fix of CAMEL-14363 to add back the codes which
> removes the "timeout" handler after receiving the response.
> 2) add the "timeout" handler in the activateObject() which should be
> invoked by NettyProducerPoolableObjectFactory with the connection pool.
>
> Vincenzo, can you provide a simple reproducer that I can use to verify my
> changes at first ?
>
> Thanks,
> Amos
>
>
> On Mon, Jun 15, 2020 at 7:39 PM Claus Ibsen  wrote:
>
>> Hi
>>
>> On Mon, Jun 15, 2020 at 11:27 AM Zheng Feng  wrote:
>> >
>> > Feel free to assign the issue to me and I can take a look at it.
>> >
>>
>> Thanks I created a ticket
>> https://issues.apache.org/jira/browse/CAMEL-15195
>>
>> > On Mon, Jun 15, 2020 at 5:22 PM Claus Ibsen 
>> wrote:
>> >
>> > > Hi
>> > >
>> > > Yeah that may seem a bit weird too. Lets create a JIRA and investigate
>> > >
>> > > On Fri, Jun 12, 2020 at 10:07 AM Zheng Feng  wrote:
>> > > >
>> > > > It seems related to
>> https://issues.apache.org/jira/browse/CAMEL-14363. I
>> > > > just checked the PR [1]
>> > > > and it looks a little bit strange to delete the codes which remove
>> the
>> > > > timeout handler after receiving a response.
>> > > >
>> > > > [1] https://github.com/apache/camel/pull/3460
>> > > >
>> > > > On Fri, Jun 12, 2020 at 3:38 PM Claus Ibsen 
>> > > wrote:
>> > > >
>> > > > > Hi
>> > > > >
>> > > > > It smells like a bug, you are welcome to create a JIRA and if you
>> can
>> > > > > work on an unit test we can use as reproducer.
>> > > > > Also check the existing timeout tests in camel-netty.
>> > > > >
>> > > > >
>> > > > > On Wed, Jun 10, 2020 at 7:54 PM Vincenzo Galluccio
>> > > > >  wrote:
>> > > > > >
>> > > > > > Hello,
>> > > > > >
>> > > > > > I'm having a problem with Camel-Netty component version 3.3.0
>> when
>> > > > > > using the requestTimeout option, which is causing the request to
>> > > > > > always timeout even when a response is received on time.
>> > > > > > The ReadTimeoutException should only be triggered if a response
>> is
>> > > not
>> > > > > > received on time.
>> > > > > >
>> > > > > > I have a Netty Producer Endpoint, in a Route, configured with
>> > > > > > requestTimeout set to 1 ms, as follows:
>> > > > > >
>> > > > > > ```
>> > > > > > @Component
>> > > > > > public class TransactionsRoute extends RouteBuilder {
>> > > > > >
>> > > > > > @Override
>> > > > > > public void configure() {
>> > > > > >
>> > > > > > from("direct:startRoute")
>> > > > > >
>> > > > >
>> > >
>> .to(netty:tcp://localhost:?sync=true=#encoders=#decoders=1);
>> > > > > > }
>> > > > > > }
>> > > > > > ```
>> > > > > >
>> > > > > > See logs below which show that a request is sent at
>> 15:20:10.996 and
>> > > > > > response is received at 15:20:11.256, and the exception is
>> triggered
>> > > > > > at 15:20:21.260, which is 10 seconds after the response is
>> received
>> > > > > > (note: requestTimeout set to 1 ms):
>> > > > > >
>> > > > > > ```
>> > > > > > 2020-06-10 15:20:10.996 TRACE 29616 --- [ClientTCPWorker]
>> > > > > > o.a.camel.component.netty.NettyProducer  : Channel open
>> finished with
>> > > > > > AbstractBootstrap$PendingRegistrationPromise@347574(success)
>> > > > > > 2020-06-10 15:20:10.996 DEBUG 29616 --- [ClientTCPWorker]
>> > > > > > o.a.camel.component.netty.NettyProducer  : Creating connector to
>> > > > > > address: localhost:
>> > > > > > 2020-06-10 15:20:10.996 DEBUG 29616 --- [ClientTCPWorker]
>> > > > > > o.a.camel.component.netty.NettyProducer  : Channel: [id:
>> 0x4fd36b4a,
>> > > > > > L:/127.0.0.1:63714 - R:localhost/127.0.0.1:] writing body:
>> [...]
>> > > > > > 2020-06-10 15:20:11.000 TRACE 29616 --- [ClientTCPWorker]
>> > > > > > o.a.camel.component.netty.NettyProducer  : Channel open: [id:
>> > > > > > 0x4fd36b4a, L:/127.0.0.1:63714 - R:localhost/127.0.0.1:]
>> > > > > > 2020-06-10 15:20:11.252 TRACE 29616 --- [ClientTCPWorker]
>> > > > > > o.a.camel.component.netty.NettyProducer  : Operation complete
>> > > > > > DefaultChannelPromise@1f64970(success)
>> > > > > > 2020-06-10 15:20:11.256 TRACE 29616 --- [ClientTCPWorker]
>> > > > > > o.a.camel.component.netty.NettyProducer  : Message received: [
>> ... ]
>> > > > > > 2020-06-10 15:20:11.256 DEBUG 29616 --- [ClientTCPWorker]
>> > > > > > 

Re: split with tokenizeXML in complex XML

2020-06-17 Thread Claus Ibsen
Hi

No tokenizeXml is for not complex XML with tags that are nested. It
uses regexp parsing etc.

Instead using camel-stax or camel-jaxb or something like that.


On Wed, Jun 17, 2020 at 9:14 AM Mikael Andersson Wigander
 wrote:
>
> Hi
>
> We have a XML file to split on tag .
> However this tag is also present in a node further down the tree as well.
>
> tokenizeXML is used in our application but now this won’t work because it 
> ends prematurely.
>
> Here’s the XML
>
> 
> 
> 
> 
> 1312312
> 
> 
> 
>  xmlns="urn:iso:std:iso:20022:tech:xsd:DRAFT15auth.016.001.01">
> 
> 
> 
> 197X85138XMT
> 1231231
> true
> 312312
> 
> 
> 
> 123123
> 
> NL
> 
> 
> 549300DLR3UX38D4Z689
> 
> 
> 
> 
> 
> 123123123
> 
> 
> 
> 
> true
> 
> 
> 2020-06-05T21:18:32.000Z
> AOTC
> 
> 3.57
> 
> 
> 
> 
> 1.131818
> 
> 
> 
> XOFF
> 
> 
> 
> 
> USD/EUR
> JFTXFP
> USD
> 
> 
> 2020-06-09
> 1
> 
> 
> 
> 
> 
> 
> USD/EUR
> 
> 
> 
> 
> 
> 
> PHYS
> 
> 
> 
> 
> NORE
> 
> 
> 
> false
> 
> 
> 
> 
> 
> 
>
> In the debugger it reveals that it is “broken”
>
> 
> 
> 197X85138XMT
> 549300DLR3UX38D4Z689
> true
> 549300FVRWYPDFJTH118
> 
> 
> 
> 5493000WZY3YLO3WB727
> 
> NL
> 
> 
> 549300DLR3UX38D4Z689
> 
> 
> 
> 
> 
> 5493006KMX1VFTPYPW14
> 
> 
> 
> 
> true
> 
> 
> 2020-06-05T21:18:32.000Z
> AOTC
> 
> 3.57
> 
> 
> 
> 
> 1.131818
> 
> 
> 
> XOFF
> 
>
>
> 

split with tokenizeXML in complex XML

2020-06-17 Thread Mikael Andersson Wigander
Hi

We have a XML file to split on tag . 
However this tag is also present in a node further down the tree as well. 

tokenizeXML is used in our application but now this won’t work because it ends 
prematurely.

Here’s the XML





1312312







197X85138XMT
1231231
true
312312



123123

NL


549300DLR3UX38D4Z689





123123123




true


2020-06-05T21:18:32.000Z
AOTC

3.57




1.131818



XOFF




USD/EUR
JFTXFP
USD


2020-06-09
1






USD/EUR






PHYS




NORE



false







In the debugger it reveals that it is “broken”



197X85138XMT
549300DLR3UX38D4Z689
true
549300FVRWYPDFJTH118



5493000WZY3YLO3WB727

NL


549300DLR3UX38D4Z689





5493006KMX1VFTPYPW14




true


2020-06-05T21:18:32.000Z
AOTC

3.57




1.131818



XOFF



Can this be done using tokenizeXML or?



Thx