| Summary: | Optaplanner is unable to load planning problems from XML files | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Jiri Petrlik <jpetrlik> | ||||
| Component: | OptaPlanner | Assignee: | Geoffrey De Smet <gdesmet> | ||||
| Status: | CLOSED EOL | QA Contact: | Jiri Petrlik <jpetrlik> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.3.0 | CC: | etirelli, mwinkler, rrajasek | ||||
| Target Milestone: | CR1 | ||||||
| Target Release: | 6.3.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| 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 | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
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 :). As far I know, it's A, I've written those tests so no dataset is needed - all data are generated in code. These PR's should fix this bug: https://github.com/droolsjbpm/droolsjbpm-integration/pull/406 and 6.4.x https://github.com/droolsjbpm/droolsjbpm-integration/pull/407 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. 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 Thanks for reporting. Fixed again through https://bugzilla.redhat.com/show_bug.cgi?id=1328184 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. |
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: