Re: Problem with multiple CXF services using the same https port

2011-02-10 Thread cmoulliard
This has been implemented in karaf 2,2 which will be released soon
Sent via BlackBerry offered by Proximus

-Original Message-
From: Christian Müller christian.muel...@gmail.com
Date: Thu, 10 Feb 2011 18:43:04 
To: users@camel.apache.org
Reply-To: users@camel.apache.org
Subject: Re: Problem with multiple CXF services using the same https port

After a fresh cup of cafe, I think I have a good idea. Why not providing a
jetty.xml file in ${SMX_HOME}/etc (like the activemq-broker.xml) and
configuring jetty there.
And in our (multiple) CXF bundle configurations, we using the already
running Jetty as Charles suggested.

Sounds also a good idea for you?

I'm working on a default jetty configuration which provides http and https
connectors. Maybe this is also interesting feature for the ServiceMix
guys...

Christian



Re: Problem with multiple CXF services using the same https port

2011-02-10 Thread cmoulliard
Will explain tomorrow morning how you can do that easily with your fusr rsb 
server !
Sent via BlackBerry offered by Proximus

-Original Message-
From: Christian Mueller christian.muel...@gmail.com
Date: Thu, 10 Feb 2011 10:57:55 
To: users@camel.apache.org
Reply-To: users@camel.apache.org
Subject: Re: Problem with multiple CXF services using the same https port


This is nice for the future. At present, we are using ServiceMix
4.2.0-fuse-02-00 which use Karaf 1.4.0.fuse-02-00 and I need a solution for
this environment.
Any doubts about my proposal (jetty.xml in ${SMX_ROOT} and reusing this
central jetty instance)?

Christian

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3379902.html
Sent from the Camel - Users mailing list archive at Nabble.com.




Re: Camel-csv 2.2.0: reading a single line csv file

2010-06-15 Thread cmoulliard

I have committed a modification in camel bindy to be able to work with ,.
that means that we use as separator the double quotes -- ',' 

See test class
https://svn.apache.org/repos/asf/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java
 

to have an example 

KR,

Charles

Claus Ibsen-2 wrote:
 
 On Tue, May 4, 2010 at 5:19 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 On Tue, May 4, 2010 at 8:57 AM, Attilio Donà attilio.d...@gmail.com
 wrote:

 Hi all,

 I've to read a csv file and I want use camel to do this. Camel bindy
 seems
 to me that doesn't know the csv convention that a field separator can be
 a
 character field using double quotes:

 contains,  comma, another field


 Yeah that would be good to be able to do with camel-bindy. Do you mind
 creating a JIRA ticket?

 
 I have created the JIRA ticket
 https://issues.apache.org/activemq/browse/CAMEL-2691
 
 

 So the adopted solution is camel-csv.

 Using camel-csv to parse the csv file as in the camel manual works only
 if
 the csv file has more than one line of data:

 // Some comments here
 public void doHandleCsvData(List csvData)
 {
    // do magic here as in the manual if the file as more than one row of
 data
 }

 If the csv file has 1 row the parameter passed to the method bean
 doHandleCsvData is a List.

 As a quick workaround, instead of using parametrized generics, it is
 possible to do something like this:


         public void modelsCsvFile(Exchange exchange) {
                 List csvData = (List) exchange.getIn().getBody();

                 if (csvData.get(0).getClass().equals(String.class)) {
                         log.debug(single row file);

                         Vendor vendor =
 vendorDAO.bind((String)csvData.get(0));
                         Model model = new Model(vendor,
 (String)csvData.get(1));
                         modelDAO.bind(model);
                         return;
                 }

                 for (List row : (List)csvData) {
                         log.debug(read [{}] [{}], row.get(0),
 row.get(1));

                         Vendor vendor =
 vendorDAO.bind((String)row.get(0));
                         Model model = new Model(vendor,
 (String)row.get(1));
                         modelDAO.bind(model);

                 }

 Attilio

 --
 View this message in context:
 http://old.nabble.com/Camel-csv-2.2.0%3A-reading-a-single-line-csv-file-tp28443740p28443740.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

 
 
 
 -- 
 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
 
 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://old.nabble.com/Camel-csv-2.2.0%3A-reading-a-single-line-csv-file-tp28443740p2858.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Bindy CSV not Marshaling

2010-06-11 Thread cmoulliard

I have committed a fix on camel

You can test it using the camel-2.4-SNASPHOT

and you will have now an error :

@Section and/or @KeyValuePairDataField have not been defined !

KR,

Charles


Nick Heudecker wrote:
 
 Thanks for the response.  There appear to be two bugs with Bindy 2.3.0.
 First, BindyAbstractFactory#generateKey() creates an invalid number if you
 don't define a @Section annotation.  You'll get a key like 'null000',
 resulting in a NumberFormatException.
 
 Next, Bindy doesn't support Booleans or booleans.
 
 
 
 On Sun, May 30, 2010 at 1:57 AM, Claus Ibsen claus.ib...@gmail.com
 wrote:
 
 On Sun, May 30, 2010 at 5:30 AM, Nick Heudecker nheudec...@gmail.com
 wrote:
  Are there known issues with Bindy and marshaling POJOs to CSV?  I
 followed
  the example and my objects aren't getting past the marshal(...) step
 with
  data.  I'm getting a zero-length byte[] in the exchange after the
  marshal(...) step.  What am I missing?
 

 Hi

 You may have to add more details. What Camel version. What does your
 POJO looks like with the annotations.
 Can you see an exception in the logs etc.

 At first I suggest to take a look at the unit tests of camel-bindy or
 chapter 3 in the Camel in Action book which contains a Bindy example.
 The source code for the book is free so you can actually find the
 source code for the example there.


 --
 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

 
 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://old.nabble.com/Bindy-CSV-not-Marshaling-tp28719942p28856371.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel-ftp component problem

2010-04-14 Thread cmoulliard
 ] [] [   ] [   60] OPS4J Pax Web -
Extender - WAR (0.7.2)
[  52] [Active ] [] [   ] [   60] OPS4J Pax Web -
Extender - Whiteboard (0.7.2)
[  53] [Active ] [] [   ] [   60] OPS4J Pax Url - war:,
war-i: (1.1.2)
[  54] [Active ] [Created ] [   ] [   60] Apache Felix Karaf ::
WAR Deployer (1.4.0)
[  55] [Active ] [] [   ] [   60] Apache ServiceMix
Specs :: ACTIVATION API 1.4 (1.4.0)
[  56] [Active ] [] [   ] [   60] Apache ServiceMix
Specs :: JAXB API 2.1 (1.4.0)
[  57] [Active ] [] [   ] [   60] Apache ServiceMix
Specs :: STAX API 1.0 (1.4.0)
[  58] [Active ] [] [   ] [   60] Apache ServiceMix
Bundles: jaxb-impl-2.1.12 (2.1.12.1)
[  59] [Active ] [] [   ] [   60] Commons Management
(1.0)
[  60] [Active ] [] [   ] [   60] camel-core (2.2.0)
[  61] [Active ] [Created ] [   ] [   60] Apache Felix Karaf ::
Spring Deployer (1.2.0)
[  62] [Active ] [] [   ] [   60] geronimo-jta_1.1_spec
(1.1.1)
[  63] [Active ] [] [   ] [   60] Spring Transaction
(2.5.6.SEC01)
[  64] [Active ] [] [   ] [   60] camel-spring-osgi
(2.2.0)
[  65] [Active ] [] [   ] [   60] Commons Pool (1.5.4)
[  66] [Active ] [] [   ] [   60] geronimo-jms_1.1_spec
(1.1.1)
[  67] [Active ] [] [   ] [   60] Spring JMS
(2.5.6.SEC01)
[  68] [Active ] [] [   ] [   60] camel-jms (2.2.0)
[  70] [Active ] [] [   ] [   60] Commons Net (2.0)
[  71] [Active ] [] [   ] [   60] Apache ServiceMix
Bundles: jsch-0.1.31 (0.1.31.3)
[  72] [Active ] [] [   ] [   60] camel-ftp (2.2.0)
[  73] [Active ] [] [Started] [   60] camel-context.xml
(0.0.0)

The camel route 

beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:context=http://www.springframework.org/schema/context;
xmlns:camel=http://camel.apache.org/schema/spring;
xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://camel.apache.org/schema/osgi
http://camel.apache.org/schema/osgi/camel-osgi.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd;


camel:camelContext trace=true
xmlns=http://camel.apache.org/schema/osgi;

camel:route
camel:from uri=file://d:/temp/data/reportincident//
camel:to
uri=ftp://some...@someftpserver.com/public/upload/images/holiday2008?password=secretamp;binary=true;
/
/camel:route

/camel:camelContext

/beans

And the log

180  (route1) from(file://d:/temp/data/reportincident/) --
ftp://some...@someftpserver.com/public/upload/images/holiday2008?binary=truepassword=s
ecret  Pattern:InOnly, Headers:{CamelFileLastModified=Wed Apr 14 11:26:59
CEST 2010, CamelFileAbsolute=true, CamelFileName=test.txt, CamelFileParen
t=d:\temp\data\reportincident,
CamelFileAbsolutePath=d:\temp\data\reportincident\test.txt,
CamelFileRelativePath=d:\temp\data\reportincident\test.txt,
 CamelFileNameOnly=test.txt,
CamelFilePath=d:\temp\data\reportincident\test.txt},
BodyType:org.apache.camel.component.file.GenericFile, Body:
11:27:48,225 | WARN  | 0: FileComponent | RemoteFileProducer   |
t.file.remote.RemoteFileProducer   73 | Writing file failed with: File op
eration failed: null someftpserver.com. Code: 0
11:27:48,225 | ERROR | 0: FileComponent | DefaultErrorHandler  |
rg.apache.camel.processor.Logger  248 | Failed delivery for exchangeId: c
9ccf786-4677-495e-9f2d-035cd489d180. Exhausted after delivery attempt: 1
caught: org.apache.camel.component.file.GenericFileOperationFailedException:
File operation failed: null someftpserver.com. Code: 0
org.apache.camel.component.file.GenericFileOperationFailedException: File
operation failed: null someftpserver.com. Code: 0

The FTP server is a virtual one so the connection cannot be established.

Kind regards,

Charles


cmoulliard wrote:
 
 Those packages are present in the JDK 6 and should be loaded automatically
 by karaf (felix) at the startup.
 
 Can you send me in a separate email (using my gmail address) your camel
 route to allow me to make a test with the components that you would like
 to
 test (camel-ftp, ...)
 
 Kind regards,
 
 Charles Moulliard
 
 Senior Enterprise Architect (J2EE, .NET, SOA)
 Apache Camel Committer

headers removed when moving to a queue (Camel 2.0) ??

2009-03-30 Thread cmoulliard

Hi,

I would like to know if I do something wrong or is it a bug ?

In the following route, a header is created to define the origin of the
route, the header is well added in first steps of the process (this is
confirmed by the trace) but lost when the message go the queue ?

camel:from uri=cxf:bean:reportIncident /
camel:setHeader headerName=origin
camel:constantwebservice/camel:constant
/camel:setHeader
camel:convertBodyTo
type=org.apache.camel.example.reportincident.InputReportIncident /
camel:to uri=bean:webservice /
camel:inOnly uri=queuingservice:queue:in /
camel:transform
camel:method bean=feedback method=setOk /
/camel:transform

convertBodyTo() -- to(bean:webservice), Pattern:InOut, ... ,
Headers:{content-type=text/xml;charset=UTF-8, operationName=ReportIncident,
content.type=text/xml;charset=UTF-8, Host=localhost:8080,
Content-Length=640,
SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
origin=webservice, User-Agent=Jakarta Commons-HttpClient/3.1,
operationNameSpace=http://reportincident.example.camel.apache.org,
org.apache.cxf.headers.Header.list=[]}, ...

no more headers here !!! except properties and body

to(bean:webservice) -- inOnly(queuingservice:queue:in), Pattern:InOut, ...,
BodyType:java.util.ArrayList,
Body:[{org.apache.camel.example.reportincident.model.incident=org.apache.camel.example.reportincident.model.incid...@1f93f8[

Is it a bug a bad configuration of me ?

Regards,

Charles

-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/headers-removed-when-moving-to-a-queue-%28Camel-2.0%29tp22782917p22782917.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: headers removed when moving to a queue (Camel 2.0) ??

2009-03-30 Thread cmoulliard

Willem,

Is it mandatory to copy the header to the out message in a bean ?

What I do in the bean is to read my header like this :
exchange.getIn().getHeader(origin);

How do you explain that the headers list is completely empty ?

Regards,

charles



willem.jiang wrote:
 
 Hi Charles,
 
 Maybe you forget to copy the message header from the in message to out
 message in bean:webservices.
 
 Willem
 
 cmoulliard wrote:
 Hi,
 
 I would like to know if I do something wrong or is it a bug ?
 
 In the following route, a header is created to define the origin of the
 route, the header is well added in first steps of the process (this is
 confirmed by the trace) but lost when the message go the queue ?
 
  camel:from uri=cxf:bean:reportIncident /
  camel:setHeader headerName=origin
  camel:constantwebservice/camel:constant
  /camel:setHeader
  camel:convertBodyTo
 type=org.apache.camel.example.reportincident.InputReportIncident /
  camel:to uri=bean:webservice /
  camel:inOnly uri=queuingservice:queue:in /
  camel:transform
  camel:method bean=feedback method=setOk /
  /camel:transform
 
 convertBodyTo() -- to(bean:webservice), Pattern:InOut, ... ,
 Headers:{content-type=text/xml;charset=UTF-8,
 operationName=ReportIncident,
 content.type=text/xml;charset=UTF-8, Host=localhost:8080,
 Content-Length=640,
 SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
 origin=webservice, User-Agent=Jakarta Commons-HttpClient/3.1,
 operationNameSpace=http://reportincident.example.camel.apache.org,
 org.apache.cxf.headers.Header.list=[]}, ...
 
 no more headers here !!! except properties and body
 
 to(bean:webservice) -- inOnly(queuingservice:queue:in), Pattern:InOut,
 ...,
 BodyType:java.util.ArrayList,
 Body:[{org.apache.camel.example.reportincident.model.incident=org.apache.camel.example.reportincident.model.incid...@1f93f8[
 
 Is it a bug a bad configuration of me ?
 
 Regards,
 
 Charles
 
 -
 Charles Moulliard
 SOA Architect
 
 My Blog :  http://cmoulliard.blogspot.com/
 http://cmoulliard.blogspot.com/  
 
 
 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/headers-removed-when-moving-to-a-queue-%28Camel-2.0%29tp22782917p22784102.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Camel / ServiceMix portage to .NET (C#, VB.NET)

2009-03-27 Thread cmoulliard

Hi,

I post this message to ask to the users 's community if people are
interested of a Camel / ServiceMix / Cxf porting to .NET (using C# or VB.NET
as language) ?

Regards,

-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Camel---ServiceMix-portage-to-.NET-%28C-%2C-VB.NET%29-tp22737369p22737369.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel 2.0 - Multicast issue ??

2009-03-27 Thread cmoulliard

Many thanks Willem. In fact, I tried to use the multicast as a workaround
because I was blocked to call directly the bean:feedback after the step
converting the content of WS into InputReportIncident. I have the same
problem as we have with the setHeader that you solved

remark : In my case, it could be more interesting to send in parallel the
same message to two different endpoints (direct:feedbackWS and
direct:saveWS).

Nevertheless, I will try to adapt my multicast routes as you propose (put
the direct:feedbackWS to the last endpoint) but for the moment I don't how
to achieve this.

Regards,

Charles

So I will try to 

willem.jiang wrote:
 
 Hi Charles,
 
 If you used the multicast for the InOut Message, Camel will try to
 aggregate the exchange for the out message processing and the default
 aggregation strategy is using the last exchange.
 
 You need to adjust the multicast endpoints in your Spring configuration
 file, and put the direct:feedbackWS to the last endpoint, or you can
 specify your own aggregation strategy in the multicast.
 
 You can find more examples about how to use multicast in the LoanBroker
 Example[1] of Camel.
 
 [1]http://cwiki.apache.org/CAMEL/loan-broker-example.html#LoanBrokerExample-Implementationwithwebservice
 
 Willem
 
 
 
 cmoulliard wrote:
 To solve the error returned and as proposed by Claus, I have modified my
 route like this 
 
 camel:inOnly uri=queuingservice:queue:in /
 
 Nevertheless, the multicast does not work as we can in the log here :
 
 17:38:34,250 | INFO  | 25328...@qtp2-0  | TraceInterceptor
 |
 rg.apache.camel.processor.Logger   88 |
 ID-dell-charles-1751-1238084114250-2-7 
 http://localhost:8080/camel-example/incident -- setHeader(webservice),
 Pattern:InOut,
 Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
 {http://reportincident.example.camel.apache.org}ReportIncident],
 CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
 content.type=text/xml;charset=UTF-8, operationName=ReportIncident,
 Host=localhost:8080, Content-Length=640,
 SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
 User-Agent=Jakarta Commons-HttpClient/3.1,
 org.apache.cxf.headers.Header.list=[],
 operationNameSpace=http://reportincident.example.camel.apache.org},
 BodyType:org.apache.cxf.message.MessageContentsList,
 Body:[org.apache.camel.example.reportincident.inputreportincid...@250f55]
 17:38:34,265 | INFO  | 25328...@qtp2-0  | TraceInterceptor
 |
 rg.apache.camel.processor.Logger   88 |
 ID-dell-charles-1751-1238084114250-2-7  setHeader(webservice) --
 convertBodyTo(), Pattern:InOut,
 Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
 {http://reportincident.example.camel.apache.org}ReportIncident],
 CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
 operationName=ReportIncident, content.type=text/xml;charset=UTF-8,
 Host=localhost:8080, Content-Length=640,
 SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
 origin=webservice, User-Agent=Jakarta Commons-HttpClient/3.1,
 operationNameSpace=http://reportincident.example.camel.apache.org,
 org.apache.cxf.headers.Header.list=[]},
 BodyType:org.apache.cxf.message.MessageContentsList,
 Body:[org.apache.camel.example.reportincident.inputreportincid...@250f55]
 17:38:34,265 | INFO  | 25328...@qtp2-0  | TraceInterceptor
 |
 rg.apache.camel.processor.Logger   88 |
 ID-dell-charles-1751-1238084114250-2-7  convertBodyTo() --
 multicast(),
 Pattern:InOut,
 Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
 {http://reportincident.example.camel.apache.org}ReportIncident],
 CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
 operationName=ReportIncident, content.type=text/xml;charset=UTF-8,
 Host=localhost:8080, Content-Length=640,
 SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
 origin=webservice, User-Agent=Jakarta Commons-HttpClient/3.1,
 operationNameSpace=http://reportincident.example.camel.apache.org,
 org.apache.cxf.headers.Header.list=[]},
 BodyType:org.apache.camel.example.reportincident.InputReportIncident,
 Body:org.apache.camel.example.reportincident.inputreportincid...@250f55
 17:38:34,265 | INFO  | 25328...@qtp2-0  | TraceInterceptor
 |
 rg.apache.camel.processor.Logger   88 |
 ID-dell-charles-1751-1238084114250-2-7  multicast() --
 to(direct:feedbackWS), Pattern:InOut,
 Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
 {http://reportincident.example.camel.apache.org}ReportIncident],
 CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
 content.type=text/xml;charset=UTF-8, operationName=ReportIncident,
 Host=localhost:8080, Content-Length=640, origin=webservice,
 SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
 User-Agent=Jakarta Commons

Re: Deploying same camelContext.xml in and out of OSGi

2009-03-27 Thread cmoulliard

Hi,

We are at the crossroads (à la croisée des chemins in french). It will be
very difficult to maintain Camel projects runnable in OSGI and non-OSGI
environments. OSGI projects are really specific because they depends on
bundles, packages must be exported, imported in the MANIFEST file, procedure
deployment and testing ... 
Moreover, the developers/architects will more and more use spring OSGI
facilities like osgi:service, osgi:reference to expose bundle services
(and use them in another bundle) or osgix:cm-properties to pass parameter
coming from properties file. 

So, I cannot figure out how it will be possible possible to run a camel
project in/out of OSGI servers

My feeling is that for the developers, they need a ServiceMix kernel bundle
that we can integrate within Eclipse/NetBeans/... in order to launch our
camel routes and debug them. Temporary, we can use the remote debugging
provided by ServiceMix
(http://cwiki.apache.org/SMX4KNL/51-troubleshooting-debugging-and-profiling.html)
to debug our code deployed externally of Eclipse.

In consequence, don't change anything in the existing code.

Regards,

Charles

James.Strachan wrote:
 
 2009/3/26 Willem Jiang willem.ji...@gmail.com:
 Adding a Bundle-Activator into the camel-spring module  will introduce
 the
 dependency of OSGi jars into camel-spring.
 I'm wandering if we could do some thing on the camel-osgi module's
 Bundle-Activator to override the camel-spring's Spring handler?
 
 Yeah -could we just not have a bundle activator in camel-osgi that
 does the camel-osgi stuff - then delegate (if we need to) to spring-dm
 stuff?
 
 
 -- 
 James
 ---
 http://macstrac.blogspot.com/
 
 Open Source Integration
 http://fusesource.com/
 
 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Deploying-same-camelContext.xml-in-and-out-of-OSGi-tp22684580p22737964.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel 2.0 - Multicast issue ??

2009-03-27 Thread cmoulliard

Hi Willem,

Many thanks.

By the way, It should be interesting to have a real parallel DSL word in the
camel syntax for simple case like this. 

The route could be written with the assumption that no OUT message is waited
by the calling process 

e.g. 

from uri=
...
!-- at this point we don't wait any OUT message from endpoints called, our
strategy is pure 
  FIRE/FORGET --
parallel
   to uri=direct:feedbackWS/
   to uri=direct:saveWS/
/parrallel

An extension of this could be that parallel does not receive OUT message but
properties or headers like e.g. parallelName=feedbackWS,
status=processed and we could provide a timer as a property. 

parallel timer=180 feedbackRequested=true
...
/parallel

If one of the parallel process does not finish until the period defined by
the timer, then the parallel process generates errors.

regards,

Charles




willem.jiang wrote:
 
 Hi Charles,
 
 Camel multicast supports to send the exchange parallely.
 You just need to set the customer aggregation strategy to return a right
 exchange for aggregation like this, since we don't when the bean's
 exchange is returned.
 
 public class MyCustomerAggregationStrategy implements AggregationStrategy
 {
 // only return the exchage which has the out message
 public Exchange aggregate(Exchange oldExchange, Exchange newExchange)
 {
 if (oldExchange.getOutMessage(false)!= null) {
return oldExchange;
 } else {
return newExchange;
 }
 }
 }
 
 Willem
 
 
 
 cmoulliard wrote:
 Many thanks Willem. In fact, I tried to use the multicast as a workaround
 because I was blocked to call directly the bean:feedback after the step
 converting the content of WS into InputReportIncident. I have the same
 problem as we have with the setHeader that you solved
 
 remark : In my case, it could be more interesting to send in parallel the
 same message to two different endpoints (direct:feedbackWS and
 direct:saveWS).
 
 Nevertheless, I will try to adapt my multicast routes as you propose (put
 the direct:feedbackWS to the last endpoint) but for the moment I don't
 how
 to achieve this.
 
 Regards,
 
 Charles
 
 So I will try to 
 
 willem.jiang wrote:
 Hi Charles,

 If you used the multicast for the InOut Message, Camel will try to
 aggregate the exchange for the out message processing and the default
 aggregation strategy is using the last exchange.

 You need to adjust the multicast endpoints in your Spring configuration
 file, and put the direct:feedbackWS to the last endpoint, or you can
 specify your own aggregation strategy in the multicast.

 You can find more examples about how to use multicast in the LoanBroker
 Example[1] of Camel.

 [1]http://cwiki.apache.org/CAMEL/loan-broker-example.html#LoanBrokerExample-Implementationwithwebservice

 Willem



 cmoulliard wrote:
 To solve the error returned and as proposed by Claus, I have modified
 my
 route like this 

 camel:inOnly uri=queuingservice:queue:in /

 Nevertheless, the multicast does not work as we can in the log here :

 17:38:34,250 | INFO  | 25328...@qtp2-0  | TraceInterceptor
 |
 rg.apache.camel.processor.Logger   88 |
 ID-dell-charles-1751-1238084114250-2-7 
 http://localhost:8080/camel-example/incident -- setHeader(webservice),
 Pattern:InOut,
 Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
 {http://reportincident.example.camel.apache.org}ReportIncident],
 CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
 content.type=text/xml;charset=UTF-8, operationName=ReportIncident,
 Host=localhost:8080, Content-Length=640,
 SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
 User-Agent=Jakarta Commons-HttpClient/3.1,
 org.apache.cxf.headers.Header.list=[],
 operationNameSpace=http://reportincident.example.camel.apache.org},
 BodyType:org.apache.cxf.message.MessageContentsList,
 Body:[org.apache.camel.example.reportincident.inputreportincid...@250f55]
 17:38:34,265 | INFO  | 25328...@qtp2-0  | TraceInterceptor
 |
 rg.apache.camel.processor.Logger   88 |
 ID-dell-charles-1751-1238084114250-2-7  setHeader(webservice) --
 convertBodyTo(), Pattern:InOut,
 Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
 {http://reportincident.example.camel.apache.org}ReportIncident],
 CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
 operationName=ReportIncident, content.type=text/xml;charset=UTF-8,
 Host=localhost:8080, Content-Length=640,
 SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
 origin=webservice, User-Agent=Jakarta Commons-HttpClient/3.1,
 operationNameSpace=http://reportincident.example.camel.apache.org,
 org.apache.cxf.headers.Header.list=[]},
 BodyType:org.apache.cxf.message.MessageContentsList,
 Body:[org.apache.camel.example.reportincident.inputreportincid...@250f55]
 17:38:34,265 | INFO  | 25328...@qtp2-0  | TraceInterceptor

Re: Camel 2.0 - Multicast issue ??

2009-03-26 Thread cmoulliard
)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
Caused by: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: class java.util.HashMap nor any of its super
class is known to this context.]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:331)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:257)
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:100)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:441)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:138)
... 21 more
Caused by: javax.xml.bind.JAXBException: class java.util.HashMap nor any of
its super class is known to this context.
at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:242)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:257)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:649)
at
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:147)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:156)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:185)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:305)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:312)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:71)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:490)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328)
... 25 more
Caused by: javax.xml.bind.JAXBException: class java.util.HashMap nor any of
its super class is known to this context.
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:556)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:644)
... 33 more

cmoulliard wrote:
 
 Hi,
 
 I have defined the following routes in camel :
 
   !-- Receive WS message, multicast the message and provive 
 feedback --
   camel:route
   camel:from uri=cxf:bean:reportIncident /
   !-- issue resolved 26/03/2009 --
   camel:setHeader headerName=origin
   camel:constantwebservice/camel:constant
   /camel:setHeader
   camel:convertBodyTo
 type=org.apache.camel.example.reportincident.InputReportIncident /
   camel:multicast
   camel:to uri=direct:feedbackWS/
   camel:to uri=direct:saveWS/
   /camel:multicast
   /camel:route
   
   !--  Send feedback to WebService --
   camel:route
   camel:from uri=direct:feedbackWS /
   camel:transform
   camel:method bean=feedback method=setOk /
   /camel:transform
   /camel:route
   
   !-- Convert WS message and put it in the queue  --
   camel:route
   camel:from uri=direct:saveWS /
   camel:to uri=bean:webservice /
   camel:to uri=queuingservice:queue:in /
   /camel:route
 
 When calling the web service, we can see in the trace that the process
 starts correctly but the multicast seems to mix the routes and a error is
 generated :
 
 17:16:08,562 | INFO  | 12773...@qtp1-0  | TraceInterceptor
 | rg.apache.camel.processor.Logger   88 |
 ID-dell-charles-1751-1238084114250-2-0 
 http://localhost:8080/camel-example/incident -- setHeader(webservice

Camel 2.0 - Multicast issue ??

2009-03-26 Thread cmoulliard

Hi,

I have defined the following routes in camel :

!-- Receive WS message, multicast the message and provive 
feedback --
camel:route
camel:from uri=cxf:bean:reportIncident /
!-- issue resolved 26/03/2009 --
camel:setHeader headerName=origin
camel:constantwebservice/camel:constant
/camel:setHeader
camel:convertBodyTo
type=org.apache.camel.example.reportincident.InputReportIncident /
camel:multicast
camel:to uri=direct:feedbackWS/
camel:to uri=direct:saveWS/
/camel:multicast
/camel:route

!--  Send feedback to WebService --
camel:route
camel:from uri=direct:feedbackWS /
camel:transform
camel:method bean=feedback method=setOk /
/camel:transform
/camel:route

!-- Convert WS message and put it in the queue  --
camel:route
camel:from uri=direct:saveWS /
camel:to uri=bean:webservice /
camel:to uri=queuingservice:queue:in /
/camel:route

When calling the web service, we can see in the trace that the process
starts correctly but the multicast seems to mix the routes and a error is
generated :

17:16:08,562 | INFO  | 12773...@qtp1-0  | TraceInterceptor |
rg.apache.camel.processor.Logger   88 |
ID-dell-charles-1751-1238084114250-2-0 
http://localhost:8080/camel-example/incident -- setHeader(webservice),
Pattern:InOut,
Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
{http://reportincident.example.camel.apache.org}ReportIncident],
CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
content.type=text/xml;charset=UTF-8, operationName=ReportIncident,
Host=localhost:8080, Content-Length=640,
SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
User-Agent=Jakarta Commons-HttpClient/3.1,
org.apache.cxf.headers.Header.list=[],
operationNameSpace=http://reportincident.example.camel.apache.org},
BodyType:org.apache.cxf.message.MessageContentsList,
Body:[org.apache.camel.example.reportincident.inputreportincid...@ea9f6e]

17:16:08,578 | INFO  | 12773...@qtp1-0  | TraceInterceptor |
rg.apache.camel.processor.Logger   88 |
ID-dell-charles-1751-1238084114250-2-0  setHeader(webservice) --
convertBodyTo(), Pattern:InOut,
Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
{http://reportincident.example.camel.apache.org}ReportIncident],
CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
operationName=ReportIncident, content.type=text/xml;charset=UTF-8,
Host=localhost:8080, Content-Length=640,
SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
origin=webservice, User-Agent=Jakarta Commons-HttpClient/3.1,
operationNameSpace=http://reportincident.example.camel.apache.org,
org.apache.cxf.headers.Header.list=[]},
BodyType:org.apache.cxf.message.MessageContentsList,
Body:[org.apache.camel.example.reportincident.inputreportincid...@ea9f6e]

17:16:08,578 | INFO  | 12773...@qtp1-0  | TraceInterceptor |
rg.apache.camel.processor.Logger   88 |
ID-dell-charles-1751-1238084114250-2-0  convertBodyTo() -- multicast(),
Pattern:InOut,
Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
{http://reportincident.example.camel.apache.org}ReportIncident],
CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
operationName=ReportIncident, content.type=text/xml;charset=UTF-8,
Host=localhost:8080, Content-Length=640,
SOAPAction=http://reportincident.example.camel.apache.org/ReportIncident;,
origin=webservice, User-Agent=Jakarta Commons-HttpClient/3.1,
operationNameSpace=http://reportincident.example.camel.apache.org,
org.apache.cxf.headers.Header.list=[]},
BodyType:org.apache.camel.example.reportincident.InputReportIncident,
Body:org.apache.camel.example.reportincident.inputreportincid...@ea9f6e

17:16:08,593 | INFO  | 12773...@qtp1-0  | TraceInterceptor |
rg.apache.camel.processor.Logger   88 |
ID-dell-charles-1751-1238084114250-2-0  multicast() --
to(direct:feedbackWS), Pattern:InOut,
Properties:{org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo:
{http://reportincident.example.camel.apache.org}ReportIncident],
CamelCXFDataFormat=POJO}, Headers:{content-type=text/xml;charset=UTF-8,
content.type=text/xml;charset=UTF-8, operationName=ReportIncident,
Host=localhost:8080, Content-Length=640, origin=webservice,

Camel 2 - Spring DSL - setHeader / Constant (error)

2009-03-24 Thread cmoulliard

Hi,

I have use in my camel route (described using spring DSL), the following
syntax to define the header of my message :

setHeader headerName=origin
constantfile/constant
/setHeader

as described on the wiki site (http://camel.apache.org/constant.html) 

But, when I start my bundle on SMX4, I receive the error :

16:15:27,750 | ERROR | xtenderThread-21 | ContextLoaderListener|
BundleApplicationContextListener   50 | Application context refresh failed
(OsgiBundleXmlApplicationContext(bundle=reportincident.routing,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
53 in XML document from URL
[bundle://116.0:0/META-INF/spring/camel-context.xml] is invalid; nested
exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'constant'. One of
'{http://camel.apache.org/schema/spring:description,
http://camel.apache.org/schema/spring:expressionDefinition,
http://camel.apache.org/schema/spring:constant,
http://camel.apache.org/schema/spring:el,
http://camel.apache.org/schema/spring:groovy,
http://camel.apache.org/schema/spring:header,
http://camel.apache.org/schema/spring:jxpath,
http://camel.apache.org/schema/spring:javaScript,
http://camel.apache.org/schema/spring:language,
http://camel.apache.org/schema/spring:method,
http://camel.apache.org/schema/spring:mvel,
http://camel.apache.org/schema/spring:ognl,
http://camel.apache.org/schema/spring:php,
http://camel.apache.org/schema/spring:property,
http://camel.apache.org/schema/spring:python,
http://camel.apache.org/schema/spring:ruby,
http://camel.apache.org/schema/spring:simple,
http://camel.apache.org/schema/spring:sql,
http://camel.apache.org/schema/spring:tokenize,
http://camel.apache.org/schema/spring:xpath,
http://camel.apache.org/schema/spring:xquery}' is expected.
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
at
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
at java.lang.Thread.run(Thread.java:619)

Regards, 

-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Camel-2---Spring-DSL---setHeader---Constant-%28error%29-tp22682794p22682794.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel 2 - Spring DSL - setHeader / Constant (error)

2009-03-24 Thread cmoulliard

Forget my post. My bundle on SMX4 was not updated correctly.

Everything is OK.


cmoulliard wrote:
 
 Hi,
 
 I have use in my camel route (described using spring DSL), the following
 syntax to define the header of my message :
 
   setHeader headerName=origin
   constantfile/constant
   /setHeader
 
 as described on the wiki site (http://camel.apache.org/constant.html) 
 
 But, when I start my bundle on SMX4, I receive the error :
 
 16:15:27,750 | ERROR | xtenderThread-21 | ContextLoaderListener   
 | BundleApplicationContextListener   50 | Application context refresh
 failed (OsgiBundleXmlApplicationContext(bundle=reportincident.routing,
 config=osgibundle:/META-INF/spring/*.xml))
 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
 Line 53 in XML document from URL
 [bundle://116.0:0/META-INF/spring/camel-context.xml] is invalid; nested
 exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:
 Invalid content was found starting with element 'constant'. One of
 '{http://camel.apache.org/schema/spring:description,
 http://camel.apache.org/schema/spring:expressionDefinition,
 http://camel.apache.org/schema/spring:constant,
 http://camel.apache.org/schema/spring:el,
 http://camel.apache.org/schema/spring:groovy,
 http://camel.apache.org/schema/spring:header,
 http://camel.apache.org/schema/spring:jxpath,
 http://camel.apache.org/schema/spring:javaScript,
 http://camel.apache.org/schema/spring:language,
 http://camel.apache.org/schema/spring:method,
 http://camel.apache.org/schema/spring:mvel,
 http://camel.apache.org/schema/spring:ognl,
 http://camel.apache.org/schema/spring:php,
 http://camel.apache.org/schema/spring:property,
 http://camel.apache.org/schema/spring:python,
 http://camel.apache.org/schema/spring:ruby,
 http://camel.apache.org/schema/spring:simple,
 http://camel.apache.org/schema/spring:sql,
 http://camel.apache.org/schema/spring:tokenize,
 http://camel.apache.org/schema/spring:xpath,
 http://camel.apache.org/schema/spring:xquery}' is expected.
   at
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
   at
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
   at
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
   at
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
   at
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
   at
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
   at
 org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)
   at
 org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)
   at
 org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
   at
 org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
   at
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)
   at
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)
   at
 org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
   at
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
   at
 org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
   at
 org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
   at
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
   at
 org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
   at java.lang.Thread.run(Thread.java:619)
 
 Regards, 
 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Camel-2---Spring-DSL---setHeader

Strange behavior of Camel 2.0 with bean top of OSGI !!!

2009-03-20 Thread cmoulliard

Hi,

I have created a bean where I inject a dependency coming from an osgi
service like this :

bean id=csv 
class=org.apache.camel.example.reportincident.beans.Csv
property name=incidentService
osgi:reference
interface=org.apache.camel.example.reportincident.service.IncidentService/
/property
/bean

The bean is used in a camel route :

!-- File route --
camel:route
camel:from 
uri=file://d:/temp/data/?move=d:/temp/done/${file:name} /
camel:unmarshal ref=bindyDataformat /
camel:to uri=bean:csv /
camel:to uri=queuingservice:queue:in /
/camel:route

!-- --
camel:route
camel:from uri=queuingservice:queue:in /
camel:marshal ref=bindyDataformat /
camel:to uri=file://d:/temp/data/queue /
/camel:route

But when I put a file in the directory of temp/data, I receive hundreds of
lines like this. It seems that camel would like to convert
org.apache.camel.component.file.GenericFileMessage to the required type:
org.apache.camel.example.reportincident.service.IncidentService !!! This is
completely stupid.


16:41:09,929 | ERROR | ompon...@1504a84 | DeadLetterChannel|
rg.apache.camel.processor.Logger  207 | Failed delivery for exchangeId:
ID-dell-charles-1546-1237563220757-0-6. On delivery attempt: 1 caught:
org.apache.camel.NoTypeConversionAvailableException: No type converter
available to convert from type:
org.apache.camel.component.file.GenericFileMessage to the required type:
org.apache.camel.example.reportincident.service.IncidentService with value
GenericFileMessage: GenericFile[d:\temp\data\csv_small.txt]
org.apache.camel.NoTypeConversionAvailableException: No type converter
available to convert from type:
org.apache.camel.component.file.GenericFileMessage to the required type:
org.apache.camel.example.reportincident.service.IncidentService with value
GenericFileMessage: GenericFile[d:\temp\data\csv_small.txt]
at
org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:156)
at
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:99)
at
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:95)
at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:86)
at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:52)
at
org.apache.camel.builder.ExpressionBuilder$13.evaluate(ExpressionBuilder.java:319)
at
org.apache.camel.impl.ExpressionSupport.evaluate(ExpressionSupport.java:37)
at
org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:187)
at
org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:78)
at
org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:136)
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:109)
at
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95)
at
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:65)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:69)
at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:49)
at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:78)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:115)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:88)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:83)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:210)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:145)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:55)
at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:49)
at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:78)
at

Suggestion : Modification of the Camel ActiveMq Component

2009-03-13 Thread cmoulliard

Hi,

I would like to suggest the following modification for the Camel ActiveMq
Component in order to allow camel (deployed top of an OSGI server like
ServiceMix 4) to call an already installed ActiveMq broker.

To use ActiveMq from Camel, the following bean must be instantiated by
spring :

bean id=activemq
class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL value=vm://localhost:61616 /
/bean 

This component is a kind of gateway who will proxy communication between the
camel routes and the broker. If the instance of the broker does not exist (=
is not started), then camel will instantiate it

To tell to the component that it should not create an instance of activemq
(because the broker has been started separately from this camel context as
this is possible in SMX4), you must change the property of the url like this
:

bean id=activemq
class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL value=vm://localhost:61616?create=false /
/bean

To avoid confusion for the user, I propose that we have a new property that
we will use to inform the component if the broker already runs or not :

bean id=activemq
class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL value=vm://localhost:61616 /
   property name=runSeparately value=true /
/bean

The second modification that I propose concerns deployment of Camel top of
an osgi server. In this case, I need your help because I'm not sure at 100%
about what I will say

If my camel routes are deployed in an osgi bundle and have reference in the
from or to uri to activemq, How camel will be able to find activemq :
1) through the brokerUrl OR
2) by passing the OSGI reference of the service who has instantiating
activemq

If we adopt the second strategy, the bean can be described like this
...

bean id=activemq
class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL/ -- it this case, it makes no sense to use
the brokerUrl
   property name=osgiReference value=#activemqservice /
/bean

...

Maybe, we could simplify the syntax by removing this bean creation from the
camel context in order to pass directly the osgi reference of the service in
the route like

camel:from uri=osgiref=activemq:queue:in /

In this case, camel will create the bean
org.apache.activemq.camel.component.ActiveMQComponent and find the activemq
broker using the osgi reference of the service

Regards,





 

-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Suggestion-%3A-Modification-of-the-Camel-ActiveMq-Component-tp22493057p22493057.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Suggestion : Modification of the Camel ActiveMq Component

2009-03-13 Thread cmoulliard
 favorite approach is that the activeMq broker is configured apart of our
camel activemq bean component allowing to the user to define parameters like
pooling, persistence, transaction, ...  in one place. The fact that we
design the solution like this is required for administration purposes.
Otherwise, imagine the heads of the servers administrators when you will
inform them that the configuration of the queuing engine (polling, ...) is
embedded in the camel routes code. They will be very happy :-(

But, if the activemq broker is configured apart, does it make sense to
request to spring to instantiate a spring bean for
org.apache.camel.component.ActiveMQComponent with only one parameter create
broker - true/false ?



James.Strachan wrote:
 
 2009/3/13 cmoulliard cmoulli...@gmail.com:

 Hi,

 I would like to suggest the following modification for the Camel ActiveMq
 Component in order to allow camel (deployed top of an OSGI server like
 ServiceMix 4) to call an already installed ActiveMq broker.

 To use ActiveMq from Camel, the following bean must be instantiated by
 spring :

 bean id=activemq
 class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL value=vm://localhost:61616 /
 /bean

 This component is a kind of gateway who will proxy communication between
 the
 camel routes and the broker. If the instance of the broker does not exist
 (=
 is not started), then camel will instantiate it

 To tell to the component that it should not create an instance of
 activemq
 (because the broker has been started separately from this camel context
 as
 this is possible in SMX4), you must change the property of the url like
 this
 :

 bean id=activemq
 class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL value=vm://localhost:61616?create=false /
 /bean

 To avoid confusion for the user, I propose that we have a new property
 that
 we will use to inform the component if the broker already runs or not :

 bean id=activemq
 class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL value=vm://localhost:61616 /
   property name=runSeparately value=true /
 /bean
 
 Good idea. I'd maybe call it something like
 
 property name=createBrokerWithVmTransport value=false /
 
 as runSeparately is kinda vague and applies to different transports.
 
 
 The second modification that I propose concerns deployment of Camel top
 of
 an osgi server. In this case, I need your help because I'm not sure at
 100%
 about what I will say

 If my camel routes are deployed in an osgi bundle and have reference in
 the
 from or to uri to activemq, How camel will be able to find activemq :
 1) through the brokerUrl OR
 2) by passing the OSGI reference of the service who has instantiating
 activemq

 If we adopt the second strategy, the bean can be described like this
 ...

 bean id=activemq
 class=org.apache.activemq.camel.component.ActiveMQComponent
   property name=brokerURL/ -- it this case, it makes no sense to use
 the brokerUrl
   property name=osgiReference value=#activemqservice /
 /bean

 ...

 Maybe, we could simplify the syntax by removing this bean creation from
 the
 camel context in order to pass directly the osgi reference of the service
 in
 the route like

 camel:from uri=osgiref=activemq:queue:in /

 In this case, camel will create the bean
 org.apache.activemq.camel.component.ActiveMQComponent and find the
 activemq
 broker using the osgi reference of the service
 
 I guess it depends how much decoupling you want. You could expose
 individual camel endpoints into OSGi and then just refer to them via
 an OSGi URI that queries the OSGi registry for the endpoint. Using
 this approach the entire URI can be an OSGi registry name  filter
 etc.
 
 We can also do this today using the spring-dm XML to expose any
 endpoint created in a Camel XML into OSGi - then in the routing bundle
 by looking up the endpoint by OSGi query and associating it to a local
 ID we refer to in the camel route..
 
 Or we could refer to a component in OSGi using some prefix then let
 the remainder of the URI be the URI resolved on the component to get
 the endpoint. This latter approach is gonna mean a more noisy URI (as
 there's the OSGi lookup URI and the endpoint URI) so we might want to
 wrap that up as a bean with a few properties (the OSGI service name we
 look up, the OSGi query filter and the endpoint URI on the component
 once its resolved).
 
 
 Having said all that - I've often found the exact JMS configuration is
 kinda relevant to a route (e.g. is it using transactions?) so I'd
 recommend keeping the camel components with the routes just so its
 easier to understand if nothing else. However you might wanna share
 properties across bundles - such as the connection URL to activemq?
 
 --
 James
 ---
 http://macstrac.blogspot.com/
 
 Open Source Integration
 http://fusesource.com/
 
 


-
Charles Moulliard
SOA Architect

My Blog :  http

Re: Not possible to build camel-scala (2.0 SNASHOT)

2009-03-13 Thread cmoulliard

Problem sovled. It was due to a bad scala-compiler jar (maven repository)


cmoulliard wrote:
 
 Hi,
 
 When I try to build camel-scala, I receive the following error :
 
 D:\Dvlpt\Java\workspace-ganymede\apache-camel-source\components\camel-scalamvn
 clean install -Dtest=false
 [INFO] Scanning for projects...
 [INFO]
 
 [INFO] Building Camel :: Scala
 [INFO]task-segment: [clean, install]
 [INFO]
 
 [INFO] [clean:clean]
 [INFO] Deleting directory
 D:\Dvlpt\Java\workspace-ganymede\apache-camel-source\components\camel-scala\target
 [INFO] [resources:resources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [compiler:compile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [scala:compile {execution: default}]
 [ERROR]
 D:\Dvlpt\Java\workspace-ganymede\apache-camel-source\components\camel-scala\src\main\scala
 [INFO] Compiling 31 source files to
 D:\Dvlpt\Java\workspace-ganymede\apache-camel-source\components\camel-scala\target\classes
 [WARNING] java.lang.NoClassDefFoundError: scala/tools/nsc/Main
 [WARNING] Caused by: java.lang.ClassNotFoundException:
 scala.tools.nsc.Main
 [WARNING]   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 [WARNING]   at java.security.AccessController.doPrivileged(Native
 Method)
 [WARNING]   at
 java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 [WARNING]   at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 [WARNING]   at
 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 [WARNING]   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 [WARNING]   at
 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 [WARNING] Could not find the main class: scala.tools.nsc.Main.  Program
 will exit.
 [WARNING] Exception in thread main
 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO]
 
 [INFO] command line returned non-zero value:1
 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time: 8 seconds
 [INFO] Finished at: Tue Mar 10 12:11:43 CET 2009
 [INFO] Final Memory: 13M/24M
 [INFO]
 
 
 The jar of scala-compiler (version 2.7.2) containing the class mentioned
 is in my maven local repository.
 
 Regards,
 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Not-possible-to-build-camel-scala-%282.0-SNASHOT%29-tp22432177p22496899.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Camel 2.0 ActiveMq: connection refused (tcp://localhost:61616) !!

2009-03-09 Thread cmoulliard

Hi,

Can someone tell me why I receive the following error : 

2009-03-09 14:23:07,921 DEBUG TcpTransport - Stopping transport tcp://null:0 
2009-03-09 14:23:07,921 DEBUG DefaultMessageListenerContainer - Could not
establish shared JMS Connection - leaving it up to asynchronous invokers to
establish a Connection as soon as possible 
javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.ConnectException: Connection
refused: connect
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:280)
at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:224)
at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:172)
at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:125)
at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:110)
at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:81)
at
org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
at
org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:378)
at
org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(AbstractJmsListeningContainer.java:346)
at
org.springframework.jms.listener.DefaultMessageListenerContainer.establishSharedConnection(DefaultMessageListenerContainer.java:678)
at
org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:258)
at
org.springframework.jms.listener.AbstractJmsListeningContainer.initialize(AbstractJmsListeningContainer.java:171)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.initialize(AbstractPollingMessageListenerContainer.java:204)
at
org.springframework.jms.listener.DefaultMessageListenerContainer.initialize(DefaultMessageListenerContainer.java:459)
at
org.springframework.jms.listener.AbstractJmsListeningContainer.afterPropertiesSet(AbstractJmsListeningContainer.java:134)
at 
org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java:57)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
at
org.apache.camel.impl.RouteService.startChildService(RouteService.java:95)
at org.apache.camel.impl.RouteService.doStart(RouteService.java:79)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:744)
at
org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:165)
at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:95)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:114)
at
org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
at org.apache.camel.spring.Main.doStart(Main.java:186)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
at org.apache.camel.util.MainSupport.run(MainSupport.java:121)
at org.apache.camel.util.MainSupport.run(MainSupport.java:299)
at org.apache.camel.spring.Main.main(Main.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

Re: camel-cxf AXIS2 on SMX4

2009-03-05 Thread cmoulliard
 ] [   ] [   60] OPS4J Pax Web - Jsp Support (0.4.1)
[  58] [Active ] [   ] [   60] OPS4J Pax Web Extender - WAR (0.3.0)
[  59] [Active ] [   ] [   60] OPS4J Pax Web Extender - Whiteboard
(0.3.0)
[  60] [Active ] [   ] [   60] OPS4J Pax Url - war:, war-i: (0.3.2)
[  61] [Active ] [Started] [   60] Apache ServiceMix WAR Deployer
(4.0.0.m2-SNAPSHOT)
[  62] [Active ] [   ] [   60] Apache ServiceMix Bundles:
commons-dbcp-1.2.2 (1.2.2.1)
[  63] [Active ] [   ] [   60] Spring JMS (2.5.6)
[  64] [Active ] [   ] [   60] Apache ServiceMix Bundles:
FastInfoset-1.2.2 (1.2.2.1)
[  65] [Active ] [   ] [   60] Apache ServiceMix Bundles:
wss4j-1.5.4 (1.5.4.1)
[  66] [Active ] [   ] [   60] Apache ServiceMix Bundles:
xmlbeans-2.4.0 (2.4.0.1)
[  67] [Active ] [   ] [   60] Apache ServiceMix Bundles:
xmlresolver-1.2 (1.2.0.1)
[  68] [Active ] [   ] [   60] Apache ServiceMix Bundles:
xmlschema-1.4.2 (1.4.2.1)
[  69] [Active ] [   ] [   60] Apache ServiceMix Bundles: ant-1.7.0
(1.7.0.1)
[  70] [Active ] [   ] [   60] Commons Collections (3.2.1)
[  71] [Active ] [   ] [   60] Apache ServiceMix Bundles: jdom-1.1
(1.1.0.1)
[  72] [Active ] [   ] [   60] Apache ServiceMix Bundles:
werken-xpath-0.9.4 (0.9.4.1)
[  73] [Active ] [   ] [   60] Apache ServiceMix Bundles:
velocity-1.5 (1.5.0.1)
[  74] [Active ] [   ] [   60] Apache ServiceMix Bundles:
neethi-2.0.4 (2.0.4.1)
[  75] [Active ] [   ] [   60] Commons Lang (2.4)
[  76] [Active ] [   ] [   60] Apache ServiceMix Bundles:
abdera-0.4.0-incubating (0.4.0.incubating_1)
[  77] [Active ] [   ] [   60] Apache ServiceMix Bundles: junit-4.4
(4.4.0.1)
[  78] [Active ] [   ] [   60] Apache ServiceMix Specs :: JAVAMAIL
API 1.4 (1.2.0)
[  79] [Active ] [   ] [   60] geronimo-jms_1.1_spec (1.1.1)
[  80] [Active ] [   ] [   60] Apache ServiceMix Bundles:
antlr-3.0.1 (3.0.1.1)
[  81] [Active ] [   ] [   60] Apache ServiceMix Bundles:
commons-io-1.3.2 (1.3.2.1)
[  82] [Active ] [   ] [   60] Apache ServiceMix Specs :: JAXWS API
2.1 (1.2.0)
[  83] [Active ] [   ] [   60] Apache ServiceMix Specs :: SAAJ API
1.3 (1.2.0)
[  84] [Active ] [   ] [   60] Apache ServiceMix Bundles:
wsdl4j-1.6.1 (1.6.1.1)
[  85] [Active ] [   ] [   60] geronimo-ws-metadata_2.0_spec (1.1.2)
[  86] [Active ] [   ] [   60] ObjectWeb ASM (2.2.3)
[  87] [Active ] [   ] [   60] Apache CXF Bundle Jar
(2.2.0.SNAPSHOT)
[  88] [Active ] [   ] [   60] Apache ServiceMix Bundles:
xmlsec-1.3.0 (1.3.0.1)
[  89] [Active ] [   ] [   60] camel-cxf (2.0.0.SNAPSHOT)

Thanks for your help.

Charles

gnodet wrote:
 
 If you create your bundle using maven and the maven bundle plugin, add the
 following to the plugin configuraiton:
 
 plugin
 groupIdorg.apache.felix/groupId
 artifactIdmaven-bundle-plugin/artifactId
 configuration
 instructions
 ...
 
 Require-Bundleorg.apache.cxf.cxf-bundle/Require-Bundle
/instructions
 
 It will ensure that your bundle is not started before the cxf one is
 installed.
 Hopefully it will solve the problem.
 
 On Thu, Mar 5, 2009 at 10:30, cmoulliard cmoulli...@gmail.com wrote:
 

 Guillaume,

 Can you explain please what you propose that I do ?

 Could you try adding a Require-Bundle to the cxf
 bundle on your own bundle that fail ? 


 gnodet wrote:
 
  Got an idea.  It may happen that your bundle has been started before
 the
  CXF
  bundle was started.   Could you try adding a Require-Bundle to the cxf
  bundle on your own bundle that fail ?
 
  On Wed, Mar 4, 2009 at 18:00, Guillaume Nodet gno...@gmail.com wrote:
 
  The JAX-WS spec should have picked up the CXF bundle as a provider.
  Could you rerun your example after setting the following system
 property
  (in etc/system.properties for example)
 org.apache.servicemix.specs.debug=true
  This should give infos about the specs.  Can you paste those log
  statements
  please ?
 
 
  On Wed, Mar 4, 2009 at 17:40, cmoulliard cmoulli...@gmail.com wrote:
 
 
  Here is the list guillaume
 
  START LEVEL 100
ID   State Spring Level  Name
  [   0] [Active ] [   ] [0] System Bundle (1.5.0.SNAPSHOT)
  [   1] [Active ] [   ] [   10] Apache Felix Prefrences
 Service
  (1.0.2)
  [   2] [Active ] [   ] [   10] geronimo-annotation_1.0_spec
  (1.1.1)
  [   3] [Active ] [   ] [   10] OSGi R4 Compendium Bundle
 (4.1.0)
  [   4] [Active ] [   ] [   10] Apache ServiceMix Bundles:
  jaxp-ri-1.4.2 (1.4.2.1)
  [   5] [Active ] [   ] [   10] Apache Felix Configuration
 Admin
  Service (1.0.4)
  [   6] [Active ] [   ] [   10] geronimo-servlet_2.5_spec
 (1.1.2)
  [   7] [Active ] [   ] [   10] Apache ServiceMix Specs ::
 JAXP
  API
  1.4

Re: camel-cxf endpoint - error : Failed to convert property value of type ...

2009-03-04 Thread cmoulliard

I have found the error. This is because the address of the cxf endpoint is
defined like this : /incident and not like
http://localhost:8080/camel-exemple/incident


cmoulliard wrote:
 
 The issue is solved but 
 
 I have the following error now :
 
 2009-03-04 13:25:55,115 DEBUG DefaultListableBeanFactory - Returning
 cached instance of singleton bean
 'org.apache.cxf.binding.soap.SoapTransportFactory' 
 04-mars-2009 13:25:55
 org.apache.cxf.service.factory.ReflectionServiceFactoryBean
 initializeWSDLOperations
 ATTENTION: Could not find a matching method for operation
 {http://reportincident.example.camel.apache.org}ReportIncident. Operation
 will be unavailable.
 2009-03-04 13:25:55,600 ERROR MainSupport - Failed:
 org.apache.cxf.service.factory.ServiceConstructionException 
 org.apache.cxf.service.factory.ServiceConstructionException
   at
 org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:139)
   at
 org.apache.camel.component.cxf.CxfConsumer.init(CxfConsumer.java:102)
   at
 org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:95)
   at
 org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:62)
   at org.apache.camel.Route.getServicesForRoute(Route.java:74)
   at org.apache.camel.impl.RouteService.doStart(RouteService.java:77)
   at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
   at
 org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:743)
   at
 org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:165)
   at
 org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160)
   at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
   at
 org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:95)
   at
 org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:114)
   at
 org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
   at
 org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at
 org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
   at
 org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
   at
 org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
   at
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
   at
 org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
   at
 org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93)
   at
 org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
   at org.apache.camel.spring.Main.doStart(Main.java:186)
   at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
   at org.apache.camel.util.MainSupport.run(MainSupport.java:121)
   at org.apache.camel.util.MainSupport.run(MainSupport.java:299)
   at org.apache.camel.spring.Main.main(Main.java:98)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:396)
   at java.lang.Thread.run(Thread.java:619)
 Caused by: java.net.MalformedURLException: no protocol: /incident
   at java.net.URL.init(URL.java:567)
   at java.net.URL.init(URL.java:464)
   at java.net.URL.init(URL.java:413)
   at
 org.apache.cxf.transport.http_jetty.JettyHTTPDestination.init(JettyHTTPDestination.java:91)
   at
 org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDestination(JettyHTTPTransportFactory.java:116)
   at
 org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestination(JettyHTTPTransportFactory.java:103)
   at 
 org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
   at org.apache.cxf.endpoint.ServerImpl.init(ServerImpl.java:69)
   at
 org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:118)
   ... 32 more
 
 
 
 
 William Tam wrote:
 
 I submitted a fix (Committed revision 749772).  Let me know if you see
 other issues.  Thanks.
 
 Cheers,
 William
 
 On Tue, Mar 3, 2009 at 3:36 PM, William Tam email.w...@gmail.com wrote:
 I'm looking into it.

 https://issues.apache.org/activemq/browse/CAMEL-1416


 On Tue, Mar 3, 2009 at 12:08 PM, Claus Ibsen claus.ib...@gmail.com
 wrote:
 Hi

Re: Camel 2.0-snapshot deployed on SMKNL4 - There are 2 parameters that couldn't be set on the endpoint

2009-03-03 Thread cmoulliard

OK. By the way it works fine with absolute paths.


Claus Ibsen-2 wrote:
 
 The problem is that you mix and match absolute with relative.
 
 I will add a fix but you should also use absolute paths for the move
 expression as a workaround.
 
 
 On Tue, Mar 3, 2009 at 10:16 AM, cmoulliard cmoulli...@gmail.com wrote:

 Hi claus,

 I receive the following error :

 2009-03-03 10:09:41,859 ERROR FileConsumer -
 java.lang.NullPointerException
        at
 org.apache.camel.component.file.GenericFile.changeFileName(GenericFile.java:119)
        at
 org.apache.camel.component.file.strategy.GenericFileExpressionRenamer.renameFile(GenericFileExpressionRenamer.java:41)
        at
 org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:57)
        at
 org.apache.camel.component.file.GenericFileConsumer.processStrategyCommit(GenericFileConsumer.java:231)
        at
 org.apache.camel.component.file.GenericFileConsumer$1.done(GenericFileConsumer.java:185)
        at
 org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:57)
        at
 org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:74)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
        at
 org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
        at
 org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:170)
        at
 org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
        at
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
        at
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

 with the following configuration :

 from uri=file://d:/temp/data/?moveExpression=../done/${file:name} /

 Any idea ?

 Regards,


 Claus Ibsen-2 wrote:

 Hi

 The option for file have changed in camel 2.0. See:
 http://camel.apache.org/file2.html

 All the pre/postfix etc. is based on expressions now. So it should be
 something like this:
 moveExpression=../done/${file:name}
 preMoveExpression=inprogress/${file:name}



 On Mon, Mar 2, 2009 at 5:40 PM, cmoulliard cmoulli...@gmail.com wrote:

 Hi,

 The following error is reported when I deploy a camel project on
 Service
 Mix
 Kernel 1.1.0 snashot where Camel-2.0 SNAPSHOT osgi bundle is deployed ?

 17:36:17,640 | ERROR | xtenderThread-15 |
 OsgiBundleXmlApplicationContext
  |
 gatedExecutionApplicationContext  366 | Post refresh error
 org.apache.camel.ResolveEndpointFailedException: Failed to resolve
 endpoint:
 file://d:/temp/data/?preMoveNamePrefix=inprogress/moveNamePrefix=../done/
 due to: org.apache.camel.ResolveEndpointFailedException: Failed to
 resolve
 endpoint:
 file://d:/temp/data/?preMoveNamePrefix=inprogress/moveNamePrefix=../done/
 due to: There are 2 parameters that couldn't be set on the endpoint.
 Check
 the uri if the parameters are spelt correctly and that they are
 properties
 of the endpoint. Unknown parameters=[{moveNamePrefix=../done/,
 preMoveNamePrefix=inprogress/}]
        at
 org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:356)
        at
 org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:55)
        at
 org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:133)
        at
 org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:103)
        at
 org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:109)
        at
 org.apache.camel.model.FromType.resolveEndpoint(FromType.java:72)
        at
 org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:78)
        at
 org.apache.camel.model.RouteType.addRoutes(RouteType.java:302

Re: Camel 2.0-snapshot deployed on SMKNL4 - There are 2 parameters that couldn't be set on the endpoint

2009-03-03 Thread cmoulliard

I don't if this point must be fixed or not but when a file already exist in
the 'done' directory, then the following error is generated :

2009-03-03 10:34:00,937 ERROR FileConsumer - Cannot rename file:
GenericFile[d:\temp\data\csv.txt] to: GenericFile[d:\temp\done\csv.txt] 
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
rename file: GenericFile[d:\temp\data\csv.txt] to:
GenericFile[d:\temp\done\csv.txt]
at
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.renameFile(GenericFileRenameProcessStrategy.java:82)
at
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:58)
at
org.apache.camel.component.file.GenericFileConsumer.processStrategyCommit(GenericFileConsumer.java:231)
at
org.apache.camel.component.file.GenericFileConsumer$1.done(GenericFileConsumer.java:185)
at
org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:57)
at
org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:74)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
at
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:170)
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)




cmoulliard wrote:
 
 OK. By the way it works fine with absolute paths.
 
 
 Claus Ibsen-2 wrote:
 
 The problem is that you mix and match absolute with relative.
 
 I will add a fix but you should also use absolute paths for the move
 expression as a workaround.
 
 
 On Tue, Mar 3, 2009 at 10:16 AM, cmoulliard cmoulli...@gmail.com wrote:

 Hi claus,

 I receive the following error :

 2009-03-03 10:09:41,859 ERROR FileConsumer -
 java.lang.NullPointerException
        at
 org.apache.camel.component.file.GenericFile.changeFileName(GenericFile.java:119)
        at
 org.apache.camel.component.file.strategy.GenericFileExpressionRenamer.renameFile(GenericFileExpressionRenamer.java:41)
        at
 org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:57)
        at
 org.apache.camel.component.file.GenericFileConsumer.processStrategyCommit(GenericFileConsumer.java:231)
        at
 org.apache.camel.component.file.GenericFileConsumer$1.done(GenericFileConsumer.java:185)
        at
 org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:57)
        at
 org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:74)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
        at
 org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
        at
 org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:170)
        at
 org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
        at
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
        at
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at
 java.util.concurrent.FutureTask

Re: Camel 2.0-snapshot deployed on SMKNL4 - There are 2 parameters that couldn't be set on the endpoint

2009-03-03 Thread cmoulliard

You are right ;-) The file was locked by another application.


Claus Ibsen-2 wrote:
 
 It is trying to delete the file first. Are you sure its not locked or
 something by another app.
 
 Could you try again and be sure the existing file is not open by some
 other apps.
 
 
 On Tue, Mar 3, 2009 at 10:36 AM, cmoulliard cmoulli...@gmail.com wrote:

 I don't if this point must be fixed or not but when a file already exist
 in
 the 'done' directory, then the following error is generated :

 2009-03-03 10:34:00,937 ERROR FileConsumer - Cannot rename file:
 GenericFile[d:\temp\data\csv.txt] to: GenericFile[d:\temp\done\csv.txt]
 org.apache.camel.component.file.GenericFileOperationFailedException:
 Cannot
 rename file: GenericFile[d:\temp\data\csv.txt] to:
 GenericFile[d:\temp\done\csv.txt]
        at
 org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.renameFile(GenericFileRenameProcessStrategy.java:82)
        at
 org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:58)
        at
 org.apache.camel.component.file.GenericFileConsumer.processStrategyCommit(GenericFileConsumer.java:231)
        at
 org.apache.camel.component.file.GenericFileConsumer$1.done(GenericFileConsumer.java:185)
        at
 org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:57)
        at
 org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:74)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
        at
 org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
        at
 org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:170)
        at
 org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
        at
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
        at
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)




 cmoulliard wrote:

 OK. By the way it works fine with absolute paths.


 Claus Ibsen-2 wrote:

 The problem is that you mix and match absolute with relative.

 I will add a fix but you should also use absolute paths for the move
 expression as a workaround.


 On Tue, Mar 3, 2009 at 10:16 AM, cmoulliard cmoulli...@gmail.com
 wrote:

 Hi claus,

 I receive the following error :

 2009-03-03 10:09:41,859 ERROR FileConsumer -
 java.lang.NullPointerException
        at
 org.apache.camel.component.file.GenericFile.changeFileName(GenericFile.java:119)
        at
 org.apache.camel.component.file.strategy.GenericFileExpressionRenamer.renameFile(GenericFileExpressionRenamer.java:41)
        at
 org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:57)
        at
 org.apache.camel.component.file.GenericFileConsumer.processStrategyCommit(GenericFileConsumer.java:231)
        at
 org.apache.camel.component.file.GenericFileConsumer$1.done(GenericFileConsumer.java:185)
        at
 org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:57)
        at
 org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:74)
        at
 org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
        at
 org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
        at
 org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52

Re: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.GenericFileMessage to the required type - SMX4 !

2009-03-03 Thread cmoulliard
)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93)
at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
at org.apache.camel.spring.Main.doStart(Main.java:186)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
at org.apache.camel.util.MainSupport.run(MainSupport.java:121)
at org.apache.camel.util.MainSupport.run(MainSupport.java:299)
at org.apache.camel.spring.Main.main(Main.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:396)
at java.lang.Thread.run(Thread.java:619)
[INFO] --

2) The schema  location must be :

http://camel.apache.org/schema/osgi
http://camel.apache.org/schema/osgi/camel-osgi-2.0-SNAPSHOT.xsd

and not :

http://camel.apache.org/schema/osgi
http://camel.apache.org/schema/osgi/camel-osgi.xsd

Regards,

Charles

willem.jiang wrote:
 
 Hi
 
 I just wrote a test to check the fallback converter's loading the
 registering. Every thing looks good.
 
 So I guess there are some thing wrong with the setting up of
 OsgiAnnotationTypeConverterLoader.
 
 @Charles, Can you change your camel context like this ?
 
 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:camel=http://camel.apache.org/schema/spring;
 xsi:schemaLocation=
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://camel.apache.org/schema/osgi
  http://camel.apache.org/schema/osgi/camel-osgi.xsd;
  http://camel.apache.org/schema/spring
  http://camel.apache.org/schema/spring/camel-spring.xsd;
 
   bean id=bindyDataformat
 
 class=org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat
   constructor-arg type=java.lang.String
 value=com.xpectis.camel.bindy.model/
   /bean
 
   bean id=csv class=com.xpectis.camel.bindy.csv.CsvBean /
 
   camelContext xmlns=http://camel.apache.org/schema/osgi;
 
   camel:packagecom.xpectis.camel.bindy.routing/camel:package
 
   camel:route
 camel:from uri=file://d:/temp/data/?noop=true /
 camel:unmarshal ref=bindyDataformat/
 camel:to uri=bean:csv /
   /camel:route
 
 
   /camelContext
 
 /beans
 
 Willem
 
 Claus Ibsen wrote:
 Hi
 
 The @FallbackConverter type converter should kick in, when you use
 file based components
 
 Willem is there something there that needs to be done in camel-osgi
 for registering fallback converteres as well?
 
 
 
 On Mon, Mar 2, 2009 at 5:16 PM, cmoulliard cmoulli...@gmail.com wrote:
 Yes Willem,

 Here it is :

 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://camel.apache.org/schema/spring
 http

Re: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.GenericFileMessage to the required type - SMX4 !

2009-03-03 Thread cmoulliard
:
 Hi
 
 The @FallbackConverter type converter should kick in, when you use
 file based components
 
 Willem is there something there that needs to be done in camel-osgi
 for registering fallback converteres as well?
 
 
 
 On Mon, Mar 2, 2009 at 5:16 PM, cmoulliard cmoulli...@gmail.com wrote:
 Yes Willem,

 Here it is :

 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://camel.apache.org/schema/spring
 http://camel.apache.org/schema/spring/camel-spring.xsd;

bean id=bindyDataformat
 
 class=org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat
  constructor-arg type=java.lang.String
 value=com.xpectis.camel.bindy.model/
/bean

bean id=csv class=com.xpectis.camel.bindy.csv.CsvBean /

camelContext xmlns=http://camel.apache.org/schema/spring;

packagecom.xpectis.camel.bindy.routing/package

route
  from uri=file://d:/temp/data/?noop=true /
  unmarshal ref=bindyDataformat/
  to uri=bean:csv /
/route


/camelContext

 /beans

 Remark : I work with camel 2.0-SNAPSHOT.

 Regards,

 Charles


 willem.jiang wrote:
 Hi Charles,

 What kind of camel context did you create?
 Can  you show me the Spring configuration file or the DSL rule?


 Willem


 On Mon, Mar 2, 2009 at 11:01 PM, cmoulliard cmoulli...@gmail.com
 wrote:

 Hi,

 I have a small camel - bindy project running perfectly in Eclipse or
 when
 launched using command camel:run but when I deploy it on Servicemix
 Kernel
 4, I receive the following error :

 15:48:05,936 | ERROR | ompon...@1cb1d37 | DeadLetterChannel
  |
 rg.apache.camel.processor.Logger  207 | Failed delivery for
 exchangeId:
 ID-dell-charles-2356-1236005216593-0-1. On delivery attempt: 0 caught:
 org.apache.camel.NoTypeConversionAvailableException: No type converter
 available to convert from type:
 org.apache.camel.component.file.GenericFileMessage to the required
 type:
 java.io.InputStream with value GenericFileMessage:
 GenericFile[d:\temp\data\csv.txt]
 org.apache.camel.NoTypeConversionAvailableException: No type converter
 available to convert from type:
 org.apache.camel.component.file.GenericFileMessage to the required
 type:
 java.io.InputStream with value GenericFileMessage:
 GenericFile[d:\temp\data\csv.txt]
at

 org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:126)
at

 org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:74)
at
 org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:70)
at
 org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:51)
at

 org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:135)
at

 org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:44)
at

 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80)
at

 org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:194)
at

 org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:129)
at
 org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
at
 org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
at

 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
at

 org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
at

 org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
at

 org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
at

 org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:170)
at

 org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
at

 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
at
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at

 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at

 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at

 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run

Re: Persist messages body between different endpoints ?

2009-02-19 Thread cmoulliard

Claus,

Will the lock on the file removed when the process will reached the last
step route - so in this case, when the messages will go to the queue : xx ? 

Can you confirm or infirm this ?

Does it makes sense to design the route like this to avoid to lost messages
and objects ?

from(file=).unmarshal().(activemq:queue:xx) 

from(activemq:queue:xx).to(bean=A).to(activemq:queue:xx)

from(activemq:queue:xx).to(bean=B).to(activemq:queue:xx) 

from(activemq:queue:xx).to(bean=C).to(activemq:queue:xx)

Regards,


cmoulliard wrote:
 
 Hi,
 
 I would like to know if a persisting (like serialization of messages)
 exist and can be activated easily between different endpoints ?
 
 Let's see what I'm thinking about with an example
 
 from(file=).unmarshal().to(bean=A).to(bean=B).to(bean=C).to(activemq:queue:xx)
 
 In this routing, the content of a file is unmarshaled and the objects
 created will go to different endpoints (bean A, B and C) encapsulated in
 the body of messages. If something occurs during the processing of the
 messages, then the messages/objects will be lost (e.g. this situation can
 occur in case of system crash, exception raised during process execution
 inside a bean)
 
 Is there a mechanism that we can use to persist java objects and restore
 them in case of server crash or exception (like the mechanism that we have
 in EJB, ...)
 
 Regards 
 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Persist-messages-body-between-different-endpoints---tp22079859s22882p22103322.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Persist messages body between different endpoints ?

2009-02-18 Thread cmoulliard

Hi,

I would like to know if a persisting (like serialization of messages) exist
and can be activated easily between different endpoints ?

Let's see what I'm thinking about with an example

from(file=).unmarshal().to(bean=A).to(bean=B).to(bean=C).to(activemq:queue:xx)

In this routing, the content of a file is unmarshaled and the objects
created will go to different endpoints (bean A, B and C) encapsulated in the
body of messages. If something occurs during the processing of the messages,
then the messages/objects will be lost (e.g. this situation can occur in
case of system crash, exception raised during process execution inside a
bean)

Is there a mechanism that we can use to persist java objects and restore
them in case of server crash or exception (like the mechanism that we have
in EJB, ...)

Regards 

-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Persist-messages-body-between-different-endpoints---tp22079859s22882p22079859.html
Sent from the Camel - Users mailing list archive at Nabble.com.