JPA Concurrent Producers

2012-10-30 Thread Leandro Franchi
  at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
at 
org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:275)
at 
org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:183)
at 
org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:139)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)
Caused by: org.hibernate.service.UnknownServiceException: Unknown 
service requested [org.hibernate.event.service.spi.EventListenerRegistry]
at 
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:126)
at 
org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:176)
at 
org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:134)
at 
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:995)

at org.hibernate.loader.Loader.doQuery(Loader.java:874)
at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)

at org.hibernate.loader.Loader.loadEntity(Loader.java:2033)
at 
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)
at 
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)
at 
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3719)
at 
org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:449)
at 
org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:418)
at 
org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:204)
at 
org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:251)
at 
org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:148)

at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1079)
at org.hibernate.internal.SessionImpl.access$2200(SessionImpl.java:172)
at 
org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2425)

at org.hibernate.internal.SessionImpl.get(SessionImpl.java:979)
at 
org.hibernate.event.internal.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:271)
at 
org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:151)
at 
org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:76)

at org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:904)
at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:888)
at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:892)
at 
org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:879)

at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.springframework.orm.jpa.JpaTemplate$CloseSuppressingInvocationHandler.invoke(JpaTemplate.java:425)

at $Proxy154.merge(Unknown Source)
at 
org.apache.camel.component.jpa.JpaProducer$1.save(JpaProducer.java:98)
at 
org.apache.camel.component.jpa.JpaProducer$1.doInJpa(JpaProducer.java:66)
at 
org.apache.camel.component.jpa.JpaTemplateTransactionStrategy$1$1.doInJpa(JpaTemplateTransactionStrategy.java:82)
at 
org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183)

... 45 more

I read something about the Hibernate Session isn't thread safe, but I 
don't know how to fix these problem... if is this the problem...



Best Regards
Leandro Franchi


File do ActiveMQ

2012-11-06 Thread Leandro Franchi
r.Pipeline.process(Pipeline.java:117)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
at 
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
at 
org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
at 
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:336)
at 
br.com.flexvision.mir.collector.component.sw.file.FileSwitchConsumer.processExchange(FileSwitchConsumer.java:26)
at 
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189)
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155)
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:139)
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at 
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.camel.RuntimeCamelException: 
java.lang.IllegalArgumentException: reader must be specified
at 
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1280)
at 
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:936)
at 
org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:47)
at 
org.apache.camel.component.file.GenericFileConverter.convertTo(GenericFileConverter.java:93)

at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:932)
at 
org.apache.camel.impl.converter.StaticMethodFallbackTypeConverter.convertTo(StaticMethodFallbackTypeConverter.java:50)
at 
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:289)
at 
org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:111)

... 70 more
Caused by: java.lang.IllegalArgumentException: reader must be specified
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:290)
at org.apache.camel.util.IOHelper.buffered(IOHelper.java:117)
at 
org.apache.camel.converter.IOConverter.toByteArray(IOConverter.java:261)

at sun.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:932)

... 79 more

Anyone have idea?

Thanks
Leandro Franchi


Re: File do ActiveMQ

2012-11-07 Thread Leandro Franchi

Hi Christian, first of all, thanks for reply.

I've 160 routes like rt-* (see below). These routes, polling files in 
directories and send each file to seda endpoint. The seda endpoint 
process messages and send a processed message to ActiveMQ. I'm using 
ActiveMQ because these process are running at another computer.


I can't use recursive property for file endpoint because I've a lot of 
business rules to verify depends on complete file path, etc.


I'm using Apache Camel 2.10.2 ans ActiveMQ 5.7.

Following the routes:



shutdownRoute="Defer" autoStartup="true">
uri="file:/mnt/serverA/1?charset=iso-8859-1&readLock=changed&readLockCheckInterval=200&readLockMinLength=0&delay=500&maxMessagesPerPoll=100&sortBy=${file:modified}" 
/>


java.text.ParseException
java.lang.ArrayIndexOutOfBoundsException

true




${file:name} contains '_FILE1.txt'



${file:name} contains '_FILE2.txt'






shutdownRoute="Defer" autoStartup="true">
uri="file:/serverA/2?charset=iso-8859-1&readLock=changed&readLockCheckInterval=200&readLockMinLength=0&delay=500&maxMessagesPerPoll=100&sortBy=${file:modified}" 
/>


java.text.ParseException
java.lang.ArrayIndexOutOfBoundsException

true




${file:name} contains '_FILE1.txt'



${file:name} contains '_FILE2.txt'






shutdownRoute="Defer" autoStartup="true">
uri="file:/serverB/1?charset=iso-8859-1&readLock=changed&readLockCheckInterval=200&readLockMinLength=0&delay=500&maxMessagesPerPoll=100&sortBy=${file:modified}" 
/>


java.text.ParseException
java.lang.ArrayIndexOutOfBoundsException

true




${file:name} contains '_FILE1.txt'



${file:name} contains '_FILE2.txt'






shutdownRoute="Defer" autoStartup="true">
uri="seda:fe_FILE1?concurrentConsumers=10&waitForTaskToComplete=Never" 
/>


headerName="ALARM_TARGET">F1





shutdownRoute="Defer" autoStartup="true">
uri="seda:fe_FILE2?concurrentConsumers=10&waitForTaskToComplete=Never" 
/>


headerName="ALARM_TARGET">F2





shutdownRoute="Defer" autoStartup="true">




${headers[ALARM_TARGET]} == "F1"
        






The ActiveMQ configuration is:


class="org.apache.activemq.ActiveMQConnectionFactory">




class="org.apache.activemq.pool.PooledConnectionFactory">






Thanks for all
Leandro Franchi


On 06-11-2012 21:45, Christian Müller wrote:

Which version do you use?
Hoe does your route looks like?

Sent from a mobile device
Am 06.11.2012 19:29 schrieb "Leandro Franchi" :


Hi,

I've a route to read files, convert the body to string and send to
ActiveMQ. It's ok, but somentimes, I've got these error:


06/11/2012 16:19:19.174 [Camel (mirCamel) thread #21 - file:/tmp] ERROR
org.apache.camel.processor.**FatalFallbackErrorHandler:55 - \--> New
exception on exchangeId: ID-alxredmircol01-51775-**1352225432241-0-14234
  org.apache.camel.**TypeConversionException: Error during type conversion
from type: org.apache.camel.component.**file.GenericFile to the required
type: byte[] with value GenericFile[/mnt/sox/HST/**20121030_174713_N.txt]
due java.lang.**IllegalArgumentException: reader must be specified
 at org.apache.camel.impl.**converter.**BaseTypeConverterRegistry.**
convertTo(**BaseTypeConverterRegistry.**java:126)
 at org.apache.camel.component.**jms.JmsBinding.**
createJmsMessageForType(**JmsBinding.java:534)
 at org.apache.camel.component.**jms.JmsBinding.**
createJmsMessage(JmsBinding.**java:464)
 at org.apache.camel.component.**jms.JmsBinding.makeJmsMessage(**
JmsBinding.java:285)
 at org.apache.camel.component.**jms.JmsProducer$2.**
createMessage(JmsProducer.**java:266)
 at org.apache.camel.component.**jms.JmsConfiguration$**
CamelJmsTemplate.**doSendToDestination(**JmsConfiguration.java:214)
 at org.apache.camel.component.**jms.JmsConfiguration$**
CamelJmsTemplate.access$100(**JmsConfiguration.java:157)
 at org.apache.camel.component.**jms.JmsConfiguration$**
CamelJmsTemplate$3.doInJms(**JmsConfiguration.java:191)
 at org.springframework.jms.core.**JmsTemplate.execute(**
JmsTemplate.java:466)
 at org.apache.camel.component.**jms.JmsConfiguration$**
CamelJmsTemplate.send(**JmsConfiguration.java:18

Re: [FTP2] Problems transversing directories when uploading files with SFTP (Camel 2.9.4)

2012-11-30 Thread Leandro Franchi
Ainda,

Do you have the correct permissions on the server?


Best Regards
Leandro Franchi


On Fri, Nov 30, 2012 at 11:50 AM, Aida  wrote:

> Hi,
>
> I have been having trouble trying to upload files using a sftp endpoint.
>
> The way I'm working to upload a file is using a ProducerTemplate (
> ProducerTemplate.send(endPointDefinition, data2write) where data2write is
> the Exchange with the data I want to upload ). This way works for me
> working
> with FTP servers and "ftp://***"; endpoints, but when trying to use a
> server
> that needs SFTP, the connection is made successfully, but there is a
> failure/exception when tries to access to the directory where the file
> should be uploaded.
>
> I have seen that the reason of this behaviour is that the name of the
> folder
> I want to use haven´t got the first character, so if the folder was
> "myFolder", it tries to  change the directory to "yFolder". The message I
> can retrieve from the received Exchange is "Cannot change directory to:
> yFolder". However, the endpoint is wellformed. I'm sure of this because I
> see it in the log trace (set at INFO level), example:
>
> 2012-11-30 12:33:35,414 INFO
> [org.apache.camel.component.file.remote.RemoteFileProducer] (Camel
> (processesCamelContext) thread #12 - JmsConsumer[App_JOBS_QUEUE_IN])
> Connected and logged in to:
> Endpoint[sftp://myftph...@xxx.xx.xxx.xx
> :22/myFolder?charset=ISO-8859-1&delay=2000&disconnect=true&fileName=myFileName.xml&initialDelay=0&password=**&separator=Auto]
> 2012-11-30 12:33:35,537 WARNING
> [org.apache.camel.component.file.remote.RemoteFileProducer] (Camel
> (processesCamelContext) thread #12 - JmsConsumer[App_JOBS_QUEUE_IN])
> Writing
> file failed with: Cannot change directory to: yFolder
>
> I don´t know if it could be a kind of "escape characters issue", but I put
> here the results of some tests:
>
> 1. Endpoint: sftp://myftph...@xxx.xx.xxx.xx:22/myFolder?charset= ...
>Result message: Cannot change directory to: yFolder
>
> 2. Endpoint:  sftp://myftph...@xxx.xx.xxx.xx:22/mmyFolder?charset= ...
>Result message: Cannot change directory to: myFolder   -> here the dir
> name is OK but it still fails (and strictly the endpoint it´s not correct)
>
> 3. Endpoint:  sftp://myftph...@xxx.xx.xxx.xx:22//myFolder?charset= ...
> Result message: Cannot change directory to: yFolder
>
>
> I have tried with two different separators (Auto and UNIX) when building
> the
> endpoint, but the result is the same.
>
> Looking into the FTP2 component documentation, I have found a way to make
> it
> work. This is using the stepwise option set to false. This way works, but
> what worries me is that (for security issues) not all the FTP servers allow
> this option.
>
> Additional Info:
> Apache Camel version: 2.9.4
> Camel processes running on Windows machine
> FTP where files are uploaded running on Linux machine, using SFTP
>
> Maybe I'm missing something. Any help would be appreciated.
>
> Thanks in advance.
>
>   Aida.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/FTP2-Problems-transversing-directories-when-uploading-files-with-SFTP-Camel-2-9-4-tp5723456.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Leandro Franchi*
http://www.frango10.com


Re: [FTP2] Problems transversing directories when uploading files with SFTP (Camel 2.9.4)

2012-12-03 Thread Leandro Franchi
I undestand...

I've got this message two times. First, when I didin't have permission and
the second when I didn't terminate the url with a slash.

I hope the best
Leandro Franchi




On Mon, Dec 3, 2012 at 6:32 AM, Aida  wrote:

> Hi Leandro,
>
> Yes, I have the correct permissions. As I said I'm able to login on the
> server, and with the stepwise option I have no problem in writing a file.
> The problem comes once camel has logged in the FTP and tries to access to a
> directory that it isn´t the one specified in the endpoint.
>
> Thanks.
>
>   Aida.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/FTP2-Problems-transversing-directories-when-uploading-files-with-SFTP-Camel-2-9-4-tp5723456p5723520.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Leandro Franchi*
http://www.frango10.com


Re: File do ActiveMQ

2012-12-14 Thread Leandro Franchi
Hi Christian,

You're right!

I was using Java Wrapper do start/stop the java program as a linux
service. Sometimes the wrapper starts two program instances, I don't
know why but on this time that error occurs because one instance read
and delete the file at the same time the another instance are reading
the file.

I'll have to understand why I've 2 instances running, and how to
prevent this situation.

Thanks so much Christian!


I hope the best
Leandro Franchi

On 12/11/12, Christian Müller  wrote:
> I think I found the issue:
>
> org.apache.camel.component.file.GenericFileConverter:
>
> 88   Reader reader = genericFileToReader(file, exchange);
> 89   // we dont want a reader back, so use the type converter registry to
> find a suitable converter
> 90   TypeConverter readerTc = registry.lookup(type, Reader.class);
> 91   if (readerTc != null) {
> 92   // use the reader based type converter
> 93   return readerTc.convertTo(type, exchange, reader);
> 94   }
>
> If you have a look into the "genericFileToReader()" method you can see that
> it returns null, if the file doesn't exist. In this case, in line 93 the
> type converter (IOConverter in this case) is called which will fail
>
> IOConverter:
> 259@Converter
> 260public static byte[] toByteArray(Reader reader, Exchange exchange)
> throws IOException {
> 261return toByteArray(IOHelper.buffered(reader), exchange);
> 262}
>
> IOHelper
> 116public static BufferedReader buffered(Reader reader) {
> 117ObjectHelper.notNull(reader, "reader");
> 118return (reader instanceof BufferedReader) ?
> (BufferedReader)reader : new BufferedReader(reader);
> 119}
>
> Is it possible the file doesn't exist anymore if Camel tries to read it?
>
> Best,
> Christian
>
> On Wed, Nov 7, 2012 at 11:15 AM, Leandro Franchi
> wrote:
>
>> switchFileFrontendCounterProce**ssor
>>
>


-- 
*Leandro Franchi*
http://www.frango10.com


SSH - BouncyCastle

2013-01-08 Thread Leandro Franchi
Hi,

I'm using apache camel 2.10.2 and getting the follow error when try to
use ssh component consumer.


java.lang.NoClassDefFoundError: org.bouncycastle.crypto.prng.VMPCRandomGenerator


The jdk version is: 1.7.0_05.


I've try to declare bouncycastle dependency on pom without success.

Thanks

--
Leandro Franchi
http://www.chickenten.com


Re: SSH - BouncyCastle

2013-01-09 Thread Leandro Franchi
I'm not using directly the BouncyCastle. It was imported by iText 
dependency. I excluded the dependency to fix the problem.


Thanks

Best Regards
Leandro Franchi


On 08-01-2013 21:20, Christian Müller wrote:

Which version of BouncyCastle?
What is your runtime?
Can you share the complete stack trace?

Sent from a mobile device
Am 08.01.2013 15:34 schrieb "Leandro Franchi" :


Hi,

I'm using apache camel 2.10.2 and getting the follow error when try to
use ssh component consumer.


java.lang.NoClassDefFoundError:
org.bouncycastle.crypto.prng.VMPCRandomGenerator


The jdk version is: 1.7.0_05.


I've try to declare bouncycastle dependency on pom without success.

Thanks

--
Leandro Franchi
http://www.chickenten.com





Re: SSH Authentication Faiiled

2013-01-11 Thread Leandro Franchi
Hi Scott,

thanks for reply!

I`ve tried without success... the same error...


Beste Regards
Leandro Franchi


On Fri, Jan 11, 2013 at 10:10 AM, Scott Cranton  wrote:

> Leandro,
>
> from memory, I'm thinking having the leading @ -- ssh://@host:port -- is
> causing you problems…
>
> try
>
> ssh://
> user01:My_pwd@10.54.139.52:6059?userFixedDelay=true&delay=5000&pollcommand=ls
>
> and see if that works better…
>
> Hope that helps,
> Scott
>
> On Jan 11, 2013, at 6:41 AM, Leandro Franchi 
> wrote:
>
> > Hi,
> >
> > I'm using ssh component to connect an server but some thing is wrong. I
> can
> > connect server using putty or ssh directly but I got authentication error
> > when using camel component.
> >
> > Camel 2.10.3, Jdk 7 on windows 7.
> >
> > My route:
> >
> >  > errorHandlerRef="myErrorHandler" autoStartup="true">
> >
> > 
> >
> > 
> >
> > 
> >
> > The password is correct!
> >
> > The error is:
> >
> > 11/01/2013 09:29:17.524 [main]  INFO
> > org.apache.camel.spring.SpringCamelContext:1434 - Apache Camel 2.10.2
> > (CamelContext: mirCamel) started in 1.109 seconds
> >
> > 11/01/2013 09:29:18.538 [NioProcessor-2]  INFO
> > org.apache.sshd.client.session.ClientSessionImpl:73 - Session created...
> >
> > 11/01/2013 09:29:18.554 [NioProcessor-2]  INFO
> > org.apache.sshd.client.session.ClientSessionImpl:386 - Server version
> > string: SSH-2.0-OpenSSH_4.3
> >
> > 11/01/2013 09:29:18.554 [NioProcessor-2]  INFO
> > org.apache.sshd.client.session.ClientSessionImpl:234 - Received
> > SSH_MSG_KEXINIT
> >
> > 11/01/2013 09:29:18.555 [NioProcessor-2]  INFO
> > org.apache.sshd.client.kex.DHG1:78 - Send SSH_MSG_KEXDH_INIT
> >
> > 11/01/2013 09:29:18.648 [NioProcessor-2]  INFO
> > org.apache.sshd.client.kex.DHG1:93 - Received SSH_MSG_KEXDH_REPLY
> >
> > 11/01/2013 09:29:18.648 [NioProcessor-2]  INFO
> > org.apache.sshd.client.session.ClientSessionImpl:707 - Send
> SSH_MSG_NEWKEYS
> >
> > 11/01/2013 09:29:18.648 [NioProcessor-2]  INFO
> > org.apache.sshd.client.session.ClientSessionImpl:254 - Received
> > SSH_MSG_NEWKEYS
> >
> > 11/01/2013 09:29:18.664 [NioProcessor-2]  INFO
> > org.apache.sshd.client.session.ClientSessionImpl:421 - Send
> > SSH_MSG_SERVICE_REQUEST for ssh-userauth
> >
> > 11/01/2013 09:29:18.835 [Camel (mirCamel) thread #1 - ssh://@
> > 10.59.159.12:4098]  INFO
> org.apache.sshd.client.auth.UserAuthPassword:43 -
> > Send SSH_MSG_USERAUTH_REQUEST for password
> >
> > 11/01/2013 09:29:18.867 [NioProcessor-2]  INFO
> > org.apache.sshd.client.auth.UserAuthPassword:59 - Received
> > SSH_MSG_USERAUTH_FAILURE
> >
> > 11/01/2013 09:29:18.867 [Camel (mirCamel) thread #1 - ssh://@
> > 10.59.159.12:4098]  WARN org.apache.camel.component.ssh.SshConsumer:136
> -
> > Consumer Consumer[ssh://@
> >
> 10.59.159.12:4098?delay=5000&password=**&pollCommand=ls&useFixedDelay=true&username=usr01
> ]
> > failed polling endpoint: Endpoint[ssh://@
> >
> 10.59.159.12:4098?delay=5000&password=**&pollCommand=ls&useFixedDelay=true&username=usr01
> ].
> > Will try again at next poll. Caused by:
> > [org.apache.camel.RuntimeCamelException - Failed to authenticate username
> > usr01]
> >
> > * org.apache.camel.RuntimeCamelException: Failed to authenticate username
> > usr01
> > *
> > at
> >
> org.apache.camel.component.ssh.SshEndpoint.sendExecCommand(SshEndpoint.java:123)
> >
> > at org.apache.camel.component.ssh.SshConsumer.poll(SshConsumer.java:34)
> >
> > at
> >
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)
> >
> > at
> >
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)
> >
> > at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> >
> > at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
> >
> > at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
> >
> > at
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(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)
> >
> >
> >
> > Thanks
> >
> > --
> > Leandro Franchi
> > http://www.frango10.com
>
>


-- 
*Leandro Franchi*
http://www.frango10.com


Re: Tokenize Group - Spring DSL

2012-06-06 Thread Leandro Franchi
Ok, It works! I've used
2.10-SNAPSHOT<https://repository.apache.org/content/repositories/snapshots/org/apache/camel/apache-camel/2.10-SNAPSHOT/>
...

tks

On Wed, Jun 6, 2012 at 10:49 AM, Claus Ibsen  wrote:

> Hi
>
> You need Camel 2.10
>
> On Wed, Jun 6, 2012 at 3:39 PM, Leandro Franchi
>  wrote:
> > Hi,
> >
> > I'm having an error when I'm using the folow Spring DSL:
> >
> >
> >  > errorHandlerRef="switchReaderErrorHandler">
> > 
> > 
> > 
> > ${file:ext} == 'txt'
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> >
> >
> > The stacktrace:
> >
> > Caused by: org.xml.sax.SAXParseException; lineNumber: 56; columnNumber:
> 43;
> > cvc-complex-type.3.2.2: Attribute 'group' is not allowed to appear in
> > element 'tokenize'.
> > at
> >
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
> > at
> >
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:453)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3232)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2709)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2051)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:761)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2715)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
> > at
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
> > at
> >
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
> > at
> >
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
> > at
> >
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
> > at
> >
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:237)
> > at
> >
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)
> > at
> >
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
> > at
> >
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
> > ... 20 more
> >
> >
> > I'm using Apache Camel 2.9.2 !!!
> >
> >
> > Best Regards
> >
> >
> > --
> > *Leandro Franchi*
> > http://www.frango10.com
>
>
>
> --
> Claus Ibsen
> -
> FuseSource
> Email: cib...@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
*Leandro Franchi*
http://www.frango10.com