Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1112962

Summary: Error logging in org.jbpm.kie.services.impl.KModuleDeploymentService.deploy()
Product: [Retired] JBoss BPMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED EOL QA Contact: Ivo Bek <ibek>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.1CC: kverlaen
Target Milestone: DR2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:08:47 UTC 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:
Attachments:
Description Flags
jbpm-spring-example.jar
none
jBPM6Ex18_mvn_spring.zip none

Description Toshiya Kobayashi 2014-06-25 06:51:54 UTC
Description of problem:

When deployment ([New Deployment Unit] in [Deployment Units] or REST /deployments/{deploymentId}/deploy) fails with RuntimeException/Error, no error messages is logged in server.log. 

RuntimeException/Error is not caught by KModuleDeploymentService.deploy() and upper layer classes don't log it either.

Steps to Reproduce:
1. 'Upload' jbpm-spring-example.jar in [Artifact Repository] (need to specify GAV because this doesn't include pom.xml)
2. [New Deployment Unit] in [Deployment Units] (specify the GAV you set in step 1)
3. Deployment failed

Actual results:

No error log in server.log

Expected results:

Error log with a stack trace in server.log

Additional info:

In case you use GUI ([New Deployment Unit] in [Deployment Units]), you can see the thrown Exception in DEBUG log of 'org.jboss.errai.bus.server'

This particular reproduce step throws NoClassDefFoundError so you may want to treat it just like ClassNotFoundException. But the main concern of this BZ is logging all RuntimeException/Error anyway.

Comment 1 Toshiya Kobayashi 2014-06-25 06:52:49 UTC
Created attachment 911932 [details]
jbpm-spring-example.jar

Comment 2 Toshiya Kobayashi 2014-06-25 06:55:20 UTC
Created attachment 911933 [details]
jBPM6Ex18_mvn_spring.zip

Just in case, I'm attaching the maven project of the jbpm-spring-example.jar. I intentionally exclude the pom.xml to reproduce the issue.

Comment 3 Maciej Swiderski 2014-07-02 12:54:57 UTC
fixed by catching all exceptions (Throwable) then logging them and rethrowing as RuntimeException so it can be successfully delivered to the client/caller 

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/1e94dad7f818ed44f42880a7cb798f4b3751abe1

6.1.x:
https://github.com/droolsjbpm/jbpm/commit/c1ffb70881e32552ef502dc537ce298a053bbe67

Comment 4 Ivo Bek 2014-09-05 09:36:04 UTC
Verified in BPMS 6.1.0.DR2

Using the reproducer, server log contains:

11:30:31,316 WARN  [org.jbpm.kie.services.impl.KModuleDeploymentService] (http-localhost/127.0.0.1:8080-1) Unexpected error while deploying unit org.jboss:espring:1.0: java.lang.IllegalArgumentException: Class com.sample.MyService not found in the project
	at org.jbpm.kie.services.impl.KModuleDeploymentService.processResources(KModuleDeploymentService.java:304) [jbpm-kie-services-6.2.0.Beta1-redhat-1.jar:6.2.0.Beta1-redhat-1]
....