You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by janne postilista <ja...@gmail.com> on 2011/04/08 16:13:42 UTC
Using without ref causes "policy myst be specified on" error
Reading "Camel in action" and the documentation it would seems that I
should be able to mark a route as
<transacted/>
and by convention it should PROPAGATION_REQUIRED. That causes an error though:
karaf@root> Exception in thread "SpringOsgiExtenderThread-16"
org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route37 at: >>> Transacted[ref:null] <<< in route:
Route[[From[activemq://myroute]] -> [Transacted[ref:null]]] because of
policy must be specified on: Transacted[ref:null]
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
Is this just a bug/feature of current servicemix/camel combo (I am
using apache-servicemix-4.3.1-fuse-00-00) or a sign of that I am doing
something wrong?
Re: Using without ref causes "policy myst be specified on" error
Posted by Johan Edstrom <se...@gmail.com>.
Depending on environment, you'll also may have to import
org.apache.camel.spring.spi,
- Like under camel blueprint.
On Apr 8, 2011, at 8:28 AM, Claus Ibsen wrote:
> You need to setup the transaction manager also.
>
>
> On Fri, Apr 8, 2011 at 4:13 PM, janne postilista
> <ja...@gmail.com> wrote:
>> Reading "Camel in action" and the documentation it would seems that I
>> should be able to mark a route as
>>
>> <transacted/>
>>
>> and by convention it should PROPAGATION_REQUIRED. That causes an error though:
>>
>> karaf@root> Exception in thread "SpringOsgiExtenderThread-16"
>> org.apache.camel.RuntimeCamelException:
>> org.apache.camel.FailedToCreateRouteException: Failed to create route
>> route37 at: >>> Transacted[ref:null] <<< in route:
>> Route[[From[activemq://myroute]] -> [Transacted[ref:null]]] because of
>> policy must be specified on: Transacted[ref:null]
>> at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
>>
>> Is this just a bug/feature of current servicemix/camel combo (I am
>> using apache-servicemix-4.3.1-fuse-00-00) or a sign of that I am doing
>> something wrong?
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> CamelOne 2011: http://fusesource.com/camelone2011/
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
Re: Using without ref causes "policy myst be specified
on" error
Posted by janne postilista <ja...@gmail.com>.
I did these:
<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="transacted" value="true" />
<property name="transactionManager" ref="txManager" />
<property name="connectionFactory" ref="jmsConnectionFactory"/>
</bean>
<bean id="txManager"
class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="jmsConnectionFactory" />
</bean>
<bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616" />
</bean>
On Fri, Apr 8, 2011 at 5:28 PM, Claus Ibsen <cl...@gmail.com> wrote:
> You need to setup the transaction manager also.
>
>
> On Fri, Apr 8, 2011 at 4:13 PM, janne postilista
> <ja...@gmail.com> wrote:
>> Reading "Camel in action" and the documentation it would seems that I
>> should be able to mark a route as
>>
>> <transacted/>
>>
>> and by convention it should PROPAGATION_REQUIRED. That causes an error though:
>>
>> karaf@root> Exception in thread "SpringOsgiExtenderThread-16"
>> org.apache.camel.RuntimeCamelException:
>> org.apache.camel.FailedToCreateRouteException: Failed to create route
>> route37 at: >>> Transacted[ref:null] <<< in route:
>> Route[[From[activemq://myroute]] -> [Transacted[ref:null]]] because of
>> policy must be specified on: Transacted[ref:null]
>> at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
>>
>> Is this just a bug/feature of current servicemix/camel combo (I am
>> using apache-servicemix-4.3.1-fuse-00-00) or a sign of that I am doing
>> something wrong?
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> CamelOne 2011: http://fusesource.com/camelone2011/
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>
Re: Using without ref causes "policy myst be specified
on" error
Posted by Claus Ibsen <cl...@gmail.com>.
You need to setup the transaction manager also.
On Fri, Apr 8, 2011 at 4:13 PM, janne postilista
<ja...@gmail.com> wrote:
> Reading "Camel in action" and the documentation it would seems that I
> should be able to mark a route as
>
> <transacted/>
>
> and by convention it should PROPAGATION_REQUIRED. That causes an error though:
>
> karaf@root> Exception in thread "SpringOsgiExtenderThread-16"
> org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route37 at: >>> Transacted[ref:null] <<< in route:
> Route[[From[activemq://myroute]] -> [Transacted[ref:null]]] because of
> policy must be specified on: Transacted[ref:null]
> at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
>
> Is this just a bug/feature of current servicemix/camel combo (I am
> using apache-servicemix-4.3.1-fuse-00-00) or a sign of that I am doing
> something wrong?
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: Using without ref causes "policy myst be specified
on" error
Posted by azee781 <se...@gmail.com>.
If you are using OSGi Blueprint then you most likely have to explicit declare
a policy and refer to the policy from the transacted in the route.
--
View this message in context: http://servicemix.396122.n5.nabble.com/Using-transacted-without-ref-causes-policy-myst-be-specified-on-error-tp4290967p5720637.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.