Re: org.apache.camel.FailedToCreateRouteException: Failed to create route with SNMP component

2015-08-13 Thread Claus Ibsen
Hi

If you build your own big/uber JAR see this FAQ
http://camel.apache.org/how-do-i-use-a-big-uber-jar.html

On Wed, Aug 12, 2015 at 5:06 PM, jspyeatt john.pye...@singlewire.com wrote:
 It's actually weirder than first appeared.
 I do have camel-snmp included in the pom.xml file. I should have mentioned
 that in my original post.

 I'm beginning to think it's a classloader issue... Oh joy..

 Because everything works fine when I run the application within IntelliJ.
 But when I make it an executable jar file using maven assembly module it
 can't find the converter.

 SNMP traps work fine in both cases. So I know the snmp component is being
 successfully included. It's just when I try to create the SNMP polling
 route.

 So my question seems to be more fundamental. How is camel locating classes
 with the @Converter annotation.

 Also, it seems to find other @Converters just fine. Example the one in
 camel-mail.



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341p5770615.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: org.apache.camel.FailedToCreateRouteException: Failed to create route with SNMP component

2015-08-13 Thread jspyeatt
That did the trick.
Thanks loads.



--
View this message in context: 
http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341p5770704.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: org.apache.camel.FailedToCreateRouteException: Failed to create route with SNMP component

2015-08-12 Thread jspyeatt
It's actually weirder than first appeared.
I do have camel-snmp included in the pom.xml file. I should have mentioned
that in my original post.

I'm beginning to think it's a classloader issue... Oh joy..

Because everything works fine when I run the application within IntelliJ.
But when I make it an executable jar file using maven assembly module it
can't find the converter.

SNMP traps work fine in both cases. So I know the snmp component is being
successfully included. It's just when I try to create the SNMP polling
route.

So my question seems to be more fundamental. How is camel locating classes
with the @Converter annotation.

Also, it seems to find other @Converters just fine. Example the one in
camel-mail.



--
View this message in context: 
http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341p5770615.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: org.apache.camel.FailedToCreateRouteException: Failed to create route with SNMP component

2015-06-23 Thread Stephan Burkard
The exception says that your oids parameter cannot be converted from
String to OIDList because there is no converter available.

Make sure you have the camel-snmp component in your class path. I guess the
needed converter is in this component.

dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-snmp/artifactId
versionx.x.x/version
!-- use the same version as your Camel core version --
/dependency

Stephan




On Wed, Jun 17, 2015 at 9:16 PM, jspyeatt john.pye...@singlewire.com
wrote:

 I'm using Camel 2.15.2 and suddenly find that context.addRoutes() is
 throwing
 the following exception.

 org.apache.camel.FailedToCreateRouteException: Failed to create route
 SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1.2.201:
 Route(SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1 because of
 Failed to resolve endpoint:
 *snmp://
 172.30.227.153:161?delay=6oids=1.3.6.1.4.1.17491.1.1.2.1.2.201protocol=udpretries=2snmpCommunity=privatesnmpVersion=0type=POLL*
 due to: *Could not find a suitable setter for property: oids as there isn't
 a setter method with same type: java.lang.String nor type conversion
 possible:* No type converter available to convert from type:
 java.lang.String to the required type:
 org.apache.camel.component.snmp.OIDList with value
 1.3.6.1.4.1.17491.1.1.2.1.2.201

 The context is already running and looking at the documentation here
 http://camel.apache.org/snmp.html http://camel.apache.org/snmp.html
  and
 everything appears correct.

 I'm just using the DefaultCamelContext and trying to do a simple
 context.addRoutes() call.

 Any ideas?



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



org.apache.camel.FailedToCreateRouteException: Failed to create route with SNMP component

2015-06-17 Thread jspyeatt
I'm using Camel 2.15.2 and suddenly find that context.addRoutes() is throwing
the following exception.

org.apache.camel.FailedToCreateRouteException: Failed to create route
SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1.2.201:
Route(SNMPPoll:udp:172.30.227.153:1.3.6.1.4.1.17491.1.1.2.1 because of
Failed to resolve endpoint:
*snmp://172.30.227.153:161?delay=6oids=1.3.6.1.4.1.17491.1.1.2.1.2.201protocol=udpretries=2snmpCommunity=privatesnmpVersion=0type=POLL*
due to: *Could not find a suitable setter for property: oids as there isn't
a setter method with same type: java.lang.String nor type conversion
possible:* No type converter available to convert from type:
java.lang.String to the required type:
org.apache.camel.component.snmp.OIDList with value
1.3.6.1.4.1.17491.1.1.2.1.2.201

The context is already running and looking at the documentation here 
http://camel.apache.org/snmp.html http://camel.apache.org/snmp.html   and
everything appears correct.

I'm just using the DefaultCamelContext and trying to do a simple
context.addRoutes() call.

Any ideas?



--
View this message in context: 
http://camel.465427.n5.nabble.com/org-apache-camel-FailedToCreateRouteException-Failed-to-create-route-with-SNMP-component-tp5768341.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Failed to create route on activemq

2015-03-25 Thread Jonasty
I have following code: 

context.addRoutes(new RouteBuilder() { 
public void configure() throws JMSException { 
from(activemq:queue:KBC?noop=true).process(new
QueueProcessor()); 
} 
}); 

The queueprocessor writes a log to the database. I want to monitor messqges
on the queue. So I don't want to purge them. Only notify when they go in and
when they go out. 
For the file system there exist a noop property. This actualy doesn't work
for activemq because I get folowwing error: 

exception: Failed to create route route1:
Route(route1)[[From[activemq:queue:KBC?noop=true]] - [proce... because of
Failed to resolve endpoint: activemq://queue:KBC?noop=true due to: Failed to
resolve endpoint: activemq://queue:KBC?noop=true due to: There are 1
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=[{noop=true}] 

So what should I do? What is the variant of noop for activemq? 
Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-on-activemq-tp5764743.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Failed to create route on activemq

2015-03-25 Thread Claus Ibsen
The activemq (or jms) component do not have a option named noop

The options is listed here
http://camel.apache.org/jms

For monitoring ActiveMQ you can check its website, there is a search
box you can type in keywords and find links to read first.
http://activemq.apache.org/

On Wed, Mar 25, 2015 at 10:14 AM, Jonasty jonas.audena...@gmail.com wrote:
 I have following code:

 context.addRoutes(new RouteBuilder() {
 public void configure() throws JMSException {
 from(activemq:queue:KBC?noop=true).process(new
 QueueProcessor());
 }
 });

 The queueprocessor writes a log to the database. I want to monitor messqges
 on the queue. So I don't want to purge them. Only notify when they go in and
 when they go out.
 For the file system there exist a noop property. This actualy doesn't work
 for activemq because I get folowwing error:

 exception: Failed to create route route1:
 Route(route1)[[From[activemq:queue:KBC?noop=true]] - [proce... because of
 Failed to resolve endpoint: activemq://queue:KBC?noop=true due to: Failed to
 resolve endpoint: activemq://queue:KBC?noop=true due to: There are 1
 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=[{noop=true}]

 So what should I do? What is the variant of noop for activemq?
 Thanks



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Failed-to-create-route-on-activemq-tp5764743.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Failed to create route

2014-01-03 Thread fkfausa
Thank's guy's. Your comments made me realize that i lacked beans. One of them
was required that set up the transaction policy. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-tp5745435p5745476.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Failed to create route

2014-01-02 Thread fkfausa
Hi!

I get the following error:
Caused by: org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
BAS.G8.workorders.processJMSMessageRoute at:  Policy[ref:required]  in
route: Route[[From[activemq:queue:bas-integration.workorders.incomi...
because of No bean could be found in the registry for: required of type:
org.apache.camel.spi.Policy

from this route:

private void processJMSMessage() {

   
from(activemq:queue:bas-integration.workorders.incomingFromISCustomer).
id(BAS.G8.workorders.processJMSMessageRoute).
   
errorHandler(deadLetterChannel(activemq:queue:bas-integration.workorders.deadLetter).
useOriginalMessage().
logHandled(true)).
end().
onException(ConnectException.class).
maximumRedeliveries(2).
backOffMultiplier(2).
redeliveryDelay(5000).
useOriginalMessage().
logExhausted(true).
logHandled(true).
logRetryStackTrace(true).
logStackTrace(true).
handled(true).
log(Putting message back to
'activemq:queue:bas-integration.workorders.incomingFromISCustomer' due to a
ConnectionException. Server is probably down).
   
to(activemq:queue:bas-integration.workorders.incomingFromISCustomer).
end().
transacted(required).
choice().
   
when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.WorkOrderInitiatedEvent-v1+xml)).
process(extractWorkOrderInitiatedEvent).
   
when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.WorkOrderUpdatedEvent-v1+xml)).
process(extractWorkOrderUpdatedEvent).
   
when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.TechnicianWorkOrderUpdatedEvent-v1+xml)).
process(extractTechnicianWorkOrderUpdatedEvent).
end().
to(bean://getTechnicianOrderProcessor?method=process).
choice().
when(header(TechnicianOrder).isNotNull()).
log(LoggingLevel.DEBUG, Work Order Event will be handled by
this integration since technician order data exists for this work order).
to(bean://getActorAssetProcessor?method=process).
to(bean://getWorkOrderDetailsProcessor?method=process).
   
to(bean://createXellentCI_WorkOrderSoapRequestProcessor?method=process).
   
to(bean://sendXellentCI_WorkOrderSoapRequestProcessor?method=process).
otherwise().
log(LoggingLevel.DEBUG, Work Order Event will NOT be
handled by this integration since NO technician order data exists for this
work order).
end().
log(LoggingLevel.DEBUG, Successful routing);
}

Any suggestions on what the error is telling me?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-tp5745435.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Failed to create route

2014-01-02 Thread Claus Ibsen
Hi

required is implied. So try changing

transacted(required).

to ...

transacted().



On Thu, Jan 2, 2014 at 1:45 PM, fkfausa frode.fa...@cgi.com wrote:
 Hi!

 I get the following error:
 Caused by: org.apache.camel.RuntimeCamelException:
 org.apache.camel.FailedToCreateRouteException: Failed to create route
 BAS.G8.workorders.processJMSMessageRoute at:  Policy[ref:required]  in
 route: Route[[From[activemq:queue:bas-integration.workorders.incomi...
 because of No bean could be found in the registry for: required of type:
 org.apache.camel.spi.Policy

 from this route:

 private void processJMSMessage() {


 from(activemq:queue:bas-integration.workorders.incomingFromISCustomer).
 id(BAS.G8.workorders.processJMSMessageRoute).

 errorHandler(deadLetterChannel(activemq:queue:bas-integration.workorders.deadLetter).
 useOriginalMessage().
 logHandled(true)).
 end().
 onException(ConnectException.class).
 maximumRedeliveries(2).
 backOffMultiplier(2).
 redeliveryDelay(5000).
 useOriginalMessage().
 logExhausted(true).
 logHandled(true).
 logRetryStackTrace(true).
 logStackTrace(true).
 handled(true).
 log(Putting message back to
 'activemq:queue:bas-integration.workorders.incomingFromISCustomer' due to a
 ConnectionException. Server is probably down).

 to(activemq:queue:bas-integration.workorders.incomingFromISCustomer).
 end().
 transacted(required).
 choice().

 when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.WorkOrderInitiatedEvent-v1+xml)).
 process(extractWorkOrderInitiatedEvent).

 when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.WorkOrderUpdatedEvent-v1+xml)).
 process(extractWorkOrderUpdatedEvent).

 when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.TechnicianWorkOrderUpdatedEvent-v1+xml)).
 process(extractTechnicianWorkOrderUpdatedEvent).
 end().
 to(bean://getTechnicianOrderProcessor?method=process).
 choice().
 when(header(TechnicianOrder).isNotNull()).
 log(LoggingLevel.DEBUG, Work Order Event will be handled by
 this integration since technician order data exists for this work order).
 to(bean://getActorAssetProcessor?method=process).
 to(bean://getWorkOrderDetailsProcessor?method=process).

 to(bean://createXellentCI_WorkOrderSoapRequestProcessor?method=process).

 to(bean://sendXellentCI_WorkOrderSoapRequestProcessor?method=process).
 otherwise().
 log(LoggingLevel.DEBUG, Work Order Event will NOT be
 handled by this integration since NO technician order data exists for this
 work order).
 end().
 log(LoggingLevel.DEBUG, Successful routing);
 }

 Any suggestions on what the error is telling me?



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Failed-to-create-route-tp5745435.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io


Re: Failed to create route

2014-01-02 Thread kraythe .
You have to register a transaction policy in the registry and with the
transaction manager. In straight java it looks like this.

final JmsTransactionManager txMgr = new JmsTransactionManager(amqcf);
registry.bind(KEY_AMQ_TXMANAGER, txMgr);
final SpringTransactionPolicy txPolicyRequired =
newSpringTransactionPolicy();
txPolicyRequired.setTransactionManager(txMgr);
txPolicyRequired.setPropagationBehaviorName(PROPAGATION_REQUIRED);
registry.bind(KEY_TXPOLICY_REQUIRED, txPolicyRequired);

It can also be done with spring. Refer to this page for more information:

http://camel.apache.org/transactional-client.html

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
http://www.linkedin.com/pub/robert-simmons/40/852/a39*


On Thu, Jan 2, 2014 at 6:45 AM, fkfausa frode.fa...@cgi.com wrote:

 Hi!

 I get the following error:
 Caused by: org.apache.camel.RuntimeCamelException:
 org.apache.camel.FailedToCreateRouteException: Failed to create route
 BAS.G8.workorders.processJMSMessageRoute at:  Policy[ref:required] 
 in
 route: Route[[From[activemq:queue:bas-integration.workorders.incomi...
 because of No bean could be found in the registry for: required of type:
 org.apache.camel.spi.Policy

 from this route:

 private void processJMSMessage() {


 from(activemq:queue:bas-integration.workorders.incomingFromISCustomer).
 id(BAS.G8.workorders.processJMSMessageRoute).


 errorHandler(deadLetterChannel(activemq:queue:bas-integration.workorders.deadLetter).
 useOriginalMessage().
 logHandled(true)).
 end().
 onException(ConnectException.class).
 maximumRedeliveries(2).
 backOffMultiplier(2).
 redeliveryDelay(5000).
 useOriginalMessage().
 logExhausted(true).
 logHandled(true).
 logRetryStackTrace(true).
 logStackTrace(true).
 handled(true).
 log(Putting message back to
 'activemq:queue:bas-integration.workorders.incomingFromISCustomer' due to a
 ConnectionException. Server is probably down).

 to(activemq:queue:bas-integration.workorders.incomingFromISCustomer).
 end().
 transacted(required).
 choice().


 when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.WorkOrderInitiatedEvent-v1+xml)).
 process(extractWorkOrderInitiatedEvent).


 when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.WorkOrderUpdatedEvent-v1+xml)).
 process(extractWorkOrderUpdatedEvent).


 when(header(JMSType).isEqualTo(application/vnd.com.infosynergi.iscustomer.event.TechnicianWorkOrderUpdatedEvent-v1+xml)).
 process(extractTechnicianWorkOrderUpdatedEvent).
 end().
 to(bean://getTechnicianOrderProcessor?method=process).
 choice().
 when(header(TechnicianOrder).isNotNull()).
 log(LoggingLevel.DEBUG, Work Order Event will be handled
 by
 this integration since technician order data exists for this work order).
 to(bean://getActorAssetProcessor?method=process).
 to(bean://getWorkOrderDetailsProcessor?method=process).

 to(bean://createXellentCI_WorkOrderSoapRequestProcessor?method=process).

 to(bean://sendXellentCI_WorkOrderSoapRequestProcessor?method=process).
 otherwise().
 log(LoggingLevel.DEBUG, Work Order Event will NOT be
 handled by this integration since NO technician order data exists for this
 work order).
 end().
 log(LoggingLevel.DEBUG, Successful routing);
 }

 Any suggestions on what the error is telling me?



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Failed-to-create-route-tp5745435.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Failed to create route when using Mina2

2013-08-26 Thread Bharath
Hi,

  I have a route defined in my routebuilder class as 

from(mina2:tcp://127.0.0.1:?sync=truecodec=#hl7codec).process(new
Processor() {

and my camel-context.xml  as 

camelContext id=camel xmlns=http://camel.apache.org/schema/spring;
routeBuilder ref=myBuilder / 
/camelContext

bean id=myBuilder class=org.test.poc.HL7MinaRouteBuilder /
bean id=hl7codec class=org.apache.camel.component.hl7.HL7MLLPCodec
property name=charset value=iso-8859-1 /
/bean

and i added the following dependencies in my pom.xml

dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-hl7/artifactId
version2.10.0/version
/dependency
dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-core/artifactId
version2.10.0/version
/dependency
dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-jms/artifactId
version2.10.0/version
/dependency
dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-mina2/artifactId
version2.10.0/version
/dependency
dependency
groupIdca.uhn.hapi/groupId
artifactIdhapi-structures-v23/artifactId
version1.2/version
/dependency
dependency
groupIdca.uhn.hapi/groupId
artifactIdhapi-structures-v23/artifactId
version1.2/version
/dependency
dependency
groupIdca.uhn.hapi/groupId
artifactIdhapi-osgi-base/artifactId
version1.2/version
/dependency

I tried to deploy this bundle in Fuse 7.1.0 and am getting the following
exception

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: mina2://tcp://127.0.0.1:?codec=%23hl7codecsync=true
due to: Could not find a suitable setter for property: codec as there isn't
a setter method with same type: org.apache.camel.component.hl7.HL7MLLPCodec
nor type conversion possible: No type converter available to convert from
type: org.apache.camel.component.hl7.HL7MLLPCodec to the required type:
org.apache.mina.filter.codec.ProtocolCodecFactory with value
org.apache.camel.component.hl7.HL7MLLPCodec@6f434f5f
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:480)
at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:50)
at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:187)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114)
at
org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
at
org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:857)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:172)
... 19 more

any suggestions???




--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-when-using-Mina2-tp5737923.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Failed to create route when using Mina2

2013-08-26 Thread Claus Ibsen
Camel 2.10 uses mina 1.x for hl7.
You need Camel 2.11 or newer for mina 2.x using hl7

Check out the release notes
http://camel.apache.org/camel-2110-release.html

On Mon, Aug 26, 2013 at 8:08 AM, Bharath bharath4...@gmail.com wrote:
 Hi,

   I have a route defined in my routebuilder class as

 from(mina2:tcp://127.0.0.1:?sync=truecodec=#hl7codec).process(new
 Processor() {

 and my camel-context.xml  as

 camelContext id=camel xmlns=http://camel.apache.org/schema/spring;
 routeBuilder ref=myBuilder /
 /camelContext

 bean id=myBuilder class=org.test.poc.HL7MinaRouteBuilder /
 bean id=hl7codec class=org.apache.camel.component.hl7.HL7MLLPCodec
 property name=charset value=iso-8859-1 /
 /bean

 and i added the following dependencies in my pom.xml

 dependency
 groupIdorg.apache.camel/groupId
 artifactIdcamel-hl7/artifactId
 version2.10.0/version
 /dependency
 dependency
 groupIdorg.apache.camel/groupId
 artifactIdcamel-core/artifactId
 version2.10.0/version
 /dependency
 dependency
 groupIdorg.apache.camel/groupId
 artifactIdcamel-jms/artifactId
 version2.10.0/version
 /dependency
 dependency
 groupIdorg.apache.camel/groupId
 artifactIdcamel-mina2/artifactId
 version2.10.0/version
 /dependency
 dependency
 groupIdca.uhn.hapi/groupId
 artifactIdhapi-structures-v23/artifactId
 version1.2/version
 /dependency
 dependency
 groupIdca.uhn.hapi/groupId
 artifactIdhapi-structures-v23/artifactId
 version1.2/version
 /dependency
 dependency
 groupIdca.uhn.hapi/groupId
 artifactIdhapi-osgi-base/artifactId
 version1.2/version
 /dependency

 I tried to deploy this bundle in Fuse 7.1.0 and am getting the following
 exception

 Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
 resolve endpoint: mina2://tcp://127.0.0.1:?codec=%23hl7codecsync=true
 due to: Could not find a suitable setter for property: codec as there isn't
 a setter method with same type: org.apache.camel.component.hl7.HL7MLLPCodec
 nor type conversion possible: No type converter available to convert from
 type: org.apache.camel.component.hl7.HL7MLLPCodec to the required type:
 org.apache.mina.filter.codec.ProtocolCodecFactory with value
 org.apache.camel.component.hl7.HL7MLLPCodec@6f434f5f
 at
 org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:480)
 at
 org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:50)
 at
 org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:187)
 at
 org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
 at
 org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114)
 at
 org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
 at
 org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90)
 at
 org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:857)
 at
 org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:172)
 ... 19 more

 any suggestions???




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Failed-to-create-route-when-using-Mina2-tp5737923.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Failed to create route when using Mina2

2013-08-26 Thread Bharath
aaah!!

Thanks Claus,I changed my endpoint from Mina2 to Mina and the bundle has
been deployed and route has started successfully

Now I gave request to the TCP endpoint mentioned above using TCP client java
program but there was no response.

Is there any other way to test this route??


Cheers!!!
Bharath



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-when-using-Mina2-tp5737923p5737930.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Failed to create route when using Mina2

2013-08-26 Thread Claus Ibsen
You need to send valid HL7 data. There is HL7 simulator apps you can
find on the internet to use for testing.

Or just check the source code for camel-hl7 for some examples we use
for testing.

On Mon, Aug 26, 2013 at 9:54 AM, Bharath bharath4...@gmail.com wrote:
 aaah!!

 Thanks Claus,I changed my endpoint from Mina2 to Mina and the bundle has
 been deployed and route has started successfully

 Now I gave request to the TCP endpoint mentioned above using TCP client java
 program but there was no response.

 Is there any other way to test this route??


 Cheers!!!
 Bharath



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Failed-to-create-route-when-using-Mina2-tp5737923p5737930.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Failed to create route when using Mina2

2013-08-26 Thread Bharath
cool!!

It works perfectly now

Thank you so much Claus for your suggestion.I used 7 edit hl7 tool and
validated the message before giving request

Cheers!!!
Bharath



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-when-using-Mina2-tp5737923p5737947.html
Sent from the Camel - Users mailing list archive at Nabble.com.


failed to create route

2011-05-31 Thread fachhoch
I am new bee trying to use camel .
I am trying an email listner I am failing with this exception


Failed to create route route1:
Route[[From[imaps://imap.gmail.com?password=xusernam... because of
Failed to resolve endpoint:
imaps://imap.gmail.com?consumer.delay=6deleteProcessedMessages=falsepassword=xxprocessOnlyUnseenMessages=trueusername=myuserid%40gmail.com
due to: Failed to resolve endpoint:
imaps://imap.gmail.com?consumer.delay=6deleteProcessedMessages=falsepassword=xxprocessOnlyUnseenMessages=trueusername=myuserid%40gmail.com
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=[{deleteProcessedMessages=false,
processOnlyUnseenMessages=true}]
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:238)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:636)
at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:188)
at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:995)
at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:579)
at 
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:381)
at
org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:114)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:162)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
at org.eclipse.jetty.server.Server.doStart(Server.java:226)
at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:69)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:433)
at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:377)
at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:577)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25

Re: failed to create route

2011-05-31 Thread fachhoch
Ok I am using camel-mail-2.7.1 
platform windows
server running on jetty 
java 1.6
I am getting parameter not found exception I am trying out the configration
specified in the example .

here is my router configration



from(imaps://imap.gmail.com?password=username=myuse...@gmail.comdeleteProcessedMessages=falseprocessOnlyUnseenMessages=trueconsumer.delay=6).
 
choice().when(header(subject).contains(Test-Camel)).process(new
MyMailProcessor());



--
View this message in context: 
http://camel.465427.n5.nabble.com/failed-to-create-route-tp4443078p4443143.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: failed to create route

2011-05-31 Thread Donald Whytock
Try using myuserid instead of myuse...@gmail.com.  Last I tried,
mail endpoints don't like full email addresses as user IDs.

Don

On Tue, May 31, 2011 at 4:06 PM, fachhoch fachh...@gmail.com wrote:
 Ok I am using camel-mail-2.7.1
 platform windows
 server running on jetty
 java 1.6
 I am getting parameter not found exception I am trying out the configration
 specified in the example .

 here is my router configration



 from(imaps://imap.gmail.com?password=username=myuse...@gmail.comdeleteProcessedMessages=falseprocessOnlyUnseenMessages=trueconsumer.delay=6).
        choice().when(header(subject).contains(Test-Camel)).process(new
 MyMailProcessor());



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/failed-to-create-route-tp4443078p4443143.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: failed to create route

2011-05-31 Thread Christian Müller
Your endpoint should looks like the following:
from(imaps://
imap.gmail.com?password=username=myuse...@gmail.comdelete=falseunseen=trueconsumer.delay=6http://imap.gmail.com/?password=username=myuse...@gmail.comdeleteProcessedMessages=falseprocessOnlyUnseenMessages=trueconsumer.delay=6
)

I updated the wiki page samples to use the actual options because most of
our users using Camel 2.x.

Best,
Christian


On Wed, Jun 1, 2011 at 7:22 AM, Claus Ibsen claus.ib...@gmail.com wrote:

 Hi

 Check the mail component wiki page more careful
 http://camel.apache.org/mail.html

 If you look at the 2 options it complain about, and look in the
 options table you get your answer why it fails.



 On Tue, May 31, 2011 at 10:06 PM, fachhoch fachh...@gmail.com wrote:
  Ok I am using camel-mail-2.7.1
  platform windows
  server running on jetty
  java 1.6
  I am getting parameter not found exception I am trying out the
 configration
  specified in the example .
 
  here is my router configration
 
 
 
  from(imaps://
 imap.gmail.com?password=username=myuse...@gmail.comdeleteProcessedMessages=falseprocessOnlyUnseenMessages=trueconsumer.delay=6
 ).
 
  choice().when(header(subject).contains(Test-Camel)).process(new
  MyMailProcessor());
 
 
 
  --
  View this message in context:
 http://camel.465427.n5.nabble.com/failed-to-create-route-tp4443078p4443143.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 



 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



Failed to create route

2011-04-04 Thread jpalmer1026
Hi,

I'm trying to use the camel properties component to externalize a properties
file. It looks like the properties file is getting read, but I'm getting the
following exception when the app tries to read the externalized properties:

Exception in thread main org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route[[From[{{file.inbox}}]] - [Choice[[When[simple{${heade...
because of No endpoint could be found for: {{file.inbox}}, please check your
classpath contains the needed Camel component jar.

Here are the relevant code snippets from my spring-config file:


   



   
  
   
  
 ${header.CamelFileName} regex '^.*txt$'
 
 
  
  
 ${header.CamelFileName} regex '^.*xml$'
 
 
  
   

 

My properties file is as follows:

file.inbox=target/inbox
file.outbox=target/outbox
file.xml=target/xml

Any idea what I might be doing wrong? Thanks!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282517.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Failed to create route

2011-04-04 Thread Hadrian Zbarcea
Do you have a properties placeholder [1] for your properties and/or is it at 
the expected location? 
camelContext ...
   propertyPlaceholder id=properties 
location=com/mycompany/myprop.properties/
/camelContext
Hadrian

[1] http://camel.apache.org/properties.htm


On Apr 4, 2011, at 3:10 PM, jpalmer1026 wrote:

 Hi,
 
 I'm trying to use the camel properties component to externalize a properties
 file. It looks like the properties file is getting read, but I'm getting the
 following exception when the app tries to read the externalized properties:
 
 Exception in thread main org.apache.camel.RuntimeCamelException:
 org.apache.camel.FailedToCreateRouteException: Failed to create route
 route1: Route[[From[{{file.inbox}}]] - [Choice[[When[simple{${heade...
 because of No endpoint could be found for: {{file.inbox}}, please check your
 classpath contains the needed Camel component jar.
 
 Here are the relevant code snippets from my spring-config file:
 
 
 
 
 
 
 
 
 
 
 ${header.CamelFileName} regex '^.*txt$'
 
 
 
 
 ${header.CamelFileName} regex '^.*xml$'
 
 
 
 
 
 
 
 My properties file is as follows:
 
 file.inbox=target/inbox
 file.outbox=target/outbox
 file.xml=target/xml
 
 Any idea what I might be doing wrong? Thanks!
 
 
 
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282517.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Failed to create route

2011-04-04 Thread jpalmer1026
I declared my Properties component as a bean as described in my post.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282634.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Failed to create route

2011-04-04 Thread jpalmer1026
Actually, I figured it out. Silly mistake on my part. I was usinginstead of 
(note the 'file' keyword before the colon).

--
View this message in context: 
http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282652.html
Sent from the Camel - Users mailing list archive at Nabble.com.


FailedToCreateRouteException: Failed to create route route1

2009-11-24 Thread lekkie

While trying to configure a route using the camel 2.0, I had the ffg in my
bean.xml file:

cxfse:endpoint id=Services useJBIWrapper=false useSOAPEnvelope=false
cxfse:pojo
bean class=com.services.CollegeServicesImpl/
/cxfse:pojo
/cxfse:endpoint

and I have this in my bean class as the annotation
@WebService(targetNamespace = http://services.com;, serviceName =
Services, portName = endpoint)

I thot I'd be able to access this service using the jbi naming convention
from my camelcontext shown below:

osgi:camelContext xmlns=http://camel.apache.org/schema/spring;
route
from uri=jms:queue:RequestQueue /
to
uri=jbi:endpoint:http://services.com/Services/endpoint?mep=in-out; /
/route
/osgi:camelContext


I couldn't as it says:

Camel 2.x-fuse-SNAPSHOT (CamelContext:camelContext) stopped
15:12:49,403 | ERROR | xtenderThread-72 | OsgiBundleXmlApplicationContext  |
gatedExecutionApplicationContext  366 | Post refresh error
org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route route1
at:  To[jbi:endpoint:http://services.com/Services/endpoint?mep=in-out]
 in route: Route[[From[jms://queue:RequestQueue]] - [T... because of
Failed to resolve endpoint:
jbi://endpoint:http://services.com/Services/endpoint?mep=in-out due to: No
component found with scheme: jbi
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:562)
   
I googled and I found out that there is a way to register ur service from
the NMR.

jaxws:endpoint id=CollegeServices
   implementor=com.services.CollegeServicesImpl
address=nmr:CollegeService /

However, my service never got registered as it kept ServiceMix kept saying:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'CollegeServices': Invocation of init method failed; nested
exception is javax.xml.ws.WebServiceException:
java.lang.IllegalStateException: Endpoint address should be a relative URI
wrt to the servlet address (use '/xxx' for example)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)


kr. 
-- 
View this message in context: 
http://old.nabble.com/FailedToCreateRouteException%3A-Failed-to-create-route-route1-tp26497670p26497670.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: FailedToCreateRouteException: Failed to create route route1

2009-11-24 Thread Stan Lewis
On Tue, Nov 24, 2009 at 10:15 AM, lekkie lekkie.ay...@gmail.com wrote:

 While trying to configure a route using the camel 2.0, I had the ffg in my
 bean.xml file:

 cxfse:endpoint id=Services useJBIWrapper=false useSOAPEnvelope=false
                cxfse:pojo
                        bean class=com.services.CollegeServicesImpl/
                /cxfse:pojo
        /cxfse:endpoint

 and I have this in my bean class as the annotation
 @WebService(targetNamespace = http://services.com;, serviceName =
 Services, portName = endpoint)

 I thot I'd be able to access this service using the jbi naming convention
 from my camelcontext shown below:

 osgi:camelContext xmlns=http://camel.apache.org/schema/spring;
                route
                        from uri=jms:queue:RequestQueue /
                        to
 uri=jbi:endpoint:http://services.com/Services/endpoint?mep=in-out; /
                /route
        /osgi:camelContext


 I couldn't as it says:

 Camel 2.x-fuse-SNAPSHOT (CamelContext:camelContext) stopped
 15:12:49,403 | ERROR | xtenderThread-72 | OsgiBundleXmlApplicationContext  |
 gatedExecutionApplicationContext  366 | Post refresh error
 org.apache.camel.RuntimeCamelException:
 org.apache.camel.FailedToCreateRouteException: Failed to create route route1
 at:  To[jbi:endpoint:http://services.com/Services/endpoint?mep=in-out]
  in route: Route[[From[jms://queue:RequestQueue]] - [T... because of
 Failed to resolve endpoint:
 jbi://endpoint:http://services.com/Services/endpoint?mep=in-out due to: No
 component found with scheme: jbi
        at
 org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
        at
 org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
        at
 org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:562)

 I googled and I found out that there is a way to register ur service from
 the NMR.

 jaxws:endpoint id=CollegeServices
                       implementor=com.services.CollegeServicesImpl
                        address=nmr:CollegeService /

 However, my service never got registered as it kept ServiceMix kept saying:
 org.springframework.beans.factory.BeanCreationException: Error creating bean
 with name 'CollegeServices': Invocation of init method failed; nested
 exception is javax.xml.ws.WebServiceException:
 java.lang.IllegalStateException: Endpoint address should be a relative URI
 wrt to the servlet address (use '/xxx' for example)
        at
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)

Yeah, I think you need to add the following import to your spring config:

import resource=classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml /

There's a whole cxf-camel-nmr demo that ships with servicemix 4 that
you should take a look at.




 kr.
 --
 View this message in context: 
 http://old.nabble.com/FailedToCreateRouteException%3A-Failed-to-create-route-route1-tp26497670p26497670.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




Re: FailedToCreateRouteException: Failed to create route route1

2009-11-24 Thread lekkie

Thnx.

I tried that and it seems it cant find the transport nmr resource path. See
exception below:

XML bean definitions from OSGi
resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se]
16:52:31,731 | ERROR | xtenderThread-79 | OsgiBundleXmlApplicationContext  |
gatedExecutionApplicationContext  293 | Pre refresh error
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml]
Offending resource: URL [bundle://176.0:0/META-INF/spring/beans.xml]; nested
exception is org.springframework.beans.factory.BeanDefinitionStoreException:
IOException parsing XML document from OSGi
resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se];
nested exception is java.io.FileNotFoundException: OSGi
resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se]
cannot be resolved to URL because it does not exist
at
org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)





Stan Lewis-3 wrote:
 
 On Tue, Nov 24, 2009 at 10:15 AM, lekkie lekkie.ay...@gmail.com wrote:

 While trying to configure a route using the camel 2.0, I had the ffg in
 my
 bean.xml file:

 cxfse:endpoint id=Services useJBIWrapper=false
 useSOAPEnvelope=false
                cxfse:pojo
                        bean class=com.services.CollegeServicesImpl/
                /cxfse:pojo
        /cxfse:endpoint

 and I have this in my bean class as the annotation
 @WebService(targetNamespace = http://services.com;, serviceName =
 Services, portName = endpoint)

 I thot I'd be able to access this service using the jbi naming convention
 from my camelcontext shown below:

 osgi:camelContext xmlns=http://camel.apache.org/schema/spring;
                route
                        from uri=jms:queue:RequestQueue /
                        to
 uri=jbi:endpoint:http://services.com/Services/endpoint?mep=in-out; /
                /route
        /osgi:camelContext


 I couldn't as it says:

 Camel 2.x-fuse-SNAPSHOT (CamelContext:camelContext) stopped
 15:12:49,403 | ERROR | xtenderThread-72 | OsgiBundleXmlApplicationContext
  |
 gatedExecutionApplicationContext  366 | Post refresh error
 org.apache.camel.RuntimeCamelException:
 org.apache.camel.FailedToCreateRouteException: Failed to create route
 route1
 at:  To[jbi:endpoint:http://services.com/Services/endpoint?mep=in-out]
  in route: Route[[From[jms://queue:RequestQueue]] - [T... because of
 Failed to resolve endpoint:
 jbi://endpoint:http://services.com/Services/endpoint?mep=in-out due to:
 No
 component found with scheme: jbi
        at
 org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
        at
 org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
        at
 org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:562)

 I googled and I found out that there is a way to register ur service from
 the NMR.

 jaxws:endpoint id=CollegeServices
                       implementor=com.services.CollegeServicesImpl
                        address=nmr:CollegeService /

 However, my service never got registered as it kept ServiceMix kept
 saying:
 org.springframework.beans.factory.BeanCreationException: Error creating
 bean
 with name 'CollegeServices': Invocation of init method failed; nested
 exception is javax.xml.ws.WebServiceException:
 java.lang.IllegalStateException: Endpoint address should be a relative
 URI
 wrt to the servlet address (use '/xxx' for example)
        at
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
 
 Yeah, I think you need to add the following import to your spring config:
 
 import
 resource=classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml /
 
 There's a whole cxf-camel-nmr demo that ships with servicemix 4 that
 you should take a look at.
 
 


 kr.
 --
 View this message in context:
 http://old.nabble.com/FailedToCreateRouteException%3A-Failed-to-create-route-route1-tp26497670p26497670.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://old.nabble.com/FailedToCreateRouteException%3A-Failed-to-create-route-route1-tp26497670p26498456.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: FailedToCreateRouteException: Failed to create route route1

2009-11-24 Thread Stan Lewis
On Tue, Nov 24, 2009 at 10:56 AM, lekkie lekkie.ay...@gmail.com wrote:

 Thnx.

 I tried that and it seems it cant find the transport nmr resource path. See
 exception below:

 XML bean definitions from OSGi
 resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se]
 16:52:31,731 | ERROR | xtenderThread-79 | OsgiBundleXmlApplicationContext  |
 gatedExecutionApplicationContext  293 | Pre refresh error
 org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
 Configuration problem: Failed to import bean definitions from URL location
 [classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml]
 Offending resource: URL [bundle://176.0:0/META-INF/spring/beans.xml]; nested
 exception is org.springframework.beans.factory.BeanDefinitionStoreException:
 IOException parsing XML document from OSGi
 resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se];
 nested exception is java.io.FileNotFoundException: OSGi
 resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se]
 cannot be resolved to URL because it does not exist
        at
 org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
        at
 org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)

Are you using JBI packaging or OSGi packaging for your project?  I
think you may have to switch over to using OSGi packaging to get
access to the resource you need here, the cxf-camel-nmr example shows
that the example bundle needs to import META-INF.cxf:

plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
configuration
instructions

Bundle-SymbolicName${pom.artifactId}/Bundle-SymbolicName
Import-Package

javax.jws,javax.wsdl,META-INF.cxf,META-INF.cxf.transport.nmr,
  org.apache.cxf.bus,org.apache.servicemix.camel.nmr,
  org.apache.servicemix.cxf.transport.nmr,

org.apache.servicemix.nmr.api,org.apache.servicemix.nmr.api.event,org.apache.servicemix.nmr.api.internal,
  org.springframework.beans.factory.config, *
/Import-Package

Private-Packageorg.apache.servicemix.examples.cxfcamel/Private-Package
Require-Bundleorg.apache.cxf.bundle/Require-Bundle
/instructions
/configuration
/plugin

Hope that helps!






 Stan Lewis-3 wrote:

 On Tue, Nov 24, 2009 at 10:15 AM, lekkie lekkie.ay...@gmail.com wrote:

 While trying to configure a route using the camel 2.0, I had the ffg in
 my
 bean.xml file:

 cxfse:endpoint id=Services useJBIWrapper=false
 useSOAPEnvelope=false
                cxfse:pojo
                        bean class=com.services.CollegeServicesImpl/
                /cxfse:pojo
        /cxfse:endpoint

 and I have this in my bean class as the annotation
 @WebService(targetNamespace = http://services.com;, serviceName =
 Services, portName = endpoint)

 I thot I'd be able to access this service using the jbi naming convention
 from my camelcontext shown below:

 osgi:camelContext xmlns=http://camel.apache.org/schema/spring;
                route
                        from uri=jms:queue:RequestQueue /
                        to
 uri=jbi:endpoint:http://services.com/Services/endpoint?mep=in-out; /
                /route
        /osgi:camelContext


 I couldn't as it says:

 Camel 2.x-fuse-SNAPSHOT (CamelContext:camelContext) stopped
 15:12:49,403 | ERROR | xtenderThread-72 | OsgiBundleXmlApplicationContext
  |
 gatedExecutionApplicationContext  366 | Post refresh error
 org.apache.camel.RuntimeCamelException:
 org.apache.camel.FailedToCreateRouteException: Failed to create route
 route1
 at:  To[jbi:endpoint:http://services.com/Services/endpoint?mep=in-out]
  in route: Route[[From[jms://queue:RequestQueue]] - [T... because of
 Failed to resolve endpoint:
 jbi://endpoint:http://services.com/Services/endpoint?mep=in-out due to:
 No
 component found with scheme: jbi
        at
 org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
        at
 org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
        at
 org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:562)

 I googled and I found out that there is a way to register ur service from
 the NMR.

 jaxws:endpoint id=CollegeServices
                       implementor=com.services.CollegeServicesImpl
                        address=nmr:CollegeService /

 However, my service never got registered as it kept ServiceMix kept
 saying:
 org.springframework.beans.factory.BeanCreationException: Error creating
 bean
 with name 'CollegeServices': Invocation of init method failed; nested

Re: FailedToCreateRouteException: Failed to create route route1

2009-11-24 Thread lekkie

That worked. Thnx.



Stan Lewis-3 wrote:
 
 On Tue, Nov 24, 2009 at 10:56 AM, lekkie lekkie.ay...@gmail.com wrote:

 Thnx.

 I tried that and it seems it cant find the transport nmr resource path.
 See
 exception below:

 XML bean definitions from OSGi
 resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se]
 16:52:31,731 | ERROR | xtenderThread-79 | OsgiBundleXmlApplicationContext
  |
 gatedExecutionApplicationContext  293 | Pre refresh error
 org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
 Configuration problem: Failed to import bean definitions from URL
 location
 [classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml]
 Offending resource: URL [bundle://176.0:0/META-INF/spring/beans.xml];
 nested
 exception is
 org.springframework.beans.factory.BeanDefinitionStoreException:
 IOException parsing XML document from OSGi
 resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se];
 nested exception is java.io.FileNotFoundException: OSGi
 resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=176|bnd.sym=nau-college-se]
 cannot be resolved to URL because it does not exist
        at
 org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
        at
 org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
 
 Are you using JBI packaging or OSGi packaging for your project?  I
 think you may have to switch over to using OSGi packaging to get
 access to the resource you need here, the cxf-camel-nmr example shows
 that the example bundle needs to import META-INF.cxf:
 
 plugin
 groupIdorg.apache.felix/groupId
 artifactIdmaven-bundle-plugin/artifactId
 configuration
 instructions
 
 Bundle-SymbolicName${pom.artifactId}/Bundle-SymbolicName
 Import-Package
 
 javax.jws,javax.wsdl,META-INF.cxf,META-INF.cxf.transport.nmr,
  
 org.apache.cxf.bus,org.apache.servicemix.camel.nmr,
   org.apache.servicemix.cxf.transport.nmr,
 
 org.apache.servicemix.nmr.api,org.apache.servicemix.nmr.api.event,org.apache.servicemix.nmr.api.internal,
   org.springframework.beans.factory.config, *
 /Import-Package
 
 Private-Packageorg.apache.servicemix.examples.cxfcamel/Private-Package

 Require-Bundleorg.apache.cxf.bundle/Require-Bundle
 /instructions
 /configuration
 /plugin
 
 Hope that helps!
 





 Stan Lewis-3 wrote:

 On Tue, Nov 24, 2009 at 10:15 AM, lekkie lekkie.ay...@gmail.com wrote:

 While trying to configure a route using the camel 2.0, I had the ffg in
 my
 bean.xml file:

 cxfse:endpoint id=Services useJBIWrapper=false
 useSOAPEnvelope=false
                cxfse:pojo
                        bean class=com.services.CollegeServicesImpl/
                /cxfse:pojo
        /cxfse:endpoint

 and I have this in my bean class as the annotation
 @WebService(targetNamespace = http://services.com;, serviceName =
 Services, portName = endpoint)

 I thot I'd be able to access this service using the jbi naming
 convention
 from my camelcontext shown below:

 osgi:camelContext xmlns=http://camel.apache.org/schema/spring;
                route
                        from uri=jms:queue:RequestQueue /
                        to
 uri=jbi:endpoint:http://services.com/Services/endpoint?mep=in-out; /
                /route
        /osgi:camelContext


 I couldn't as it says:

 Camel 2.x-fuse-SNAPSHOT (CamelContext:camelContext) stopped
 15:12:49,403 | ERROR | xtenderThread-72 |
 OsgiBundleXmlApplicationContext
  |
 gatedExecutionApplicationContext  366 | Post refresh error
 org.apache.camel.RuntimeCamelException:
 org.apache.camel.FailedToCreateRouteException: Failed to create route
 route1
 at: 
 To[jbi:endpoint:http://services.com/Services/endpoint?mep=in-out]
  in route: Route[[From[jms://queue:RequestQueue]] - [T... because
 of
 Failed to resolve endpoint:
 jbi://endpoint:http://services.com/Services/endpoint?mep=in-out due to:
 No
 component found with scheme: jbi
        at
 org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1039)
        at
 org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
        at
 org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:562)

 I googled and I found out that there is a way to register ur service
 from
 the NMR.

 jaxws:endpoint id=CollegeServices
                       implementor=com.services.CollegeServicesImpl
                        address=nmr:CollegeService /

 However, my service never got registered as it kept ServiceMix kept
 saying:
 org.springframework.beans.factory.BeanCreationException: Error