You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Kenneth <ke...@king-foo.be> on 2014/04/24 15:17:27 UTC

Camel-optaplanner

Hi,

I would like to expose optaplanner as a REST service and after some research
Camel seems the best option.
Sadly I'm having trouble setting it up as I have no experience with Camel.

Is there a camel-optaplanner example available?
If not, what example would come closest?



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-optaplanner-tp5750534.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-optaplanner

Posted by Kenneth <ke...@king-foo.be>.
So I got the most of it working and I,m now using the SimpleConsumer.
But I’m not sure what needs to be in the bean and where it needs to go to
get optaplanner to work



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-optaplanner-tp5750534p5750611.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-optaplanner

Posted by Geoffrey De Smet <ge...@gmail.com>.


On 25-04-14 08:36, Kenneth wrote:
> When I add a termination to the solverConfig I get an error because of a
> missing dependency?
> Exception in thread "main" org.apache.camel.FailedToCreateRouteException:
> Failed to create route route1 at: >>>
> To[optaplanner:/com/kingfoo/camel1/solverConfig.xml] <<< in route:
> Route(route1)[[From[direct:start]] -> [To[optaplanner:/com/k... because of
> Failed to resolve endpoint:
> optaplanner:///com/kingfoo/camel1/solverConfig.xml due to: No such field
> org.optaplanner.core.config.termination.TerminationConfig.minutesSpentLimit
<minutesSpentLimit> in optaplanner 6.1.x
was <maximumMinutesSpend> in optaplanner 6.0.x

Starting from 6.1, that config will be backwards compatible in 6.2, 6.3 etc.
Once 6.1.0.Final is out, I 'll send in a PR to upgrade camel-optaplanner.
More info in upgrade recipe:
https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-distribution/src/main/assembly/filtered-resources/UpgradeFromPreviousVersionRecipe.txt


Re: Camel-optaplanner

Posted by Kenneth <ke...@king-foo.be>.
Hi,

I did check out the unit tests and got a pretty good start. 
Yet I'm having some issues.

When I add a termination to the solverConfig I get an error because of a
missing dependency?
Exception in thread "main" org.apache.camel.FailedToCreateRouteException:
Failed to create route route1 at: >>>
To[optaplanner:/com/kingfoo/camel1/solverConfig.xml] <<< in route:
Route(route1)[[From[direct:start]] -> [To[optaplanner:/com/k... because of
Failed to resolve endpoint:
optaplanner:///com/kingfoo/camel1/solverConfig.xml due to: No such field
org.optaplanner.core.config.termination.TerminationConfig.minutesSpentLimit

The other problem is when I set my from to from("activemq:My.Queue").
I get a lot of issues but adding the activemq dependency does not helpt
here.
Exception in thread "main" org.apache.camel.FailedToCreateRouteException:
Failed to create route route1: Route(route1)[[From[activemq:My.Queue]] ->
[To[optaplanner:/... because of Failed to resolve endpoint:
activemq://My.Queue due to: No component found with scheme: activemq

I also can not really find where to place the routing file.

I do understand most of the documentation, I think the biggest problem is
that it does not really say the locations of each file (The solverConfig.xml
being an example of that). Though it could be that I don't know because I'm
not a java dev. I'm more a php dev.




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-optaplanner-tp5750534p5750594.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-optaplanner

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

There is the component documentation at
http://camel.apache.org/optaplanner.html

And a good idea can be to check the unit tests of the component for
some ideas how to do it
https://github.com/apache/camel/tree/master/components/camel-optaplanner/src/test


On Thu, Apr 24, 2014 at 3:17 PM, Kenneth <ke...@king-foo.be> wrote:
> Hi,
>
> I would like to expose optaplanner as a REST service and after some research
> Camel seems the best option.
> Sadly I'm having trouble setting it up as I have no experience with Camel.
>
> Is there a camel-optaplanner example available?
> If not, what example would come closest?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-optaplanner-tp5750534.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@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/