Bug 1321790 - Optaplanner is unable to load planning problems from XML files
Summary: Optaplanner is unable to load planning problems from XML files
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: OptaPlanner
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: CR1
: 6.3.0
Assignee: Geoffrey De Smet
QA Contact: Jiri Petrlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-29 07:29 UTC by Jiri Petrlik
Modified: 2020-03-27 19:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Optaplanner from BxMS 6.3.0.ER1, Fuse 6.2.1
Last Closed: 2020-03-27 19:04:32 UTC
Type: Bug


Attachments (Terms of Use)
Reproducer (25.51 KB, application/zip)
2016-03-29 07:29 UTC, Jiri Petrlik
no flags Details

Description Jiri Petrlik 2016-03-29 07:29:37 UTC
Created attachment 1141110 [details]
Reproducer

Description of problem:

Optaplanner is unable to load planning problems from XML files in OSGI environment (Fuse 6.2.1). Optaplanner does not see classes from "org.optaplanner.persistence.xstream.impl.score" for example "org.optaplanner.persistence.xstream.impl.score.XStreamScoreConverter". See attached reproducer.

Version-Release number of selected component (if applicable):

BxMS 6.3.0.ER1

How reproducible:


Steps to Reproduce:
1. Download and unzip reproducer. Compile it using $ mvn clean install
2. Add BxMS OSGI features file to Fuse: $ features:addurl mvn:org.drools/drools-karaf-features/6.4.0.CR1-redhat-1/xml/features
3. Install optaplanner engine to Fuse: features:install optaplanner-engine
4. Run bundle from reproducer: $ osgi:install -s mvn:org.jboss.qa.brms.reproducer/optaplanner.bundle

Actual results:

Error executing command: Error installing bundles:
	Unable to start bundle mvn:org.jboss.qa.brms.reproducer/optaplanner.bundle: Unresolved constraint in bundle optaplanner.bundle [286]: Unable to resolve 286.0: missing requirement [286.0] osgi.wiring.package; (&(osgi.wiring.package=org.optaplanner.persistence.xstream.impl.score)(version>=6.4.0)(!(version>=7.0.0)))

Expected results:

Bundle should start correctly.

Additional info:

Comment 3 Geoffrey De Smet 2016-03-29 17:08:35 UTC
There are 2 types of XML files:
A) The solver XML config file (e.g. the buildSolverFactory call fails)
B) A problem dataset (= Solution instance) represented as an XML file.

What kind of XML file is failing to load?

If it's A), then it's a bug.

If it's B), then it's a missing feature. I am happy to add optaplanner-xstream into the karaf features (it should be painless, but with OSGi one never knows :).

Comment 4 jvahala 2016-03-30 08:32:59 UTC
As far I know, it's A, I've written those tests so no dataset is needed - all data are generated in code.

Comment 6 Jiri Petrlik 2016-04-18 09:03:36 UTC
Bundles "optaplanner-persistence-common" and "optaplanner-persistence-xstream" were added to "optaplanner-engine" feature. However, it is not possible to install them, because both have the same Bundle-SymbolicName "org.optaplanner.persistence.xstream". See "pom.xml" files for these modules. It is necessary to change "optaplanner-persistence-common" bundle symbolic name.

Comment 7 Jiri Petrlik 2016-04-18 15:47:33 UTC
I've reported problem with "optaplanner-persistence-common" and "optaplanner-persistence-xstream" bundles in separate bugzilla [1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1328184

Comment 8 Geoffrey De Smet 2016-04-19 13:58:55 UTC
Thanks for reporting.
Fixed again through
 https://bugzilla.redhat.com/show_bug.cgi?id=1328184

Comment 9 Jiri Petrlik 2016-04-28 09:35:21 UTC
Feature "optaplanner-engine" is capable to successfully load bundle "optaplanner-persistence-xstream". This bundle contains classes for xml description of planning problems. Now, it is possible to load planning problems from XML files in OSGI environment. This bug was verified using BxMS 6.3.0.CR1 and attached reproducer.


Note You need to log in before you can comment on or make changes to this bug.