Bug 1078146
Summary: | Drools and jBPM 6.0 should work on Java 8 | |||
---|---|---|---|---|
Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Geoffrey De Smet <gdesmet> | |
Component: | BRE | Assignee: | Kris Verlaenen <kverlaen> | |
Status: | CLOSED EOL | QA Contact: | Tibor Zimanyi <tzimanyi> | |
Severity: | medium | Docs Contact: | ||
Priority: | high | |||
Version: | 6.0.1 | CC: | etirelli, lpetrovi, manstis, rrajasek | |
Target Milestone: | ER5 | |||
Target Release: | 6.1.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1091383 (view as bug list) | Environment: | ||
Last Closed: | 2020-03-27 19:07:34 UTC | Type: | Feature Request | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: |
Description
Geoffrey De Smet
2014-03-19 09:14:41 UTC
I upgraded the Eclipse Java Compiler to version 4.3.1 with the following commits: https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/498d0b390 https://github.com/droolsjbpm/drools/commit/2eaaf8750 Doing so the list of the failing tests in drools-compiler while running Java8 got reduced to the following 5: Failed tests: KnowledgeBuilderTest.testDifferentPackages:157 Rule Compilation error : [Rule name='R1'] org/drools/compiler/test/rule/Rule_R12147099725.java (7:443) : list cannot be resolved Tests in error: TruthMaintenanceTest.testLogicalInsertionsWithExists:768 » IllegalArgument byt... TruthMaintenanceTest.testLogicalInsertionsWithModify:495 » IllegalArgument byt... TruthMaintenanceTest.testLogicalInsertionsUpdateEqual:703 » IllegalArgument by... TruthMaintenanceTest.testLogicalInsertionsNot:611 » IllegalArgument byte strea... Note that exactly the same tests also fail when running the native Java compiler. I fixed the KnowledgeBuilderTest with these commits: https://github.com/droolsjbpm/drools/commit/c88626c77dff0ef5c56deea6de3fe9dd8581488d https://github.com/droolsjbpm/drools/commit/d87f305ee651846785b5ee47135241d2a49cdb7a I think the TruthMaintenanceTest are not real failures but only test issues causes by the comparison of the byte[] created by 2 subsequent serializations. We already experienced a similar problem migrating from Java6 to Java7. For now I ignored those serialization failures with this commit https://github.com/droolsjbpm/drools/commit/c7af96d1e Anyway the generated byte[] or of the same size, so very likely the test failures are only caused by a different iteration order. I also updated the ASM version embedded in mvel, even if this is will be available only when I'll drop another release of mvel. Anyway this is not strictly necessary to make drools to run on Java 8 (even if it generates Java7 bytecode for now). I am reassigning this ticket to Michael because, for what I know, at the moment there is an issue on drools-wb. This issue is mainly caused by the currently used version of GWT that doesn't provide Java8 support. I ran kie-wb and kie-drools-wb on EAP6.3 with Java 8 and (other than the above referenced bug - which is now fixed) found the workbenches to work OK (I only did a quick test and examination of the logs). One issue I did notice is this: 10:12:39,813 INFO [org.apache.sshd.common.util.SecurityUtils] (MSC service thread 1-9) BouncyCastle not registered, using the default JCE provider 10:12:42,081 INFO [org.guvnor.m2repo.backend.server.GuvnorM2Repository] (MSC service thread 1-9) Maven Repository root set to: repositories/kie 10:12:42,081 INFO [org.guvnor.m2repo.backend.server.GuvnorM2Repository] (MSC service thread 1-9) Creating Maven Repository root: repositories/kie 10:12:42,195 INFO [org.jbpm.console.ng.asset.backend.server.AssetMgmtDeploymentUnitProvider] (MSC service thread 1-9) Found guvnor asset management deployment unit org.guvnor:guvnor-asset-mgmt-project:6.3.0-SNAPSHOT [strategy=SINGLETON] attempting to deploy it ***** 10:12:44,988 ERROR [stderr] (MSC service thread 1-9) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found ***** 10:12:46,402 WARN [org.jbpm.ruleflow.core.validation.RuleFlowProcessValidator] (MSC service thread 1-9) Process variable Data uses ObjectDataType for default type (java.lang) which could cause problems with setting variables, use dedicated type instead 10:12:46,636 WARN [org.jbpm.ruleflow.core.validation.RuleFlowProcessValidator] (MSC service thread 1-9) Process variable Data uses ObjectDataType for default type (java.lang) which could cause problems with setting variables, use dedicated type instead The ERROR is thrown when deploying the guvnor-asset-mgmt-project JAR to the jBPM runtime. I therefore assume (perhaps incorrectly) that there might be an issue with jBPM runtime and Java 8. Re-assigning to a jBPM developer for consideration. There seems to be a change in JS script engine between JDK7 and JDK8, and it's basically saying it can't find the JDK7 one on JDK8. I don't think this is something we can fix in our code base. https://issues.jboss.org/browse/WFLY-3991 Since all work in our code base related to this is done, setting this one to MODIFIED. Verified. I wrote a small JUnit test that used JDK8 and ran it with drools.dialect.java.compiler.lnglevel property set to 1.8. Additional info: Drools and jBPM work on Java 8, but Java 8 syntax cannot be used in DRL rules. There is another Bugzilla ticket for this [1]. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1199965 Mario Fusco <mario.fusco> updated the status of jira DROOLS-329 to Resolved |