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 { final Class clazz = kieModuleMetaData.getClass( packageName, className ); final TypeSource typeSource = getClassSource( kieModuleMetaData, clazz ); ... } 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?
Fixed by https://github.com/droolsjbpm/guvnor/commit/9e42c09bf
Cherry-picked to 6.0.x branch with https://github.com/droolsjbpm/guvnor/commit/a791d57af
Verification failed in BPMS 6.0.3.ER1 When I use just the spring-jdbc dependency I will get the following exception as WARN: 14:38:58,894 WARN [org.guvnor.common.services.builder.Builder] (EJB default - 4) Verification of class org.apache.derby.client.am.Connection failed and will not be available for authoring. Please check the necessary external dependencies for this project are configured correctly.: java.lang.SecurityException: sealing violation: package org.apache.derby.jdbc is sealed However, the build fails. From the description of the BZ that should not happen. The build also fails when I try to build a project containing spring-jdbc and jaxb-xjc dependencies. The project only with the jaxb-xjc dependency is built successfully.
Thanks Mario. I have one idea what it could cause it, hence I will try it today. Verified in BPMS 6.0.3.ER1.