Bug 996905

Summary: ClassNotFoundException when uploading a POJO jar which contains a sub class only
Product: [Retired] JBoss BRMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: Business CentralAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: medium Docs Contact:
Priority: high    
Version: 5.x.xCC: brms-jira, etirelli, ibek
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 996896 Environment:
Last Closed: 2014-08-06 20:17:23 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:

Description Toshiya Kobayashi 2013-08-14 09:16:22 UTC
+++ This bug was initially created as a clone of Bug #996896 +++

Description of problem:

Platform BZ for https://issues.jboss.org/browse/GUVNOR-2043

Steps to Reproduce:
Use reproducer attached to GUVNOR-2043

1. Upload 'includingSuper.jar' to deafultPackage via Guvnor's 'Upload POJO Model jar'
2. Upload 'excludingSuper.jar' to deafultPackage via Guvnor's 'Upload POJO Model jar'

Actual results:

Throws ClassNotFoundException

Expected results:

jar is uploaded without Exception

Comment 1 Toshiya Kobayashi 2013-08-14 09:22:04 UTC
I see that droolsjbpm master doesn't have ModelContentHandler class any more. But I have cloned this BZ for the case that BRMS 6 still have a function which generates 'import' headers from POJO jars (I couldn't confirm that with 6.0.0.DR6).

If this issue is not really related to BRMS 6, please close.

Comment 2 manstis 2013-09-06 15:51:35 UTC
Please check if this is a problem in 6.0; if it is please create a unit test for drools compiler/core and reassign to Mario.

Comment 3 Jervis Liu 2013-09-09 05:58:41 UTC
6.0 has no problem to upload a jar file into Guvnor m2 repo. But it has problem to extend from a pojo class from a third-party jar.

How to reproduce:

1. Upload includingSuper.jar (attached) into Guvnor m2 repo

2. Open demo -> uf-playground -> GuvnorM2RepoDependencyExample1, goto "Dependencies:dependencies list" editor, add includingSuper.jar as a dependency (use "add from repository"). 

3. Use data modeller or modify Bean.java directly, to make it extends from com.sample.SuperClass. the result is like below:

public class Bean extends com.sample.SuperClass implements java.io.Serializable {
static final long serialVersionUID = 1L;    
    @org.kie.api.definition.type.Position(value = 0)
    private java.lang.Integer value;

    public Bean() {
    }
    public Bean(java.lang.Integer value) {
        this.value = value;
    }    
    public java.lang.Integer getValue() {
        return this.value;
    }
    public void setValue(  java.lang.Integer value ) {
        this.value = value;
    }
}

4. project "build & deploy" fails.

Comment 7 Mario Fusco 2013-10-08 14:24:15 UTC
I tried to reproduce this issue, but even after having added the jar as dependency for the GuvnorM2RepoDependencyExample1 I didn't find the jar classes in the superclass dropdown menu of the data modeller. 

I talked about this problem with Toni and he will look into it.

Comment 8 Toni Rikkola 2013-10-17 21:35:30 UTC
Ok, back to you Mario.
I suspect there was a bug that prevented the classes from showing up, but looks like it works now.

Comment 9 Ivo Bek 2014-01-13 13:43:27 UTC
Verified in BPMS 6.0.0.ER7 that it is possible to use a third party dependency (another kjar) in a project.

Comment 10 JBoss JIRA Server 2015-12-04 15:18:04 UTC
Toni Rikkola <toni> updated the status of jira GUVNOR-2043 to Closed