Bug 1006709
Summary: | Drools scripts for EPN does not work | ||
---|---|---|---|
Product: | [JBoss] JBoss Fuse Service Works 6 | Reporter: | Jiri Pechanec <jpechane> |
Component: | RT Governance | Assignee: | Gary Brown <gbrown> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Jiri Sedlacek <jsedlace> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.0 GA | CC: | atangrin, etirelli, kbabo, kconner, ldimaggi, lpetrovi, mfusco, ncross, oskutka, soa-p-jira |
Target Milestone: | ER3 | Flags: | gbrown:
needinfo-
|
Target Release: | 6.0.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jiri Pechanec
2013-09-11 07:19:04 UTC
Just to highlight - it uses Maven resolution now which is not present as a module, this is the cause of CFNE Keith - I assume swyd still packages up the Drools/KIE modules in the SOA platform? If so, any idea why the sonatype class is not longer available? Yep, we still package Drools/KIE. We don't package any modules related to Maven resolution from Drools/KIE and to the best of my knowledge we never have. The only thing that has really changed in this area is the bump to Drools/KIE 6.0.0.CR1. Some questions: 1) When did this start breaking? Between which two builds? 2) Do you see these modules in earlier ER/DR builds? It worked in ER1 and it does not work in ER2. I assume the rules quickstarts that we ship for SY still work in ER2, so that leads me to think the gov code which is calling Drools or Drools itself has changed between ER1 and ER2. I've just tried rtgov master against swyd master (with drools/kie 6.0.0.CR1) and the sample EPNs worked fine. However if the code is incorrect, can you get Lukas to provide guidance/reference on how it should be done? @Nick - any idea what changes in the build between ER1 and 2 could have caused this? It works in community with latest releases and nothing relevant appears to have changed in rtgov and swyd? Problem has been reproduced in community using Drools/KIE 6.0.0.CR2. It looks like a dependency problem. For CR2 we started aligning dependencies with other projects, so I suggest you take a look at the dependencies you have in the classpath. In particular, the class it is reporting is not found seems to belong to the aether-api-1.13.1 jar. Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.resolution.ArtifactResolutionException http://grepcode.com/file/repo1.maven.org/maven2/org.sonatype.aether/aether-api/1.13.1/org/sonatype/aether/resolution/ArtifactResolutionException.java Have changed the implementation to use the same internal/deprecated classes used by switchyard for now. However we need to move to the new approach in the original implementation for GA. Gary Brown <gary> updated the status of jira RTGOV-271 to Resolved I looked into the problem in detail and it appears that the code is actually correct. It is the new way of doing this sort of thing. (Therefore, I retract my original statement about there being a better way through which Maven can be avoided.) So, there's two possibilities: a) Maybe Drools doesn't need to use Maven all the time and it should be brought up with them. b) More likely - you just need to add the additional dependencies to the classpath. Also, the following class already does what you are doing, so you can use it instead: https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/ca4988b7ba58a9a2612eb301be0a8b80976b0d18/kie-internal/src/main/java/org/kie/internal/utils/KieHelper.java (However, it is in the kie-internal-api, and that one has far less guarantees on future stability.) Ivan McKinley found this ref: https://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound Might explain the original issue. Quick premise: I'd need to reproduce this issue to have a full understanding of what is going wrong, but at the moment I don't know how, so this comment will be based on the following assumptions (that could be very likely wrong): 1. You have the kie-ci module in your classpath: org.kie.scanner.MavenClassLoaderResolver and org.kie.scanner.ArtifactResolver classes that I can see in the Exception stack belongs to that module, so this is hardly rebuttable. 2. Conversely you don't have aether-api in your classpath, or you have a different (older?) version from the 1.13.1 used by kie-ci and this is why you are getting that NoClassDefFoundError 3. Since aether-api is a dependency of kie-ci you explicitly excluded it from your pom file If this is true, and you don't want to depend on aether, the quickest solution (that doesn't require any change to your code) is to just also exclude kie-ci on your classpath. In fact our ServiceRegistry is automatically choosing the MavenClassLoaderResolver class as implementation class for the ClassLoaderResolver service only because it can find it in the classpath. If it couldn't it would select the NoDepsClassLoaderResolver instead that doesn't require any aether dependency. To cut it short, either have both kie-ci and aether-api in your classpath or none of them. I hope this helps, but again if my assumptions are wrong please provide a test case that could allow me to investigate this issue in more details. Hey Mario - regarding #3, this is an error at runtime in AS, so it's a JBoss AS module dependency issue and not a Maven pom issue. I have asked David why the kie-ci module is included today. I did a quick scan of the code and I don't see any direct use of the contents of kie-ci in our codebase. Perhaps it was a dependency of the Drools codebase at some time in the past and David had to include it to get things working. Or maybe it's just a legacy of some prior experimentation with Maven resolution support. In any case, we can definitely investigate removing this module dependency altogether. Just to confirm: kie-ci is not a required dependency of Drools or jBPM if we are not using the Maven resolution feature, right? Thanks for your help! This is right Keith, kie-ci is completely optional and if you don't need to use any maven related feature you can safely leave it out. Verified in ER3 Gary Brown <gary> updated the status of jira RTGOV-271 to Closed |