-
Bug
-
Resolution: Done
-
Critical
-
None
-
6.0.1
-
None
Description of problem:
This is a continuation of BZ1099393.
There seem to be more cases to be handled as WARN rather then ERROR in org.guvnor.common.services.builder.Builder.build().
A) java.lang.SecurityException
If you have a dependency of org.springframework:spring-jdbc in a project, "Build & Deploy" fails and you will get ERROR logs.
====
16:42:50,559 ERROR [org.guvnor.common.services.builder.Builder] (http-localhost.localdomain/127.0.0.1:8080-2) Verification of class org.apache.derby.client.ClientXAConnection failed and will not be available for authoring.
...
====
The root Exception is not logged but with a debugger, I observed:
java.lang.SecurityException: sealing violation: package org.apache.derby.jdbc is sealed
B) java.lang.NullPointerException
If you have a dependency of com.sun.xml.bind:jaxb-xjc in a project, "Build & Deploy" fails and you will get ERROR logs.
====
16:58:16,905 ERROR [org.guvnor.common.services.builder.Builder] (http-localhost.localdomain/127.0.0.1:8080-2) Verification of class 1.0.com.sun.tools.xjc.runtime.Util failed and will not be available for authoring.
...
====
The root Exception is not logged but with a debugger, I observed:
java.lang.NullPointerException
Because kieModuleMetaData.getClass() returns null and then a NPE is thrown in getClassSource().
Builder.java
====
try
catch ( Throwable e )
{ final String msg = MessageFormat.format( ERROR_EXTERNAL_CLASS_VERIFICATON, fullyQualifiedClassName ); logger.error( msg ); results.addBuildMessage( makeErrorMessage( msg ) ); }====
Probably it should be treated as WARN as soon as kieModuleMetaData.getClass() returns null.
Steps to Reproduce:
1. Create a new project in business-central
2. "Add" these dependencies in Project Editor.
Group ID : org.springframework
Artifact ID : spring-jdbc
Version ID : 3.1.1.RELEASE
Group ID : com.sun.xml.bind
Artifact ID : jaxb-xjc
Version ID : 2.2.1.1
3. Press "Build&Deploy"
Actual results:
ERROR level messages are logged and build failed.
Expected results:
Only WARN level messages are logged and build successful.
Additional Information:
In addition to the above, can you fix Builder.build() to log the original Exception?