Re: Camel-ftp component problem

2010-04-14 Thread Charles Moulliard
Hi

You are right. Those lines have been removed from config.properties of Karaf
but not from Servicemix version.

So remove them,

Kind regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Expert : ServiceMix, CXF, ActiveMq, Fuse, ESB, EAI, Spring, Struts, Wicket,
Jquery, JPA, Hibernate
Apache Camel Committer

***
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard


On Wed, Apr 14, 2010 at 10:42 AM, olamalam ilker.cikrikc...@aspone.co.ukwrote:


 Hi Charles,

 I'm using JDK 6 but I couldn't see those lines you mentioned in
 etc/config.properties
 I've updated that file and added javax.xml.bind... lines but this time I'm
 getting this exception at startup:
 ERROR: Error parsing system bundle export statement: ...
 org.apache.felix.karaf.version; version=1.4.0
 (java.lang.IllegalArgumentException: No paths specified in header: )
 java.lang.IllegalArgumentException: No paths specified in header:

 ps. When I try to install activemq-camel component by:
 osgi:install -s mvn:org.apache.activemq/activemq-camel/5.2.0

 I get another unresolved constraint exception for package javax.jms which
 is
 not included in etc/config.properties either.

 Sorry for bothering too much, best regards
 Ilker


 cmoulliard wrote:
 
  Which version of Java are you using (5 or 6) ? If you use JDK 6, those
  classes are provided by the jdk
 
  To allow the osgi server (felix) to load at the startup the
 javax.xml.bind
  classes, you must uncomment the following line under the file
  etc/config.properties
 
  # javax.xml.bind, \
  # javax.xml.bind.annotation, \
  # javax.xml.bind.annotation.adapters, \
  # javax.xml.bind.attachment, \
  # javax.xml.bind.helpers, \
  # javax.xml.bind.util, \
 
  Kind regards,
 
  Charles Moulliard
  Senior Enterprise Architect
  Apache Camel Committer
 
  *
  blog : http://cmoulliard.blogspot.com
  twitter : http://twitter.com/cmoulliard
  Linkedlin : http://www.linkedin.com/in/charlesmoulliard
 
  Apache Camel Group :
  http://www.linkedin.com/groups?home=gid=2447439trk=anet_ug_hm
 
 
  On Tue, Apr 13, 2010 at 5:29 PM, olamalam
  ilker.cikrikc...@aspone.co.ukwrote:
 
 
  Hello again Willem,
 
  I tried to install camel-ftp in Felix Karaf 1.4.0 too but it is
  requesting
  some libraries (for ex: javax.xml.bind) included in Java sdk. Should I
  also
  install those bundles too?
 
  Please note that I run this command:
  osgi:install -s mvn:org.apache.camel/camel-ftp/2.2.0
 
  Thanks
 
 
  willem.jiang wrote:
  
   Can you also try Felix Karaf 1.4.0 which is latest release version of
   ServiceMix kernel ?
   And using feature:install camel-ftp to install the bundle for
  camel-ftp.
  
   Willem
  
   olamalam wrote:
   Hi willem,
  
   I uninstalled camel-spring  camel-osgi and installed
  camel-spring-osgi.
   but I'm still getting the same exception.
  
  
  
   willem.jiang wrote:
   Hi,
  
   Please make sure you didn't install camel-spring-osgi and
  camel-spring
   bundle at the same time.
   We merged the camel-sping and camel-osgi bundle into
  camel-spring-osgi
   in Camel 2.2, so you just need to install camel-spring-osgi bundle
   instead of camel-spring and camel-osgi.
  
   Willem
  
   olamalam wrote:
   Hi to all,
  
   I'm trying to develop a hello world bundle for serviceMix kernel
  (1.1)
   which
   uses camel-ftp component.
   My aim is to run this route:
   from(file://../data?noop=true).to(ftp://test@
  127.0.0.1:21/?password=test);
   Although this route runs without problem in a stand alone
  application,
   when
   i deploy it in serviceMix kernel
   I get FailedToCreateRouteException due to No component found with
   scheme:
   ftp.
  
   To solve the problem what i did so far are:
   1- deployed camel-ftp 2.2 bundle to serviceMix.
   2- added camel-ftp package (org.apache.camel.component.file.remote)
  to
   import-packages.
   now when I run headers bundle# in serviceMix I can see this
  imported
   package.
  
   What else I can do?
   Thanks in advance
  
  
  
  
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Camel-ftp-component-problem-tp28218210p28231893.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 
 
 
 
  -
  Charles Moulliard
  SOA Architect
 
  My Blog : http://cmoulliard.blogspot.com/
 

 --
 View this message in context:
 http://old.nabble.com/Camel-ftp-component-problem-tp28218210p28239946.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




Re: Camel-ftp component problem

2010-04-14 Thread olamalam

OK, I'll remove those lines but should I install those features included in
JDK 6 (like javax.xml.bind or javax.jms) to karaf?
I think there is something wrong with it. 
Thanks


cmoulliard wrote:
 
 Hi
 
 You are right. Those lines have been removed from config.properties of
 Karaf
 but not from Servicemix version.
 
 So remove them,
 
 Kind regards,
 
 Charles Moulliard
 
 Senior Enterprise Architect (J2EE, .NET, SOA)
 Expert : ServiceMix, CXF, ActiveMq, Fuse, ESB, EAI, Spring, Struts,
 Wicket,
 Jquery, JPA, Hibernate
 Apache Camel Committer
 
 ***
 - Blog : http://cmoulliard.blogspot.com
 - Twitter : http://twitter.com/cmoulliard
 - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
 
 
 On Wed, Apr 14, 2010 at 10:42 AM, olamalam
 ilker.cikrikc...@aspone.co.ukwrote:
 

 Hi Charles,

 I'm using JDK 6 but I couldn't see those lines you mentioned in
 etc/config.properties
 I've updated that file and added javax.xml.bind... lines but this time
 I'm
 getting this exception at startup:
 ERROR: Error parsing system bundle export statement: ...
 org.apache.felix.karaf.version; version=1.4.0
 (java.lang.IllegalArgumentException: No paths specified in header: )
 java.lang.IllegalArgumentException: No paths specified in header:

 ps. When I try to install activemq-camel component by:
 osgi:install -s mvn:org.apache.activemq/activemq-camel/5.2.0

 I get another unresolved constraint exception for package javax.jms which
 is
 not included in etc/config.properties either.

 Sorry for bothering too much, best regards
 Ilker


 cmoulliard wrote:
 
  Which version of Java are you using (5 or 6) ? If you use JDK 6, those
  classes are provided by the jdk
 
  To allow the osgi server (felix) to load at the startup the
 javax.xml.bind
  classes, you must uncomment the following line under the file
  etc/config.properties
 
  # javax.xml.bind, \
  # javax.xml.bind.annotation, \
  # javax.xml.bind.annotation.adapters, \
  # javax.xml.bind.attachment, \
  # javax.xml.bind.helpers, \
  # javax.xml.bind.util, \
 
  Kind regards,
 
  Charles Moulliard
  Senior Enterprise Architect
  Apache Camel Committer
 
  *
  blog : http://cmoulliard.blogspot.com
  twitter : http://twitter.com/cmoulliard
  Linkedlin : http://www.linkedin.com/in/charlesmoulliard
 
  Apache Camel Group :
  http://www.linkedin.com/groups?home=gid=2447439trk=anet_ug_hm
 
 
  On Tue, Apr 13, 2010 at 5:29 PM, olamalam
  ilker.cikrikc...@aspone.co.ukwrote:
 
 
  Hello again Willem,
 
  I tried to install camel-ftp in Felix Karaf 1.4.0 too but it is
  requesting
  some libraries (for ex: javax.xml.bind) included in Java sdk. Should I
  also
  install those bundles too?
 
  Please note that I run this command:
  osgi:install -s mvn:org.apache.camel/camel-ftp/2.2.0
 
  Thanks
 
 
  willem.jiang wrote:
  
   Can you also try Felix Karaf 1.4.0 which is latest release version
 of
   ServiceMix kernel ?
   And using feature:install camel-ftp to install the bundle for
  camel-ftp.
  
   Willem
  
   olamalam wrote:
   Hi willem,
  
   I uninstalled camel-spring  camel-osgi and installed
  camel-spring-osgi.
   but I'm still getting the same exception.
  
  
  
   willem.jiang wrote:
   Hi,
  
   Please make sure you didn't install camel-spring-osgi and
  camel-spring
   bundle at the same time.
   We merged the camel-sping and camel-osgi bundle into
  camel-spring-osgi
   in Camel 2.2, so you just need to install camel-spring-osgi bundle
   instead of camel-spring and camel-osgi.
  
   Willem
  
   olamalam wrote:
   Hi to all,
  
   I'm trying to develop a hello world bundle for serviceMix kernel
  (1.1)
   which
   uses camel-ftp component.
   My aim is to run this route:
   from(file://../data?noop=true).to(ftp://test@
  127.0.0.1:21/?password=test);
   Although this route runs without problem in a stand alone
  application,
   when
   i deploy it in serviceMix kernel
   I get FailedToCreateRouteException due to No component found
 with
   scheme:
   ftp.
  
   To solve the problem what i did so far are:
   1- deployed camel-ftp 2.2 bundle to serviceMix.
   2- added camel-ftp package
 (org.apache.camel.component.file.remote)
  to
   import-packages.
   now when I run headers bundle# in serviceMix I can see this
  imported
   package.
  
   What else I can do?
   Thanks in advance
  
  
  
  
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Camel-ftp-component-problem-tp28218210p28231893.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 
 
 
 
  -
  Charles Moulliard
  SOA Architect
 
  My Blog : http://cmoulliard.blogspot.com/
 

 --
 View this message in context:
 http://old.nabble.com/Camel-ftp-component-problem-tp28218210p28239946.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


 
 
 -
 Charles Moulliard
 SOA Architect
 
 My Blog : http://cmoulliard.blogspot.com/  
 

-- 
View this message in 

Re: Camel-ftp component problem

2010-04-14 Thread Willem Jiang
You don't need to install the bundle for javax.xml.bind if it's included 
in the system packages. Even you installed the bundle, OSGi platform 
will resolve it from the system packages first.


Willem

olamalam wrote:

OK, I'll remove those lines but should I install those features included in
JDK 6 (like javax.xml.bind or javax.jms) to karaf?
I think there is something wrong with it. 
Thanks



cmoulliard wrote:

Hi

You are right. Those lines have been removed from config.properties of
Karaf
but not from Servicemix version.

So remove them,

Kind regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Expert : ServiceMix, CXF, ActiveMq, Fuse, ESB, EAI, Spring, Struts,
Wicket,
Jquery, JPA, Hibernate
Apache Camel Committer

***
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard


On Wed, Apr 14, 2010 at 10:42 AM, olamalam
ilker.cikrikc...@aspone.co.ukwrote:


Hi Charles,

I'm using JDK 6 but I couldn't see those lines you mentioned in
etc/config.properties
I've updated that file and added javax.xml.bind... lines but this time
I'm
getting this exception at startup:
ERROR: Error parsing system bundle export statement: ...
org.apache.felix.karaf.version; version=1.4.0
(java.lang.IllegalArgumentException: No paths specified in header: )
java.lang.IllegalArgumentException: No paths specified in header:

ps. When I try to install activemq-camel component by:
osgi:install -s mvn:org.apache.activemq/activemq-camel/5.2.0

I get another unresolved constraint exception for package javax.jms which
is
not included in etc/config.properties either.

Sorry for bothering too much, best regards
Ilker


cmoulliard wrote:

Which version of Java are you using (5 or 6) ? If you use JDK 6, those
classes are provided by the jdk

To allow the osgi server (felix) to load at the startup the

javax.xml.bind

classes, you must uncomment the following line under the file
etc/config.properties

# javax.xml.bind, \
# javax.xml.bind.annotation, \
# javax.xml.bind.annotation.adapters, \
# javax.xml.bind.attachment, \
# javax.xml.bind.helpers, \
# javax.xml.bind.util, \

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=gid=2447439trk=anet_ug_hm


On Tue, Apr 13, 2010 at 5:29 PM, olamalam
ilker.cikrikc...@aspone.co.ukwrote:


Hello again Willem,

I tried to install camel-ftp in Felix Karaf 1.4.0 too but it is
requesting
some libraries (for ex: javax.xml.bind) included in Java sdk. Should I
also
install those bundles too?

Please note that I run this command:

osgi:install -s mvn:org.apache.camel/camel-ftp/2.2.0

Thanks


willem.jiang wrote:

Can you also try Felix Karaf 1.4.0 which is latest release version

of

ServiceMix kernel ?
And using feature:install camel-ftp to install the bundle for

camel-ftp.

Willem

olamalam wrote:

Hi willem,

I uninstalled camel-spring  camel-osgi and installed

camel-spring-osgi.

but I'm still getting the same exception.



willem.jiang wrote:

Hi,

Please make sure you didn't install camel-spring-osgi and

camel-spring

bundle at the same time.
We merged the camel-sping and camel-osgi bundle into

camel-spring-osgi

in Camel 2.2, so you just need to install camel-spring-osgi bundle
instead of camel-spring and camel-osgi.

Willem

olamalam wrote:

Hi to all,

I'm trying to develop a hello world bundle for serviceMix kernel

(1.1)

which
uses camel-ftp component.
My aim is to run this route:
from(file://../data?noop=true).to(ftp://test@

127.0.0.1:21/?password=test);

Although this route runs without problem in a stand alone

application,

when
i deploy it in serviceMix kernel
I get FailedToCreateRouteException due to No component found

with

scheme:
ftp.

To solve the problem what i did so far are:
1- deployed camel-ftp 2.2 bundle to serviceMix.
2- added camel-ftp package

(org.apache.camel.component.file.remote)

to

import-packages.
now when I run headers bundle# in serviceMix I can see this

imported

package.

What else I can do?
Thanks in advance






--
View this message in context:


http://old.nabble.com/Camel-ftp-component-problem-tp28218210p28231893.html

Sent from the Camel - Users mailing list archive at Nabble.com.




-
Charles Moulliard
SOA Architect

My Blog : http://cmoulliard.blogspot.com/


--
View this message in context:
http://old.nabble.com/Camel-ftp-component-problem-tp28218210p28239946.html
Sent from the Camel - Users mailing list archive at Nabble.com.




-
Charles Moulliard
SOA Architect

My Blog : http://cmoulliard.blogspot.com/  







Re: extended Camel Mail Component not working

2010-04-14 Thread Willem Jiang

Ah, bad mock-javamail, it's good that you finally find out the issue.
I think we need to update the wiki page of camel-mail to avoid wasting 
other user time to trace this kind of error.


Willem

Srini97 wrote:

Hi,

I Identified the problem.  the culprit is mock-javamail which I am using it
for testing purpose. so I have removed it and it works fine.  


Thanks
Sri




Srini97 wrote:

no luck :( , I went and saw the sender code on the producer

sender.send(new MimeMessagePreparator() {
public void prepare(MimeMessage mimeMessage) throws Exception
{
endpoint.getBinding().populateMailMessage(endpoint,
mimeMessage, exchange);
  
System.out.println(endpoint.content type

resolver---+endpoint.getContentTypeResolver());
System.out.println(Content
Type---+mimeMessage.getContentType());
System.out.println(Sending
message+MailUtils.dumpMessage(mimeMessage));

if (LOG.isDebugEnabled()) {

LOG.debug(Sending MimeMessage:  +
MailUtils.dumpMessage(mimeMessage));
}
}
});

I am able to get all the information what I am providing , mail is not
delivered to the receipient.

Sri


 


willem.jiang wrote:
Did you extend the camel mail component? if so, please add some break 
point in the MailProducer, and debug to see if the sender is called send 
the mail.


Willem

Srini97 wrote:

I have added three options in the configuration and when I tried with
Unit
testcases it is working properly 
when I put some debug messages I can all the messages but the message is

not
delivered to mail that mentioned in the URI. 



By the way I have changed the URI to my custom URI to identify my
component
by autodiscovery so say for smtp , my own uri is
opta-smtp://x...@host?xbody=sadfsdf, 



I have created opta-smtp file under
/src/main/resources/META-INF/services/org/apache/camel/component/opta-smtp

done the same for  all the protocols.


Thanks
Sri


willem.jiang wrote:

Hi

What kind of default nature of camel component is changed in your 
component?


Can you step into producer.process(exchange) to see what is happened ?


Willem

Srini97 wrote:

Hello,

I have a requirement for adding new options for the message , so I
have
created new options like x_body , x_createAttachement , Based on these
two
options I have to over ride the default nature of camel component. So
I
have
extended MailBinding and over ridden some methods. and written test
cases
for that . test cases are working fine. But when I tried to send the
messages  using the following code it is not sending any messages but
calling producer send() method.


CamelContext context=new DefaultCamelContext();

OptaMailComponent component=new OptaMailComponent(context);

OptaMailEndpoint endpoint =
(OptaMailEndpoint)component.createEndpoint(opta-smtp://optaukexch01.optasportsdata.com?to=srinivasa.dontiboy...@optasports.comfrom=srinivasa.dontiboy...@optasports.comconsumer.delay=6000subject=Hurry%20got%20the%20subject);


OptaMailEndpoint endpoint =
(OptaMailEndpoint)component.createEndpoint(opta-smtp://optaukexch01.optasportsdata.com?to=srinivasa.dontiboy...@optasports.comfrom=srinivasa.dontiboy...@optasports.comconsumer.delay=6000subject=samplesubject);

Exchange exchange = endpoint.createExchange();

// set the in message payload (=body) with the name parameter
exchange.getIn().setBody(sample body);


 // now we want to send the exchange to this endpoint and we
then
need a producer
 // for this, so we create and start the producer.
  Producer producer = endpoint.createProducer();
  producer.start();
 
 
 
 // process the exchange will send the exchange to the file

component, that will process
 // the exchange and yes write the payload to the given
filename
 producer.process(exchange);

 // stop the producer, we want to be nice and cleanup
 producer.stop();


   2) Even after creating source as jar and included in other
component
where previously it used the default mail component is also not
sending
any
mail message to sender.

Thanks in advance for the help me! 














:jumping::jumping::jumping::jumping::jumping::jumping::jumping::jumping::jumping::handshake::handshake::handshake::jumping::jumping::jumping:




Re: Camel-ftp component problem

2010-04-14 Thread cmoulliard

I have been able to make a test using apache felix karaf 2.0

Here is the list of the bundles deployed :

ka...@root list
START LEVEL 100
   ID   State Blueprint  SpringLevel  Name
[   0] [Active ] [] [   ] [0] System Bundle (2.0.4)
[   1] [Active ] [] [   ] [5] OPS4J Pax Url - mvn:
(1.1.2)
[   2] [Active ] [] [   ] [5] OPS4J Pax Url - wrap:
(1.1.2)
[   3] [Active ] [] [   ] [8] OPS4J Pax Logging -
API (1.4)
[   4] [Active ] [] [   ] [8] OPS4J Pax Logging -
Service (1.4)
[   5] [Active ] [] [   ] [   10] Apache Felix
Configuration Admin Service (1.2.4)
[   6] [Active ] [] [   ] [   10] Apache Felix
Preferences Service (1.0.4)
[   7] [Active ] [] [   ] [   11] Apache Felix File
Install (2.0.8)
[   8] [Active ] [Created ] [   ] [   20] Apache Geronimo
Blueprint Bundle (1.0.0)
[   9] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Features Management (1.4.0)
[  10] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Spring Deployer (1.4.0)
[  11] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Features Deployer (1.4.0)
[  12] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell Various Commands (1.4.0)
[  13] [Active ] [] [   ] [   30] Apache Mina SSHD ::
Core (0.3.0)
[  14] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell Development Commands (1.4.0)
[  15] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Features Core (1.4.0)
[  16] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell ConfigAdmin Commands (1.4.0)
[  17] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell PackageAdmin Commands (1.4.0)
[  18] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Blueprint Deployer (1.4.0)
[  19] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
JAAS Modules (1.4.0)
[  20] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Admin Management (1.4.0)
[  21] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell OSGi Commands (1.4.0)
[  22] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
JAAS Config (1.4.0)
[  23] [Active ] [] [   ] [   30]
org.osgi.impl.bundle.jmx (4.2.0.200907080519)
[  24] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Features Command (1.4.0)
[  25] [Active ] [] [   ] [   30] Apache Felix Gogo
Shell Runtime (0.2.2)
[  26] [Active ] [] [   ] [   30] Apache MINA Core
(2.0.0.RC1)
[  27] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell Console (1.4.0)
[  28] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Admin Core (1.4.0)
[  29] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Management (1.4.0)
[  30] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Admin Command (1.4.0)
[  31] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell Log Commands (1.4.0)
[  32] [Active ] [Created ] [   ] [   30] Apache Felix Karaf ::
Shell SSH (1.4.0)
[  33] [Active ] [] [   ] [   60] Apache ServiceMix
Bundles: aopalliance-1.0 (1.0.0.3)
[  34] [Active ] [] [   ] [   60] Spring Core
(2.5.6.SEC01)
[  35] [Active ] [] [   ] [   60] Spring Beans
(2.5.6.SEC01)
[  36] [Active ] [] [   ] [   60] Spring AOP
(2.5.6.SEC01)
[  37] [Active ] [] [   ] [   60] Spring Context
(2.5.6.SEC01)
[  38] [Active ] [] [   ] [   60] Spring Context Support
(2.5.6.SEC01)
[  39] [Active ] [] [   ] [   60] Apache ServiceMix
Bundles: cglib-2.1_3 (2.1.0.3_4)
[  40] [Active ] [] [   ] [   60] spring-osgi-io (1.2.0)
[  41] [Active ] [] [   ] [   60] spring-osgi-core
(1.2.0)
[  42] [Active ] [] [   ] [   60] spring-osgi-extender
(1.2.0)
[  43] [Active ] [] [   ] [   60] spring-osgi-annotation
(1.2.0)
[  44] [Active ] [] [   ] [   60]
geronimo-servlet_2.5_spec (1.1.2)
[  45] [Active ] [] [   ] [   60] Apache ServiceMix
Bundles: jetty-6.1.22 (6.1.22.1)
[  46] [Active ] [] [   ] [   60] OPS4J Pax Web - API
(0.7.2)
[  47] [Active ] [] [   ] [   60] OPS4J Pax Web -
Service SPI (0.7.2)
[  48] [Active ] [] [   ] [   60] OPS4J Pax Web -
Runtime (0.7.2)
[  49] [Active ] [] [   ] [   60] OPS4J Pax Web - Jetty
(0.7.2)
[  50] [Active ] [] [   ] [   60] OPS4J Pax Web - Jsp
Support (0.7.2)
[  51] [Active ] [] 

[CXF] Inbound endpoint with PAYLOAD dataformat

2010-04-14 Thread Olivier Roger

Hello Camel,

I am experimenting a strange issue when using CXF inbound endpoint with
PAYLOAD dataformat option (no problem in MESSAGE mode).

First I declare a CXF endpoint:

cxf:cxfEndpoint id=F1 address=http://localhost:10101/F1;
serviceClass=CXFUseCase !-- Interface with one method --
cxf:dataBinding
bean 
class=org.apache.cxf.xmlbeans.XmlBeansDataBinding /
/cxf:dataBinding
cxf:properties
entry key=dataFormat value=PAYLOAD/
/cxf:properties
/cxf:cxfEndpoint

Then, in my route I use it:

route
from uri=cxf:bean:F1 /
bean ref=inspect /

When I debug in the inspect bean the Exchange object does not contain any
value.
However, setting a response value works correctly.

public void process(final Exchange exchange){
String msg = exchange.getIn().getBody(String.class);
System.out.println(msg); // is null
exchange.getOut().setBody(createResponse(), PersonDocument.class); //
is ok
}

I read the documentation on the website but found it quite not clear. Am I
doing something wrong?

Thanks in advance,

Olivier
-- 
View this message in context: 
http://old.nabble.com/-CXF--Inbound-endpoint-with-PAYLOAD-dataformat-tp28240799p28240799.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: [CXF] Inbound endpoint with PAYLOAD dataformat

2010-04-14 Thread Willem Jiang

Hi,

When you use exchange.getIn().getBody(String.class) to get the message,
camel will try to find a right converter to turn PayLoad (the actual 
object stored in the message body) into String.

It looks like there is not a converter to do this job, so you got null.
If I remember right, a StringConverter should be use in this case, I 
don't know why it doesn't work for you.
If you use exchange.getIn().getBody() , you should get the PayLoad 
object. You can find more detail example here[1]


[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java

Willem

Olivier Roger wrote:

Hello Camel,

I am experimenting a strange issue when using CXF inbound endpoint with
PAYLOAD dataformat option (no problem in MESSAGE mode).

First I declare a CXF endpoint:

cxf:cxfEndpoint id=F1 address=http://localhost:10101/F1;
serviceClass=CXFUseCase !-- Interface with one method --
cxf:dataBinding
bean class=org.apache.cxf.xmlbeans.XmlBeansDataBinding 
/
/cxf:dataBinding
cxf:properties
entry key=dataFormat value=PAYLOAD/
/cxf:properties
/cxf:cxfEndpoint

Then, in my route I use it:

route
from uri=cxf:bean:F1 /
bean ref=inspect /

When I debug in the inspect bean the Exchange object does not contain any
value.
However, setting a response value works correctly.

public void process(final Exchange exchange){
String msg = exchange.getIn().getBody(String.class);
System.out.println(msg); // is null
exchange.getOut().setBody(createResponse(), PersonDocument.class); //
is ok
}

I read the documentation on the website but found it quite not clear. Am I
doing something wrong?

Thanks in advance,

Olivier




Re: [CXF] Inbound endpoint with PAYLOAD dataformat

2010-04-14 Thread Willem Jiang
I just ran a simple test by printing out the result of 
exchange.getIn().getBody(String.class) in the 
CxfConsumerPayloadTest.java on the trunk (Camel 2.3-SNAPSHOT), I can see 
the message body was printed out rightly.


Which version of Camel are you using ?

Willem

Willem Jiang wrote:

Hi,

When you use exchange.getIn().getBody(String.class) to get the message,
camel will try to find a right converter to turn PayLoad (the actual 
object stored in the message body) into String.

It looks like there is not a converter to do this job, so you got null.
If I remember right, a StringConverter should be use in this case, I 
don't know why it doesn't work for you.
If you use exchange.getIn().getBody() , you should get the PayLoad 
object. You can find more detail example here[1]


[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java 



Willem

Olivier Roger wrote:

Hello Camel,

I am experimenting a strange issue when using CXF inbound endpoint with
PAYLOAD dataformat option (no problem in MESSAGE mode).

First I declare a CXF endpoint:

cxf:cxfEndpoint id=F1 address=http://localhost:10101/F1;
serviceClass=CXFUseCase !-- Interface with one method --
cxf:dataBinding
bean class=org.apache.cxf.xmlbeans.XmlBeansDataBinding /
/cxf:dataBinding
cxf:properties
entry key=dataFormat value=PAYLOAD/
/cxf:properties
/cxf:cxfEndpoint

Then, in my route I use it:

route
from uri=cxf:bean:F1 /
bean ref=inspect /

When I debug in the inspect bean the Exchange object does not contain any
value.
However, setting a response value works correctly.

public void process(final Exchange exchange){
String msg = exchange.getIn().getBody(String.class);
System.out.println(msg); // is null
exchange.getOut().setBody(createResponse(), 
PersonDocument.class); //

is ok
}

I read the documentation on the website but found it quite not clear. 
Am I

doing something wrong?

Thanks in advance,

Olivier







Quick general question I need answered for a Design meeting I have today regarding WebService retry's please

2010-04-14 Thread Mick Knutson
I need a little ammo for a meeting I have today and I can research further
if this is easily possible with Camel... but:

I have several dozen JAXB webservices that I can call for my application.
Several are VERY slow, and some will fail and require retry
attempts. Usually 3-4 attempts in order to succeed (I know, but this is
another dept that owns the services).

I am wondering 2 things:

1. Can camel help me to make my Spring JAXB webservices asynchronous? I know
I can use CXF.

2. Can I set Retry Attempts on those services?



---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring  Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://www.baselogic.com
Blog: http://www.baselogic.com/blog/
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---


Re: [CXF] Inbound endpoint with PAYLOAD dataformat

2010-04-14 Thread Olivier Roger

Thanks for you input willem,

I am using the lastest Fuse ESB distribution which includes Camel 2.2.
I will try to launch the example you indicated and what is different from my
implementation.

If I cannot figure it out I will provide a sample project.

Olivier


willem.jiang wrote:
 
 I just ran a simple test by printing out the result of 
 exchange.getIn().getBody(String.class) in the 
 CxfConsumerPayloadTest.java on the trunk (Camel 2.3-SNAPSHOT), I can see 
 the message body was printed out rightly.
 
 Which version of Camel are you using ?
 
 Willem
 
 Willem Jiang wrote:
 Hi,
 
 When you use exchange.getIn().getBody(String.class) to get the message,
 camel will try to find a right converter to turn PayLoad (the actual 
 object stored in the message body) into String.
 It looks like there is not a converter to do this job, so you got null.
 If I remember right, a StringConverter should be use in this case, I 
 don't know why it doesn't work for you.
 If you use exchange.getIn().getBody() , you should get the PayLoad 
 object. You can find more detail example here[1]
 
 [1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java
  
 
 
 Willem
 
 Olivier Roger wrote:
 Hello Camel,

 I am experimenting a strange issue when using CXF inbound endpoint with
 PAYLOAD dataformat option (no problem in MESSAGE mode).

 First I declare a CXF endpoint:

 cxf:cxfEndpoint id=F1 address=http://localhost:10101/F1;
 serviceClass=CXFUseCase !-- Interface with one method --
 cxf:dataBinding
 bean class=org.apache.cxf.xmlbeans.XmlBeansDataBinding /
 /cxf:dataBinding
 cxf:properties
 entry key=dataFormat value=PAYLOAD/
 /cxf:properties
 /cxf:cxfEndpoint

 Then, in my route I use it:

 route
 from uri=cxf:bean:F1 /
 bean ref=inspect /

 When I debug in the inspect bean the Exchange object does not contain
 any
 value.
 However, setting a response value works correctly.

 public void process(final Exchange exchange){
 String msg = exchange.getIn().getBody(String.class);
 System.out.println(msg); // is null
 exchange.getOut().setBody(createResponse(), 
 PersonDocument.class); //
 is ok
 }

 I read the documentation on the website but found it quite not clear. 
 Am I
 doing something wrong?

 Thanks in advance,

 Olivier
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/-CXF--Inbound-endpoint-with-PAYLOAD-dataformat-tp28240799p28241427.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Quick general question I need answered for a Design meeting I have today regarding WebService retry's please

2010-04-14 Thread Claus Ibsen
On Wed, Apr 14, 2010 at 1:24 PM, Mick Knutson mknut...@baselogic.com wrote:
 I need a little ammo for a meeting I have today and I can research further
 if this is easily possible with Camel... but:

 I have several dozen JAXB webservices that I can call for my application.
 Several are VERY slow, and some will fail and require retry
 attempts. Usually 3-4 attempts in order to succeed (I know, but this is
 another dept that owns the services).

 I am wondering 2 things:

 1. Can camel help me to make my Spring JAXB webservices asynchronous? I know
 I can use CXF.


Yeah Camel have a client API which allows you to invoke any Camel
endpoint in async manner.
http://camel.apache.org/async

ProducerTemplate have many asyncXXX method which makes that easy to do.


 2. Can I set Retry Attempts on those services?


You can let it be a Camel route and then use Camel Error Handler to
setup retry policy.

from(direct:myAsyncStuff).to(cxf:);
Where cxf:xxx is the endpoint to that faulty webservice.

Then you have a Camel route which the Camel error handler can use for
redelivery.







 ---
 Thank You…

 Mick Knutson, President

 BASE Logic, Inc.
 Enterprise Architecture, Design, Mentoring  Agile Consulting
 p. (866) BLiNC-411: (254-6241-1)
 f. (415) 685-4233

 Website: http://www.baselogic.com
 Blog: http://www.baselogic.com/blog/
 Linked IN: http://linkedin.com/in/mickknutson
 Twitter: http://twitter.com/mickknutson
 Vacation Rental: http://tahoe.baselogic.com
 ---




-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: Quick general question I need answered for a Design meeting I have today regarding WebService retry's please

2010-04-14 Thread Mick Knutson
Awesome! Thanks for the quick reply. Now I have what I need for my meeting,
and more ammo to add Camel to this project.

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring  Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://www.baselogic.com
Blog: http://www.baselogic.com/blog/
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Wed, Apr 14, 2010 at 7:36 AM, Claus Ibsen claus.ib...@gmail.com wrote:

 Then you have a Camel route which the Camel error handler can use for
 redelivery.



Re: [CXF] Inbound endpoint with PAYLOAD dataformat

2010-04-14 Thread Olivier Roger

I did not specify it but here is the message I try to send:

soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:esb=http://www.bsb.com/incubator/esb;
   soapenv:Header/
   soapenv:Body
  esb:GetPerson
 socialId528404-885-24/socialId
  /esb:GetPerson
   /soapenv:Body
/soapenv:Envelope

I am not sure it helps though...


Olivier Roger wrote:
 
 I remove the xmlbeans usage to use an interface using String as input and
 output parameter types.
 
 package com.bsb.incubator.esb.fuse4;
 
 import javax.jws.WebParam;
 import javax.jws.WebService;
 
 @WebService(targetNamespace = http://www.bsb.com/incubator/esb;)
 public interface IWS {
   String GetPerson(@WebParam(name=socialId) String socialId) ;
 }
 
 Using the debugger it seems that the exchange variable does not contains
 the request payload.
 Here is content:
 
 Header: []
 Body: [[esb:GetPerson: null]]
 
  http://old.nabble.com/file/p28241790/%255BPAYLOAD%255DCxfPayload.png 
 
 I provided the sample of my project.
 
 
 Olivier Roger wrote:
 
 Thanks for you input willem,
 
 I am using the lastest Fuse ESB distribution which includes Camel 2.2.
 I will try to launch the example you indicated and what is different from
 my implementation.
 
 If I cannot figure it out I will provide a sample project.
 
  http://old.nabble.com/file/p28241790/CXFPayload.zip CXFPayload.zip 
 
 Olivier
 
 
 willem.jiang wrote:
 
 I just ran a simple test by printing out the result of 
 exchange.getIn().getBody(String.class) in the 
 CxfConsumerPayloadTest.java on the trunk (Camel 2.3-SNAPSHOT), I can see 
 the message body was printed out rightly.
 
 Which version of Camel are you using ?
 
 Willem
 
 Willem Jiang wrote:
 Hi,
 
 When you use exchange.getIn().getBody(String.class) to get the message,
 camel will try to find a right converter to turn PayLoad (the actual 
 object stored in the message body) into String.
 It looks like there is not a converter to do this job, so you got null.
 If I remember right, a StringConverter should be use in this case, I 
 don't know why it doesn't work for you.
 If you use exchange.getIn().getBody() , you should get the PayLoad 
 object. You can find more detail example here[1]
 
 [1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java
  
 
 
 Willem
 
 Olivier Roger wrote:
 Hello Camel,

 I am experimenting a strange issue when using CXF inbound endpoint
 with
 PAYLOAD dataformat option (no problem in MESSAGE mode).

 First I declare a CXF endpoint:

 cxf:cxfEndpoint id=F1 address=http://localhost:10101/F1;
 serviceClass=CXFUseCase !-- Interface with one method --
 cxf:dataBinding
 bean class=org.apache.cxf.xmlbeans.XmlBeansDataBinding
 /
 /cxf:dataBinding
 cxf:properties
 entry key=dataFormat value=PAYLOAD/
 /cxf:properties
 /cxf:cxfEndpoint

 Then, in my route I use it:

 route
 from uri=cxf:bean:F1 /
 bean ref=inspect /

 When I debug in the inspect bean the Exchange object does not contain
 any
 value.
 However, setting a response value works correctly.

 public void process(final Exchange exchange){
 String msg = exchange.getIn().getBody(String.class);
 System.out.println(msg); // is null
 exchange.getOut().setBody(createResponse(), 
 PersonDocument.class); //
 is ok
 }

 I read the documentation on the website but found it quite not clear. 
 Am I
 doing something wrong?

 Thanks in advance,

 Olivier
 
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/-CXF--Inbound-endpoint-with-PAYLOAD-dataformat-tp28240799p28241806.html
Sent from the Camel - Users mailing list archive at Nabble.com.



camel-sftp component problem

2010-04-14 Thread hisham

i get error, while  trying to route files to sftp component. here is my code

route id=sftpsenderRoute
 from uri=file:d:/test /
to uri=sftp://ca...@localhost?password=test/
/route

the error:
Caused by: java.lang.NoSuchMethodError:
com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
at
org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
at
org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
at
org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
at
org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
at
org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
at 
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
... 20 more

-- 
View this message in context: 
http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242146.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel-ftp component problem

2010-04-14 Thread olamalam

Hi Charles,

Yes, this solves my problem. Thank you very much.
I could install those bundles you've listed by running these commands:

features:install spring
features:install spring-dm
features:install http
features:install war
features:addUrl mvn:org.apache.camel.karaf/apache-camel/2.2.0/xml/features
features:install camel
features:install camel-ftp

As I mentioned in one of my previous posts, I couldn't run this command
before:
features:install camel-ftp 
I get: 
ERROR CommandLineExecutionFailed:
org.apache.geronimo.gshell.command.CommandException: java.lang.Exception: No
feature named 'camel-ftp' with version '0.0.0' available 

Which is why I didn't run:
features:addUrl mvn:org.apache.camel.karaf/apache-camel/2.2.0/xml/features

Now my bundle is running without problem.

Best regards
Ilker


cmoulliard wrote:
 
 I have been able to make a test using apache felix karaf 1.4.0 and Camel
 2.2
 
 Here is the list of the bundles deployed :
 
 ka...@root list
 START LEVEL 100
ID   State Blueprint  SpringLevel  Name
 [   0] [Active ] [] [   ] [0] System Bundle
 (2.0.4)
 [   1] [Active ] [] [   ] [5] OPS4J Pax Url - mvn:
 (1.1.2)
 [   2] [Active ] [] [   ] [5] OPS4J Pax Url -
 wrap: (1.1.2)
 [   3] [Active ] [] [   ] [8] OPS4J Pax Logging -
 API (1.4)
 [   4] [Active ] [] [   ] [8] OPS4J Pax Logging -
 Service (1.4)
 [   5] [Active ] [] [   ] [   10] Apache Felix
 Configuration Admin Service (1.2.4)
 [   6] [Active ] [] [   ] [   10] Apache Felix
 Preferences Service (1.0.4)
 [   7] [Active ] [] [   ] [   11] Apache Felix File
 Install (2.0.8)
 [   8] [Active ] [Created ] [   ] [   20] Apache Geronimo
 Blueprint Bundle (1.0.0)
 [   9] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Features Management (1.4.0)
 [  10] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Spring Deployer (1.4.0)
 [  11] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Features Deployer (1.4.0)
 [  12] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell Various Commands (1.4.0)
 [  13] [Active ] [] [   ] [   30] Apache Mina SSHD ::
 Core (0.3.0)
 [  14] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell Development Commands (1.4.0)
 [  15] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Features Core (1.4.0)
 [  16] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell ConfigAdmin Commands (1.4.0)
 [  17] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell PackageAdmin Commands (1.4.0)
 [  18] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Blueprint Deployer (1.4.0)
 [  19] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: JAAS Modules (1.4.0)
 [  20] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Admin Management (1.4.0)
 [  21] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell OSGi Commands (1.4.0)
 [  22] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: JAAS Config (1.4.0)
 [  23] [Active ] [] [   ] [   30]
 org.osgi.impl.bundle.jmx (4.2.0.200907080519)
 [  24] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Features Command (1.4.0)
 [  25] [Active ] [] [   ] [   30] Apache Felix Gogo
 Shell Runtime (0.2.2)
 [  26] [Active ] [] [   ] [   30] Apache MINA Core
 (2.0.0.RC1)
 [  27] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell Console (1.4.0)
 [  28] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Admin Core (1.4.0)
 [  29] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Management (1.4.0)
 [  30] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Admin Command (1.4.0)
 [  31] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell Log Commands (1.4.0)
 [  32] [Active ] [Created ] [   ] [   30] Apache Felix Karaf
 :: Shell SSH (1.4.0)
 [  33] [Active ] [] [   ] [   60] Apache ServiceMix
 Bundles: aopalliance-1.0 (1.0.0.3)
 [  34] [Active ] [] [   ] [   60] Spring Core
 (2.5.6.SEC01)
 [  35] [Active ] [] [   ] [   60] Spring Beans
 (2.5.6.SEC01)
 [  36] [Active ] [] [   ] [   60] Spring AOP
 (2.5.6.SEC01)
 [  37] [Active ] [] [   ] [   60] Spring Context
 (2.5.6.SEC01)
 [  38] [Active ] [] [   ] [   60] Spring Context
 Support (2.5.6.SEC01)
 [  39] [Active ] [] [   ] [   60] Apache ServiceMix
 Bundles: cglib-2.1_3 (2.1.0.3_4)
 [  40] [Active ] [] [   ] [   

JMS Message Acknowledgement Persistence in Camel

2010-04-14 Thread lekkie

I have this scenario where I 'd like to keep a message in the queue until the
flow in my route has returned.

See explanation below:

route
from uri=jms:${queue}/
to uri=nmr:Webservice/
/route

I'd like to finish processing to uri=nmr:Webservice/ - which means the
message is successfully sent to nmr:Webservice - before an ack is sent to my
message broker (jms:${queue}).

What acknowledgement mode will ensure an ack is only sent after camel
application returns from the to uri=nmr:Webservice/ call?

In the case of an exception, I believe an ack will not be sent to the
broker. Is my assumption correct?


kr.
-- 
View this message in context: 
http://old.nabble.com/JMS-Message-Acknowledgement---Persistence-in-Camel-tp28242166p28242166.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: camel-sftp component problem

2010-04-14 Thread Claus Ibsen
Hi

Do you have the right classes on the classpath?

Here is the maven dependency list which can help you to see if you got
all the required jars

[INFO] [dependency:list]
[INFO]
[INFO] The following files have been resolved:
[INFO]aopalliance:aopalliance:jar:1.0:test
[INFO]com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
[INFO]commons-logging:commons-logging:jar:1.1.1:test
[INFO]commons-logging:commons-logging-api:jar:1.1:compile
[INFO]commons-net:commons-net:jar:2.0:compile
[INFO]javax.activation:activation:jar:1.1:compile
[INFO]javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]jsch:jsch:jar:0.1.40:compile
[INFO]junit:junit:jar:4.4:test
[INFO]log4j:log4j:jar:1.2.14:test
[INFO]org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
[INFO]org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
[INFO]org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
[INFO]org.apache.ftpserver:ftplet-api:jar:1.0.3:test
[INFO]org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
[INFO]org.apache.mina:mina-core:jar:2.0.0-M6:test
[INFO]org.fusesource.commonman:commons-management:jar:1.0:compile
[INFO]org.slf4j:slf4j-api:jar:1.5.10:test
[INFO]org.slf4j:slf4j-log4j12:jar:1.5.10:test
[INFO]org.springframework:spring-aop:jar:2.5.6:test
[INFO]org.springframework:spring-beans:jar:2.5.6:test
[INFO]org.springframework:spring-context:jar:2.5.6:test
[INFO]org.springframework:spring-core:jar:2.5.6:test
[INFO]org.springframework:spring-tx:jar:2.5.6:test


On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com wrote:

 i get error, while  trying to route files to sftp component. here is my code

 route id=sftpsenderRoute
         from uri=file:d:/test /
        to uri=sftp://ca...@localhost?password=test/
 /route

 the error:
 Caused by: java.lang.NoSuchMethodError:
 com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
        at
 org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
        at
 org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
        at
 org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
        at 
 org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
        at
 org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
        at 
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
        at
 org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
        at
 org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
        ... 20 more

 --
 View this message in context: 
 http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242146.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: JMS Message Acknowledgement Persistence in Camel

2010-04-14 Thread Claus Ibsen
You can use transactions - ack mode TRANSACTED

And then you need to setup a TX manager.

Chapter 9 in the Camel in Action book. (and find examples in the
source code for the book)
Or check the Transactional Client EIP pattern at Camel wiki.



On Wed, Apr 14, 2010 at 2:50 PM, lekkie lekkie.ay...@gmail.com wrote:

 I have this scenario where I 'd like to keep a message in the queue until the
 flow in my route has returned.

 See explanation below:

 route
    from uri=jms:${queue}/
    to uri=nmr:Webservice/
 /route

 I'd like to finish processing to uri=nmr:Webservice/ - which means the
 message is successfully sent to nmr:Webservice - before an ack is sent to my
 message broker (jms:${queue}).

 What acknowledgement mode will ensure an ack is only sent after camel
 application returns from the to uri=nmr:Webservice/ call?

 In the case of an exception, I believe an ack will not be sent to the
 broker. Is my assumption correct?


 kr.
 --
 View this message in context: 
 http://old.nabble.com/JMS-Message-Acknowledgement---Persistence-in-Camel-tp28242166p28242166.html
 Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: [CXF] Inbound endpoint with PAYLOAD dataformat

2010-04-14 Thread Willem Jiang
It's right. If you take a look at the PayLoad[1] toString method, you 
will find it has header and body two parts. The content is right.

And [esb:GetPerson: null]] is the GetPerson element to String's value.

[1] 
https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java


Willem


Olivier Roger wrote:

I remove the xmlbeans usage to use an interface using String as input and
output parameter types.

package com.bsb.incubator.esb.fuse4;

import javax.jws.WebParam;
import javax.jws.WebService;

@WebService(targetNamespace = http://www.bsb.com/incubator/esb;)
public interface IWS {
String GetPerson(@WebParam(name=socialId) String socialId) ;
}

Using the debugger it seems that the exchange variable does not contains the
request payload.
Here is content:

Header: []
Body: [[esb:GetPerson: null]]

http://old.nabble.com/file/p28241790/%255BPAYLOAD%255DCxfPayload.png 


I provided the sample of my project.


Olivier Roger wrote:

Thanks for you input willem,

I am using the lastest Fuse ESB distribution which includes Camel 2.2.
I will try to launch the example you indicated and what is different from
my implementation.

If I cannot figure it out I will provide a sample project.

 http://old.nabble.com/file/p28241790/CXFPayload.zip CXFPayload.zip 


Olivier


willem.jiang wrote:
I just ran a simple test by printing out the result of 
exchange.getIn().getBody(String.class) in the 
CxfConsumerPayloadTest.java on the trunk (Camel 2.3-SNAPSHOT), I can see 
the message body was printed out rightly.


Which version of Camel are you using ?

Willem

Willem Jiang wrote:

Hi,

When you use exchange.getIn().getBody(String.class) to get the message,
camel will try to find a right converter to turn PayLoad (the actual 
object stored in the message body) into String.

It looks like there is not a converter to do this job, so you got null.
If I remember right, a StringConverter should be use in this case, I 
don't know why it doesn't work for you.
If you use exchange.getIn().getBody() , you should get the PayLoad 
object. You can find more detail example here[1]


[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java 



Willem

Olivier Roger wrote:

Hello Camel,

I am experimenting a strange issue when using CXF inbound endpoint with
PAYLOAD dataformat option (no problem in MESSAGE mode).

First I declare a CXF endpoint:

cxf:cxfEndpoint id=F1 address=http://localhost:10101/F1;
serviceClass=CXFUseCase !-- Interface with one method --
cxf:dataBinding
bean class=org.apache.cxf.xmlbeans.XmlBeansDataBinding
/
/cxf:dataBinding
cxf:properties
entry key=dataFormat value=PAYLOAD/
/cxf:properties
/cxf:cxfEndpoint

Then, in my route I use it:

route
from uri=cxf:bean:F1 /
bean ref=inspect /

When I debug in the inspect bean the Exchange object does not contain
any
value.
However, setting a response value works correctly.

public void process(final Exchange exchange){
String msg = exchange.getIn().getBody(String.class);
System.out.println(msg); // is null
exchange.getOut().setBody(createResponse(), 
PersonDocument.class); //

is ok
}

I read the documentation on the website but found it quite not clear. 
Am I

doing something wrong?

Thanks in advance,

Olivier













Re: camel-sftp component problem

2010-04-14 Thread hisham

Thanks for the quick reply. im using fuse servicemix 4.2 and camel-ftp
feature already installed, so i think all dependency should be resolved.

 

Claus Ibsen-2 wrote:
 
 Hi
 
 Do you have the right classes on the classpath?
 
 Here is the maven dependency list which can help you to see if you got
 all the required jars
 
 [INFO] [dependency:list]
 [INFO]
 [INFO] The following files have been resolved:
 [INFO]aopalliance:aopalliance:jar:1.0:test
 [INFO]com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
 [INFO]commons-logging:commons-logging:jar:1.1.1:test
 [INFO]commons-logging:commons-logging-api:jar:1.1:compile
 [INFO]commons-net:commons-net:jar:2.0:compile
 [INFO]javax.activation:activation:jar:1.1:compile
 [INFO]javax.xml.bind:jaxb-api:jar:2.1:compile
 [INFO]javax.xml.stream:stax-api:jar:1.0-2:compile
 [INFO]jsch:jsch:jar:0.1.40:compile
 [INFO]junit:junit:jar:4.4:test
 [INFO]log4j:log4j:jar:1.2.14:test
 [INFO]org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
 [INFO]org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
 [INFO]org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
 [INFO]org.apache.ftpserver:ftplet-api:jar:1.0.3:test
 [INFO]org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
 [INFO]org.apache.mina:mina-core:jar:2.0.0-M6:test
 [INFO]org.fusesource.commonman:commons-management:jar:1.0:compile
 [INFO]org.slf4j:slf4j-api:jar:1.5.10:test
 [INFO]org.slf4j:slf4j-log4j12:jar:1.5.10:test
 [INFO]org.springframework:spring-aop:jar:2.5.6:test
 [INFO]org.springframework:spring-beans:jar:2.5.6:test
 [INFO]org.springframework:spring-context:jar:2.5.6:test
 [INFO]org.springframework:spring-core:jar:2.5.6:test
 [INFO]org.springframework:spring-tx:jar:2.5.6:test
 
 
 On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com wrote:

 i get error, while  trying to route files to sftp component. here is my
 code

 route id=sftpsenderRoute
         from uri=file:d:/test /
        to uri=sftp://ca...@localhost?password=test/
 /route

 the error:
 Caused by: java.lang.NoSuchMethodError:
 com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
        at
 org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
        at
 org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
        at
 org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
        at
 org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
        at
 org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
        at
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
        at
 org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
        at
 org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
        ... 20 more

 --
 View this message in context:
 http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242146.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


 
 
 
 -- 
 Claus Ibsen
 Apache Camel Committer
 
 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus
 
 

-- 
View this message in context: 
http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242296.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: camel-sftp component problem

2010-04-14 Thread Claus Ibsen
On Wed, Apr 14, 2010 at 3:14 PM, hisham hishber...@hotmail.com wrote:

 Thanks for the quick reply. im using fuse servicemix 4.2 and camel-ftp
 feature already installed, so i think all dependency should be resolved.


Could you check out which version of the jsch jar the OSGi container
list as installed.




 Claus Ibsen-2 wrote:

 Hi

 Do you have the right classes on the classpath?

 Here is the maven dependency list which can help you to see if you got
 all the required jars

 [INFO] [dependency:list]
 [INFO]
 [INFO] The following files have been resolved:
 [INFO]    aopalliance:aopalliance:jar:1.0:test
 [INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
 [INFO]    commons-logging:commons-logging:jar:1.1.1:test
 [INFO]    commons-logging:commons-logging-api:jar:1.1:compile
 [INFO]    commons-net:commons-net:jar:2.0:compile
 [INFO]    javax.activation:activation:jar:1.1:compile
 [INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
 [INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
 [INFO]    jsch:jsch:jar:0.1.40:compile
 [INFO]    junit:junit:jar:4.4:test
 [INFO]    log4j:log4j:jar:1.2.14:test
 [INFO]    org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
 [INFO]    org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
 [INFO]    org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
 [INFO]    org.apache.ftpserver:ftplet-api:jar:1.0.3:test
 [INFO]    org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
 [INFO]    org.apache.mina:mina-core:jar:2.0.0-M6:test
 [INFO]    org.fusesource.commonman:commons-management:jar:1.0:compile
 [INFO]    org.slf4j:slf4j-api:jar:1.5.10:test
 [INFO]    org.slf4j:slf4j-log4j12:jar:1.5.10:test
 [INFO]    org.springframework:spring-aop:jar:2.5.6:test
 [INFO]    org.springframework:spring-beans:jar:2.5.6:test
 [INFO]    org.springframework:spring-context:jar:2.5.6:test
 [INFO]    org.springframework:spring-core:jar:2.5.6:test
 [INFO]    org.springframework:spring-tx:jar:2.5.6:test


 On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com wrote:

 i get error, while  trying to route files to sftp component. here is my
 code

 route id=sftpsenderRoute
         from uri=file:d:/test /
        to uri=sftp://ca...@localhost?password=test/
 /route

 the error:
 Caused by: java.lang.NoSuchMethodError:
 com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
        at
 org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
        at
 org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
        at
 org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
        at
 org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
        at
 org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
        at
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
        at
 org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
        at
 org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
        ... 20 more

 --
 View this message in context:
 http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242146.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



 --
 View this message in context: 
 http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242296.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: [CXF] Inbound endpoint with PAYLOAD dataformat

2010-04-14 Thread Olivier Roger

It seems that the code has changed since Camel 2.2.0:
https://svn.apache.org/repos/asf/camel/tags/camel-2.2.0/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java

I used the XMLConverter and it finds the value like this

new org.apache.camel.converter.jaxp.XmlConverter().toString(body.get(0))

esb:GetPerson xmlns:esb=http://www.bsb.com/incubator/esb;
 socialId528404-885-24/socialId
/esb:GetPerson

Do I need to use a bean to extract the value in the Inbound endpoint then or
is there a simpler way ?
I cannot upgrade to Camel 2.3 since we are bound to the Fuse ESB release
cycle.


willem.jiang wrote:
 
 It's right. If you take a look at the PayLoad[1] toString method, you 
 will find it has header and body two parts. The content is right.
 And [esb:GetPerson: null]] is the GetPerson element to String's value.
 
 [1] 
 https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java
 
 Willem
 
 
 Olivier Roger wrote:
 I remove the xmlbeans usage to use an interface using String as input and
 output parameter types.
 
 package com.bsb.incubator.esb.fuse4;
 
 import javax.jws.WebParam;
 import javax.jws.WebService;
 
 @WebService(targetNamespace = http://www.bsb.com/incubator/esb;)
 public interface IWS {
  String GetPerson(@WebParam(name=socialId) String socialId) ;
 }
 
 Using the debugger it seems that the exchange variable does not contains
 the
 request payload.
 Here is content:
 
 Header: []
 Body: [[esb:GetPerson: null]]
 
 http://old.nabble.com/file/p28241790/%255BPAYLOAD%255DCxfPayload.png 
 
 I provided the sample of my project.
 
 
 Olivier Roger wrote:
 Thanks for you input willem,

 I am using the lastest Fuse ESB distribution which includes Camel 2.2.
 I will try to launch the example you indicated and what is different
 from
 my implementation.

 If I cannot figure it out I will provide a sample project.

  http://old.nabble.com/file/p28241790/CXFPayload.zip CXFPayload.zip 

 Olivier


 willem.jiang wrote:
 I just ran a simple test by printing out the result of 
 exchange.getIn().getBody(String.class) in the 
 CxfConsumerPayloadTest.java on the trunk (Camel 2.3-SNAPSHOT), I can
 see 
 the message body was printed out rightly.

 Which version of Camel are you using ?

 Willem

 Willem Jiang wrote:
 Hi,

 When you use exchange.getIn().getBody(String.class) to get the
 message,
 camel will try to find a right converter to turn PayLoad (the actual 
 object stored in the message body) into String.
 It looks like there is not a converter to do this job, so you got
 null.
 If I remember right, a StringConverter should be use in this case, I 
 don't know why it doesn't work for you.
 If you use exchange.getIn().getBody() , you should get the PayLoad 
 object. You can find more detail example here[1]

 [1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java
  


 Willem

 Olivier Roger wrote:
 Hello Camel,

 I am experimenting a strange issue when using CXF inbound endpoint
 with
 PAYLOAD dataformat option (no problem in MESSAGE mode).

 First I declare a CXF endpoint:

 cxf:cxfEndpoint id=F1 address=http://localhost:10101/F1;
 serviceClass=CXFUseCase !-- Interface with one method --
 cxf:dataBinding
 bean class=org.apache.cxf.xmlbeans.XmlBeansDataBinding
 /
 /cxf:dataBinding
 cxf:properties
 entry key=dataFormat value=PAYLOAD/
 /cxf:properties
 /cxf:cxfEndpoint

 Then, in my route I use it:

 route
 from uri=cxf:bean:F1 /
 bean ref=inspect /

 When I debug in the inspect bean the Exchange object does not contain
 any
 value.
 However, setting a response value works correctly.

 public void process(final Exchange exchange){
 String msg = exchange.getIn().getBody(String.class);
 System.out.println(msg); // is null
 exchange.getOut().setBody(createResponse(), 
 PersonDocument.class); //
 is ok
 }

 I read the documentation on the website but found it quite not clear. 
 Am I
 doing something wrong?

 Thanks in advance,

 Olivier




 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/-CXF--Inbound-endpoint-with-PAYLOAD-dataformat-tp28240799p28242893.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: camel-sftp component problem

2010-04-14 Thread Willem Jiang
I just checked the version of jsch of ServieMix 4.2.0-fuse, the jsch 
version is loader than camel-ftp. We need to install a new version 
bundle for it.


[ 190] [Active ] [] [   ] [   60] Apache ServiceMix 
Bundles: jsch-0.1.31 (0.1.31.3)


Willem


Claus Ibsen wrote:

On Wed, Apr 14, 2010 at 3:14 PM, hisham hishber...@hotmail.com wrote:

Thanks for the quick reply. im using fuse servicemix 4.2 and camel-ftp
feature already installed, so i think all dependency should be resolved.



Could you check out which version of the jsch jar the OSGi container
list as installed.




Claus Ibsen-2 wrote:

Hi

Do you have the right classes on the classpath?

Here is the maven dependency list which can help you to see if you got
all the required jars

[INFO] [dependency:list]
[INFO]
[INFO] The following files have been resolved:
[INFO]aopalliance:aopalliance:jar:1.0:test
[INFO]com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
[INFO]commons-logging:commons-logging:jar:1.1.1:test
[INFO]commons-logging:commons-logging-api:jar:1.1:compile
[INFO]commons-net:commons-net:jar:2.0:compile
[INFO]javax.activation:activation:jar:1.1:compile
[INFO]javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]jsch:jsch:jar:0.1.40:compile
[INFO]junit:junit:jar:4.4:test
[INFO]log4j:log4j:jar:1.2.14:test
[INFO]org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
[INFO]org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
[INFO]org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
[INFO]org.apache.ftpserver:ftplet-api:jar:1.0.3:test
[INFO]org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
[INFO]org.apache.mina:mina-core:jar:2.0.0-M6:test
[INFO]org.fusesource.commonman:commons-management:jar:1.0:compile
[INFO]org.slf4j:slf4j-api:jar:1.5.10:test
[INFO]org.slf4j:slf4j-log4j12:jar:1.5.10:test
[INFO]org.springframework:spring-aop:jar:2.5.6:test
[INFO]org.springframework:spring-beans:jar:2.5.6:test
[INFO]org.springframework:spring-context:jar:2.5.6:test
[INFO]org.springframework:spring-core:jar:2.5.6:test
[INFO]org.springframework:spring-tx:jar:2.5.6:test


On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com wrote:

i get error, while  trying to route files to sftp component. here is my
code

route id=sftpsenderRoute
from uri=file:d:/test /
   to uri=sftp://ca...@localhost?password=test/
/route

the error:
Caused by: java.lang.NoSuchMethodError:
com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
   at
org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
   at
org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
   at
org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
   at
org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
   at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
   at
org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
   at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
   at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
   at
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
   at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
   at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
   at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
   at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
   at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
   at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
   at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
   at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
   at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
   ... 20 more

--
View this message in context:
http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242146.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus



--
View this message in context: 
http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242296.html
Sent from the Camel - Users mailing list archive at Nabble.com.










Re: camel-sftp component problem

2010-04-14 Thread hisham

Hi Claus,

i found the following  in the features XML file
servicemix4.2_installDIR\system\org\apache\camel\karaf\apache-camel\2.2.0-fuse-01-00\apache-camel-2.2.0-fuse-01-00-features.xml

feature name='camel-ftp' version='2.2.0-fuse-01-00'
bundlemvn:commons-net/commons-net/2.0/bundle
feature version='2.2.0-fuse-01-00'camel-core/feature
   
bundlemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/0.1.31_3/bundle
bundlemvn:org.apache.camel/camel-ftp/2.2.0-fuse-01-00/bundle
 /feature

according to this, i thing the installed version is  0.1.31_3



Claus Ibsen-2 wrote:
 
 On Wed, Apr 14, 2010 at 3:14 PM, hisham hishber...@hotmail.com wrote:

 Thanks for the quick reply. im using fuse servicemix 4.2 and camel-ftp
 feature already installed, so i think all dependency should be resolved.

 
 Could you check out which version of the jsch jar the OSGi container
 list as installed.
 
 


 Claus Ibsen-2 wrote:

 Hi

 Do you have the right classes on the classpath?

 Here is the maven dependency list which can help you to see if you got
 all the required jars

 [INFO] [dependency:list]
 [INFO]
 [INFO] The following files have been resolved:
 [INFO]    aopalliance:aopalliance:jar:1.0:test
 [INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
 [INFO]    commons-logging:commons-logging:jar:1.1.1:test
 [INFO]    commons-logging:commons-logging-api:jar:1.1:compile
 [INFO]    commons-net:commons-net:jar:2.0:compile
 [INFO]    javax.activation:activation:jar:1.1:compile
 [INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
 [INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
 [INFO]    jsch:jsch:jar:0.1.40:compile
 [INFO]    junit:junit:jar:4.4:test
 [INFO]    log4j:log4j:jar:1.2.14:test
 [INFO]    org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
 [INFO]    org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
 [INFO]    org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
 [INFO]    org.apache.ftpserver:ftplet-api:jar:1.0.3:test
 [INFO]    org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
 [INFO]    org.apache.mina:mina-core:jar:2.0.0-M6:test
 [INFO]    org.fusesource.commonman:commons-management:jar:1.0:compile
 [INFO]    org.slf4j:slf4j-api:jar:1.5.10:test
 [INFO]    org.slf4j:slf4j-log4j12:jar:1.5.10:test
 [INFO]    org.springframework:spring-aop:jar:2.5.6:test
 [INFO]    org.springframework:spring-beans:jar:2.5.6:test
 [INFO]    org.springframework:spring-context:jar:2.5.6:test
 [INFO]    org.springframework:spring-core:jar:2.5.6:test
 [INFO]    org.springframework:spring-tx:jar:2.5.6:test


 On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com wrote:

 i get error, while  trying to route files to sftp component. here is my
 code

 route id=sftpsenderRoute
         from uri=file:d:/test /
        to uri=sftp://ca...@localhost?password=test/
 /route

 the error:
 Caused by: java.lang.NoSuchMethodError:
 com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
        at
 org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
        at
 org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
        at
 org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
        at
 org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
        at
 org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
        at
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
        at
 org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
        at
 org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
        ... 20 more

 --
 View this message in context:
 http://old.nabble.com/camel-sftp-component-problem-tp28242146p28242146.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





 --
 Claus Ibsen
 

Re: camel-sftp component problem

2010-04-14 Thread Claus Ibsen
Hi

Yeah Willem Jiang noticed that as well. He will create a new OSGi
bundle of JSCH 0.1.40 which is the version we need to use.

The 0.1.31 is just too old.


On Wed, Apr 14, 2010 at 4:05 PM, hisham hishber...@hotmail.com wrote:

 Hi Claus,

 i found the following  in the features XML file
 servicemix4.2_installDIR\system\org\apache\camel\karaf\apache-camel\2.2.0-fuse-01-00\apache-camel-2.2.0-fuse-01-00-features.xml

 feature name='camel-ftp' version='2.2.0-fuse-01-00'
    bundlemvn:commons-net/commons-net/2.0/bundle
    feature version='2.2.0-fuse-01-00'camel-core/feature

 bundlemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/0.1.31_3/bundle
    bundlemvn:org.apache.camel/camel-ftp/2.2.0-fuse-01-00/bundle
  /feature

 according to this, i thing the installed version is  0.1.31_3



 Claus Ibsen-2 wrote:

 On Wed, Apr 14, 2010 at 3:14 PM, hisham hishber...@hotmail.com wrote:

 Thanks for the quick reply. im using fuse servicemix 4.2 and camel-ftp
 feature already installed, so i think all dependency should be resolved.


 Could you check out which version of the jsch jar the OSGi container
 list as installed.




 Claus Ibsen-2 wrote:

 Hi

 Do you have the right classes on the classpath?

 Here is the maven dependency list which can help you to see if you got
 all the required jars

 [INFO] [dependency:list]
 [INFO]
 [INFO] The following files have been resolved:
 [INFO]    aopalliance:aopalliance:jar:1.0:test
 [INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
 [INFO]    commons-logging:commons-logging:jar:1.1.1:test
 [INFO]    commons-logging:commons-logging-api:jar:1.1:compile
 [INFO]    commons-net:commons-net:jar:2.0:compile
 [INFO]    javax.activation:activation:jar:1.1:compile
 [INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
 [INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
 [INFO]    jsch:jsch:jar:0.1.40:compile
 [INFO]    junit:junit:jar:4.4:test
 [INFO]    log4j:log4j:jar:1.2.14:test
 [INFO]    org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
 [INFO]    org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
 [INFO]    org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
 [INFO]    org.apache.ftpserver:ftplet-api:jar:1.0.3:test
 [INFO]    org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
 [INFO]    org.apache.mina:mina-core:jar:2.0.0-M6:test
 [INFO]    org.fusesource.commonman:commons-management:jar:1.0:compile
 [INFO]    org.slf4j:slf4j-api:jar:1.5.10:test
 [INFO]    org.slf4j:slf4j-log4j12:jar:1.5.10:test
 [INFO]    org.springframework:spring-aop:jar:2.5.6:test
 [INFO]    org.springframework:spring-beans:jar:2.5.6:test
 [INFO]    org.springframework:spring-context:jar:2.5.6:test
 [INFO]    org.springframework:spring-core:jar:2.5.6:test
 [INFO]    org.springframework:spring-tx:jar:2.5.6:test


 On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com wrote:

 i get error, while  trying to route files to sftp component. here is my
 code

 route id=sftpsenderRoute
         from uri=file:d:/test /
        to uri=sftp://ca...@localhost?password=test/
 /route

 the error:
 Caused by: java.lang.NoSuchMethodError:
 com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
        at
 org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
        at
 org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
        at
 org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
        at
 org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
        at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
        at
 org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
        at
 org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
        at
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
        at
 org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
        at
 org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
 org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
        at
 

Re: Deploying as web app with jetty endpoint

2010-04-14 Thread jfaath

That seems to finally work...providing I remove the Jersey Filter that is
used by the web console.  This effectively breaks the Camel web console, so
as of now it appears the two are incompatible.



willem.jiang wrote:
 
 Oh, you should not use the ContextLoaderLister to load the camel route.
 There is a contextConfigLocation parameter that you can pass to the 
 CamelHttpTransportServlet to load the camel route.
 You can find the example here
 https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-spring.xml
 
 Willem
 
 jfaath wrote:
 I played around with this by removing everything below the
 ContextLoaderListener listener.  I still get the same error.  As a rule,
 it
 seems that Tomcat always loads listeners before servlets.
 
 What exactly is the expected behavior of the bootstrap process in the
 servlet container?  What is the contextConfigLocation parameter supposed
 to
 do?
 
 Is there a sample of using this component in an actual servlet container?
 
 
 willem.jiang wrote:
 Hi,

 Can you remove the web console part and try again?
 Maybe there are some side effect of the web console configure.

 Willem

 jfaath wrote:
 So should I post a JIRA on this?  The servlet component doesn't seem to
 work
 in v2.2 when used in the web console.


 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Deploying-as-web-app-with-jetty-endpoint-tp28171746p28243271.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: camel-sftp component problem

2010-04-14 Thread Willem Jiang

Yes, I'm working on it now, and just submitted a patch[1] to ServiceMix.
I think you can create the bundle yourself by using the upper patch to a 
new bundle to use.


[1]https://issues.apache.org/activemq/browse/SMX4-517

Willem

Claus Ibsen wrote:

Hi

Yeah Willem Jiang noticed that as well. He will create a new OSGi
bundle of JSCH 0.1.40 which is the version we need to use.

The 0.1.31 is just too old.


On Wed, Apr 14, 2010 at 4:05 PM, hisham hishber...@hotmail.com wrote:

Hi Claus,

i found the following  in the features XML file
servicemix4.2_installDIR\system\org\apache\camel\karaf\apache-camel\2.2.0-fuse-01-00\apache-camel-2.2.0-fuse-01-00-features.xml

feature name='camel-ftp' version='2.2.0-fuse-01-00'
   bundlemvn:commons-net/commons-net/2.0/bundle
   feature version='2.2.0-fuse-01-00'camel-core/feature

bundlemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/0.1.31_3/bundle
   bundlemvn:org.apache.camel/camel-ftp/2.2.0-fuse-01-00/bundle
 /feature

according to this, i thing the installed version is  0.1.31_3



Claus Ibsen-2 wrote:

On Wed, Apr 14, 2010 at 3:14 PM, hisham hishber...@hotmail.com wrote:

Thanks for the quick reply. im using fuse servicemix 4.2 and camel-ftp
feature already installed, so i think all dependency should be resolved.


Could you check out which version of the jsch jar the OSGi container
list as installed.




Claus Ibsen-2 wrote:

Hi

Do you have the right classes on the classpath?

Here is the maven dependency list which can help you to see if you got
all the required jars

[INFO] [dependency:list]
[INFO]
[INFO] The following files have been resolved:
[INFO]aopalliance:aopalliance:jar:1.0:test
[INFO]com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
[INFO]commons-logging:commons-logging:jar:1.1.1:test
[INFO]commons-logging:commons-logging-api:jar:1.1:compile
[INFO]commons-net:commons-net:jar:2.0:compile
[INFO]javax.activation:activation:jar:1.1:compile
[INFO]javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]jsch:jsch:jar:0.1.40:compile
[INFO]junit:junit:jar:4.4:test
[INFO]log4j:log4j:jar:1.2.14:test
[INFO]org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
[INFO]org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
[INFO]org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
[INFO]org.apache.ftpserver:ftplet-api:jar:1.0.3:test
[INFO]org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
[INFO]org.apache.mina:mina-core:jar:2.0.0-M6:test
[INFO]org.fusesource.commonman:commons-management:jar:1.0:compile
[INFO]org.slf4j:slf4j-api:jar:1.5.10:test
[INFO]org.slf4j:slf4j-log4j12:jar:1.5.10:test
[INFO]org.springframework:spring-aop:jar:2.5.6:test
[INFO]org.springframework:spring-beans:jar:2.5.6:test
[INFO]org.springframework:spring-context:jar:2.5.6:test
[INFO]org.springframework:spring-core:jar:2.5.6:test
[INFO]org.springframework:spring-tx:jar:2.5.6:test


On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com wrote:

i get error, while  trying to route files to sftp component. here is my
code

route id=sftpsenderRoute
from uri=file:d:/test /
   to uri=sftp://ca...@localhost?password=test/
/route

the error:
Caused by: java.lang.NoSuchMethodError:
com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
   at
org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
   at
org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
   at
org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
   at
org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
   at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
   at
org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
   at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
   at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
   at
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
   at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
   at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
   at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
   at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
   at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
   at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
   at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
   at

Re: camel-sftp component problem

2010-04-14 Thread hisham

thanks guys,

i have downloaded the jsch-0.1.42.jar wraped it into OSGI bundle with
BND-tool. it works fine now 

thanks again,
Hisham


willem.jiang wrote:
 
 Yes, I'm working on it now, and just submitted a patch[1] to ServiceMix.
 I think you can create the bundle yourself by using the upper patch to a 
 new bundle to use.
 
 [1]https://issues.apache.org/activemq/browse/SMX4-517
 
 Willem
 
 Claus Ibsen wrote:
 Hi
 
 Yeah Willem Jiang noticed that as well. He will create a new OSGi
 bundle of JSCH 0.1.40 which is the version we need to use.
 
 The 0.1.31 is just too old.
 
 
 On Wed, Apr 14, 2010 at 4:05 PM, hisham hishber...@hotmail.com wrote:
 Hi Claus,

 i found the following  in the features XML file
 servicemix4.2_installDIR\system\org\apache\camel\karaf\apache-camel\2.2.0-fuse-01-00\apache-camel-2.2.0-fuse-01-00-features.xml

 feature name='camel-ftp' version='2.2.0-fuse-01-00'
bundlemvn:commons-net/commons-net/2.0/bundle
feature version='2.2.0-fuse-01-00'camel-core/feature

 bundlemvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/0.1.31_3/bundle
bundlemvn:org.apache.camel/camel-ftp/2.2.0-fuse-01-00/bundle
  /feature

 according to this, i thing the installed version is  0.1.31_3



 Claus Ibsen-2 wrote:
 On Wed, Apr 14, 2010 at 3:14 PM, hisham hishber...@hotmail.com wrote:
 Thanks for the quick reply. im using fuse servicemix 4.2 and camel-ftp
 feature already installed, so i think all dependency should be
 resolved.

 Could you check out which version of the jsch jar the OSGi container
 list as installed.



 Claus Ibsen-2 wrote:
 Hi

 Do you have the right classes on the classpath?

 Here is the maven dependency list which can help you to see if you
 got
 all the required jars

 [INFO] [dependency:list]
 [INFO]
 [INFO] The following files have been resolved:
 [INFO]aopalliance:aopalliance:jar:1.0:test
 [INFO]com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
 [INFO]commons-logging:commons-logging:jar:1.1.1:test
 [INFO]commons-logging:commons-logging-api:jar:1.1:compile
 [INFO]commons-net:commons-net:jar:2.0:compile
 [INFO]javax.activation:activation:jar:1.1:compile
 [INFO]javax.xml.bind:jaxb-api:jar:2.1:compile
 [INFO]javax.xml.stream:stax-api:jar:1.0-2:compile
 [INFO]jsch:jsch:jar:0.1.40:compile
 [INFO]junit:junit:jar:4.4:test
 [INFO]log4j:log4j:jar:1.2.14:test
 [INFO]org.apache.camel:camel-core:jar:2.3-SNAPSHOT:compile
 [INFO]org.apache.camel:camel-spring:jar:2.3-SNAPSHOT:test
 [INFO]org.apache.camel:camel-test:jar:2.3-SNAPSHOT:test
 [INFO]org.apache.ftpserver:ftplet-api:jar:1.0.3:test
 [INFO]org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
 [INFO]org.apache.mina:mina-core:jar:2.0.0-M6:test
 [INFO]org.fusesource.commonman:commons-management:jar:1.0:compile
 [INFO]org.slf4j:slf4j-api:jar:1.5.10:test
 [INFO]org.slf4j:slf4j-log4j12:jar:1.5.10:test
 [INFO]org.springframework:spring-aop:jar:2.5.6:test
 [INFO]org.springframework:spring-beans:jar:2.5.6:test
 [INFO]org.springframework:spring-context:jar:2.5.6:test
 [INFO]org.springframework:spring-core:jar:2.5.6:test
 [INFO]org.springframework:spring-tx:jar:2.5.6:test


 On Wed, Apr 14, 2010 at 2:48 PM, hisham hishber...@hotmail.com
 wrote:
 i get error, while  trying to route files to sftp component. here is
 my
 code

 route id=sftpsenderRoute
 from uri=file:d:/test /
to uri=sftp://ca...@localhost?password=test/
 /route

 the error:
 Caused by: java.lang.NoSuchMethodError:
 com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V
at
 org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:138)
at
 org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:82)
at
 org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary(RemoteFileProducer.java:171)
at
 org.apache.camel.component.file.remote.RemoteFileProducer.preWriteCheck(RemoteFileProducer.java:100)
at
 org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:75)
at
 org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:50)
at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
at
 org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
at
 org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
at
 org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
at
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
 org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
at
 org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
  

Re: JMS Message Acknowledgement Persistence in Camel

2010-04-14 Thread lekkie

Thanks for the insight.

I have gone ahead to implement the Transactional Client EIP pattern.

However, I noticed that my transaction is redelivered only 4 times. I used
JMSTransactionManager as my transaction manager and my redelivery properties
says maxredelivery is 6. Also, my timetolive is 24hrs, but my failed
transaction is retried just 4 times.

How do I modify the number of time it is redelivered?


See my config below:
bean id=redeliveryPolicy class=org.apache.activemq.RedeliveryPolicy
property name=initialRedeliveryDelay value=5000/
property name=maximumRedeliveries value=6/
property name=useCollisionAvoidance value=false/
property name=useExponentialBackOff value=false/
/bean

bean id=jmsConnectionFactory
class=org.apache.activemq.ActiveMQConnectionFactory
property name=alwaysSessionAsync value=false/
property name=alwaysSyncSend value=true/
property
name=brokerURLvalue${plusone-block-request-queue-url}/value/property
property name=clientID value=/
property name=closeTimeout value=15000/
property name=copyMessageOnSend value=true/
property name=disableTimeStampsByDefault value=false/
property name=dispatchAsync value=false/
property name=objectMessageSerializationDefered 
value=false/
property name=optimizeAcknowledge value=false/
property name=optimizedMessageDispatch value=true/
property name=password value=/
property name=producerWindowSize value=0/
property name=statsEnabled value=false/
property name=useAsyncSend value=false/
property name=useCompression value=false/
property name=useRetroactiveConsumer value=false/
property name=userName value=/
property name=watchTopicAdvisories value=true/
property name=sendTimeout value=0/
property name=redeliveryPolicy ref=redeliveryPolicy/
/bean

bean id=jmsTransactionManager
class=org.springframework.jms.connection.JmsTransactionManager
property name=connectionFactory ref=jmsConnectionFactory /

/bean

bean id=jmsConfig
class=org.apache.camel.component.jms.JmsConfiguration
property name=connectionFactory ref=jmsConnectionFactory/
property name=transactionManager ref=jmsTransactionManager/
property name=transacted value=true/
property name=concurrentConsumers value=2/
property name=timeToLive value=8640/
property name=deliveryPersistent value=true/
property name=explicitQosEnabled value=true/  
property name=priority value=9/
property name=transactedInOut value=true/ 
/bean

bean id=PROPAGATION_REQUIRED
class=org.apache.camel.spring.spi.SpringTransactionPolicy
property name=transactionManager ref=jmsTransactionManager/
property name=propagationBehaviorName 
value=PROPAGATION_REQUIRED/
/bean

bean id=jms class=org.apache.camel.component.jms.JmsComponent
property name=configuration ref=jmsConfig/
/bean

What else do I watchout for?

kr.



Claus Ibsen-2 wrote:
 
 You can use transactions - ack mode TRANSACTED
 
 And then you need to setup a TX manager.
 
 Chapter 9 in the Camel in Action book. (and find examples in the
 source code for the book)
 Or check the Transactional Client EIP pattern at Camel wiki.
 
 
 
 On Wed, Apr 14, 2010 at 2:50 PM, lekkie lekkie.ay...@gmail.com wrote:

 I have this scenario where I 'd like to keep a message in the queue until
 the
 flow in my route has returned.

 See explanation below:

 route
    from uri=jms:${queue}/
    to uri=nmr:Webservice/
 /route

 I'd like to finish processing to uri=nmr:Webservice/ - which means
 the
 message is successfully sent to nmr:Webservice - before an ack is sent to
 my
 message broker (jms:${queue}).

 What acknowledgement mode will ensure an ack is only sent after camel
 application returns from the to uri=nmr:Webservice/ call?

 In the case of an exception, I believe an ack will not be sent to the
 broker. Is my assumption correct?


 kr.
 --
 View this message in context:
 http://old.nabble.com/JMS-Message-Acknowledgement---Persistence-in-Camel-tp28242166p28242166.html
 Sent from the Camel - Users (activemq) mailing list archive at
 Nabble.com.


 
 
 
 -- 
 Claus Ibsen
 Apache Camel Committer
 
 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus
 
 

-- 
View this message in context: 

Re: onException handling

2010-04-14 Thread dnn

This one just won't die :)

I've got the same issue, but caused in a slightly different way.  The
problem is when the DB commit fails (in my case, a unique constraint
violation to an Oracle DB), the commit happens outside of the
TransactionErrorHandler.super.process(exchange) block, and won't trigger the
global onException handlers.

I've tried to create a unit test to show the issue, but I cannot figure out
how to make HSQL throw an exception at commit time.  If anyone has any tips
I'd be happy to create a unit test.

Thanks,
Dan Nawrocki


Claus Ibsen-2 wrote:
 
 On Fri, Apr 9, 2010 at 8:46 PM, dnn daniel.nawro...@ngc.com wrote:

 Works for me too using trunk.  It looks like an automated build pulls the
 trunk at midnight and deploys it to 2.3-SNAPSHOT in maven, so I should be
 able to start using it from mvn tomorrow.  When is 2.3.0 slated for
 release?

 
 There are still a couple of must work to be done. (restore camel-http
 using http client 3.1 as http client 4.0.1 lacks some features in 3.1,
 and those features have only been added to http client 4.1, which goes
 on a long release path with alpha releases currently :( :(
 
 I think we can have it released in end of this or start of next month.
 
-- 
View this message in context: 
http://old.nabble.com/onException-handling-tp28183226p28245275.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Graceful shutdown of Camel-Jetty component. (Camel 2.2.0)

2010-04-14 Thread Ilya S
Hi All,

Fist of all, thank you for this great product!
Every new release brings excellent new features just in time.

I'm currently investigating Graceful Shutdown feature, and I'm am
wondering if graceful shutdown is supported for Camel-Jetty component?
I was able to successfully shut down JMS component. However,
JettyHttpCoponent seems to have issues when shutting down.

In my simple test (adopted from camel-example-spring-jms:ServerRoute
example) I have a simple route that looks like this:

from(jetty:http://0.0.0.0:8686/hello;)
..
.. do work
...
.to(jms:queue:numbers2?requestTimeout=5)
.to(multiplier);


My producers simply send numbers to http endpoint..


When I shutdown this context gracefully I'm getting all sort of
exceptions from Jetty, and the context does not seem to wait until
inflight exchanges have finished.
I'm using the defaults everywhere (e.g. default shutdown strategy).

Is shutdown supported for Jetty, and if so how should one configure
jetty to initiate proper shutdown?

Thank you,

Ilya.


Re: Deploying as web app with jetty endpoint

2010-04-14 Thread jfaath

I should note that by turning the
com.sun.jersey.spi.spring.container.servlet.SpringServlet into a servlet
instead of a filter, I can start up Tomcat without error.  However, when I
try to access a page I get this error:

java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?

Is there any way to pass the WebApplicationContext created by the camel
servlet component to jersey's SpringServlet?


jfaath wrote:
 
 That seems to finally work...providing I remove the Jersey Filter that
 is used by the web console.  This effectively breaks the Camel web
 console, so as of now it appears the two are incompatible.
 
 
 
 willem.jiang wrote:
 
 Oh, you should not use the ContextLoaderLister to load the camel route.
 There is a contextConfigLocation parameter that you can pass to the 
 CamelHttpTransportServlet to load the camel route.
 You can find the example here
 https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-spring.xml
 
 Willem
 
 jfaath wrote:
 I played around with this by removing everything below the
 ContextLoaderListener listener.  I still get the same error.  As a rule,
 it
 seems that Tomcat always loads listeners before servlets.
 
 What exactly is the expected behavior of the bootstrap process in the
 servlet container?  What is the contextConfigLocation parameter supposed
 to
 do?
 
 Is there a sample of using this component in an actual servlet
 container?
 
 
 willem.jiang wrote:
 Hi,

 Can you remove the web console part and try again?
 Maybe there are some side effect of the web console configure.

 Willem

 jfaath wrote:
 So should I post a JIRA on this?  The servlet component doesn't seem
 to
 work
 in v2.2 when used in the web console.


 
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Deploying-as-web-app-with-jetty-endpoint-tp28171746p28248126.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: File consumer + POJO splitter

2010-04-14 Thread John Landahl
On Tue, Apr 13, 2010 at 7:26 PM, Willem Jiang willem.ji...@gmail.com wrote:
 I think it should be a best practice to copy the inMessage header if return
 a list of new created Messages within the split method.

That may be, but how is it that /not/ doing this results in errors in
the File component?


Re: File consumer + POJO splitter

2010-04-14 Thread Claus Ibsen
On Thu, Apr 15, 2010 at 1:45 AM, John Landahl j...@landahl.org wrote:
 On Tue, Apr 13, 2010 at 7:26 PM, Willem Jiang willem.ji...@gmail.com wrote:
 I think it should be a best practice to copy the inMessage header if return
 a list of new created Messages within the split method.

 That may be, but how is it that /not/ doing this results in errors in
 the File component?


What version of Camel are you using?


-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus


Re: JPA component - EntityManagerFactory issue

2010-04-14 Thread Claus Ibsen
Hi

Yeah that is actually something we can do to improve.

I have created a ticket
https://issues.apache.org/activemq/browse/CAMEL-2647

And implemented it. Now it will auto lookup the EMF and TM from the registry.

You are most welcome to try out 2.3-SNAPSHOT and see if that works for
you as well.


On Wed, Apr 14, 2010 at 6:43 AM, vcheruvu vid.cher...@macquarie.com wrote:

 Thanks that worked nicely. So if i didn't have this bean definition, Spring
 and Camel would have instantiated the entityManagerFactory twice. As per the
 jpa example in the Camel src, perhaps it would be good idea to add this bean
 as part of the spring based camel config example and avoid duplication of
 instantiating entityMangerFactory. You will notice that in the TRACE level
 logs for Camel JPA example.



 Claus Ibsen-2 wrote:

 Hi

 You can set the EntityManagerFactory on the JpaComponent, and Camel
 will reuse this one.

 bean id=jap class=org...JpaComponent
   property name=entityManagerFactory ref=myEntityFac/
 /bean


 On Wed, Apr 14, 2010 at 4:34 AM, vcheruvu vid.cher...@macquarie.com
 wrote:

 Hi,

 In my project, I am using JPA and using Hibernate vendor to poll tables.
 Please see my config below.  I am trying to setup multiple persiste
 http://old.nabble.com/file/p28237771/trace-jpa.txt trace-jpa.txt nce.xml
 file in my project.

 bean
 camel-context
 ...
        route
                        from
 uri=jpa:com.MyEntity?consumer.namedQuery=pollRecordsamp;consumeDelete=falseamp;delay=1000amp;consumer.useFixedDelay=true/
                        to
 uri=bean:rransformerBean?method=transformRecords/
                /route
 camel-context/
  bean id=jpaTemplate class=org.springframework.orm.jpa.JpaTemplate
    property name=entityManagerFactory ref=entityManagerFactory/
  /bean
 bean id=myPersistence
 class=org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager
  property name=persistenceXmlLocations
    list
      valueclasspath*:META-INF/spring/custom/persistence.xml/value
    /list
  /property
  property name=loadTimeWeaver
        bean
 class=org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver/
  /property
 /bean
  bean id=entityManagerFactory
 class=org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
        property name=persistenceUnitName value=camel/
        property name=persistenceUnitManager ref=myPersistence /
        property name=jpaVendorAdapter
                bean
 class=org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter
                 property name=showSql value=false/
                /bean
        /property

 /bean
 I am using Spring config to setup the multiple peristence xml location,
 you
 can see the example
 http://docs.huihoo.com/spring/2.5.x/en-us/orm.html#orm-jpa-setup-lcemfb .
 When running the camel application I have come to know that  Spring has
 successfully created entity
 http://old.nabble.com/file/p28237771/trace-jpa.txt trace-jpa.txt
 ManagerFactory and loaded correct persistence.xml file. However, when
 camel
 starts, JPA endpoint tries to create/instantiate new entityManagerFactory
 Object again instead of using existing entityManageFactory that was
 already
 created by spring. In doing so, EJB3Configuration.configure()  is invoked
 by
 Jpa endpoint throws an error stating Could not find any
 META-INF/persistence.xml file in the classpath. Why is camel JPA
 endpoint
 invoking  Persistence.createEntityManagerFactory(persistenceUnit,
 getEntityManagerProperties()); instead of reusing entityMangerFactory
 that
 was instantiated by Spring? Is camel getting confused between
 LocalEntityManagerFactory  and LocalContainerEntityManagerFactory ? I
 have
 added trace logs of camel, spring and hibernate in the attachment to this
 post. Hopefully it helps you explain my questions.

 Kind regards,
 -Vid-





 --
 View this message in context:
 http://old.nabble.com/JPA-component---EntityManagerFactory-issue-tp28237771p28237771.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



 --
 View this message in context: 
 http://old.nabble.com/JPA-component---EntityManagerFactory-issue-tp28237771p28238297.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus