Hide Forgot
Created attachment 1138619 [details] server.log with NullPointerException Description of problem: KIE Server logs exception when a container version is changed to LATEST. Version-Release number of selected component (if applicable): 6.3.0.ER1 How reproducible: - Steps to Reproduce: 1. Start a KIE Server with 'my_server' ID. 2. Log in to Business Central, go to Rule Deployments. 3. Add a container to 'my_server' template. Use any project built and deployed in Business Central. 4. In container's Version Config tab, change its version to 'LATEST' and click Upgrade. Actual results: No visible response in UI. Error message in server log. Sometimes it's: > [org.kie.server.services.impl.KieServerImpl] Error updating releaseId for container 'testcontainer': java.lang.NullPointerException > at org.drools.compiler.kie.util.ChangeSetBuilder.build(ChangeSetBuilder.java:56) sometimes: > [org.kie.server.services.impl.KieServerImpl] Error creating container 'testcontainer' for module 'example:test-project:LATEST': java.lang.RuntimeException: Cannot find KieModule: example:test-project:LATEST > at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:117) Expected results: No error. Additional info:
Created attachment 1138620 [details] server.log with RuntimeException
Created attachment 1138639 [details] kie-maven-settings.xml I have kie.maven.settings.custom system property pointing to this Maven settings file. Business Central and KIE Server are deployed on the same EAP 6 server so they both use the same settings.
I wasn't able to reproduce this with simple (standalone) kie-server itest (not involving the controller). The container is correctly updated to the "LATEST" version. This could be related to the custom Maven settings config. Would it be possible to get a full server log, ideally with DEBUG enabled?
I won't be able to get the DEBUG log by the end of this week. I wonder if https://bugzilla.redhat.com/show_bug.cgi?id=1303018 may be related to this.
Jiri, I don't think that this issue can be related with that other BZ you linked. If the cause was that I guess it just wouldn't find the last KieModule's version and didn't throw that NPE in the ChangeSetBuilder. I'm still unable to reproduce this problem so please keep me updated on this.
Created attachment 1141337 [details] Full server.log on DEBUG Attaching full server log on DEBUG level. Look for two errors: 1) Error updating releaseId for container 'container1': java.lang.NullPointerException This is after upgrading the container version from 1.0-SNAPSHOT to LATEST. 2) Error creating container 'container1' for module 'org.jboss.qa:remote-kjar:LATEST': java.lang.RuntimeException: Cannot find KieModule: org.jboss.qa:remote-kjar:LATEST This is logged during server startup after the container was upgraded to LATEST. Different exceptions but the cause should be same. We investigated with Petr and found out that maven-metadata.xml in repositories/kie/org/jboss/qa/remote-kjar is missing the <latest> tag, which is supposed to contain version of the latest snapshot release. If I build the project with a final version, though, <release> tag is added to maven-metadata.xml and that's why upgrading to RELEASE version works.
Created attachment 1141338 [details] Maven metadata with snapshots only
Created attachment 1141339 [details] Maven metadata with snapshots and releases
The root cause seems to be hidden somewhere in the deploy code of Aether/Maven. maven-deploy-plugin suffers from the same, so there is likely not much we can do at this point. We need to figure out if this is a bug and if so, report upstream JIRA for Aether/Maven. Generally, we should discourage people from using LATEST and RELEASE version strings. Maven itself does not support them either and they are bringing a lot of other issues.
I've created reproducer directly in kie-ci: https://github.com/droolsjbpm/drools/pull/710
I investigated this issue using the reproducer provided by Petr and I agree with him that there's no way to fix this. In reality this problem looks identical to the one I reported on the Aether mailing-list more than a year ago https://dev.eclipse.org/mhonarc/lists/aether-users/msg00529.html and for which the only answer I received was: "LATEST is broken by design !!!!" It also worth to be mentioned that support for RELEASE and LATEST has been deprecated (if not removed) in Maven 3.x since this has the problem of leading to non-reproducible builds https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-PluginMetaversionResolution For these reasons we strongly suggest to also deprecate support for these metaversions label in BRMS 6.3 and totally remove it in 7.x.
Tomas, can we have this documented somewhere? (The fact that LATEST is problematic and should not be used in Maven projects?)
Created issue https://issues.jboss.org/browse/BXMSDOC-256 .