Bug 1066600

Summary: Inner classes break the Data Modeler
Product: [Retired] JBoss BPMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Data ModelerAssignee: Walter Medvedeo <wmedvede>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Livora <tlivora>
Severity: urgent Docs Contact:
Priority: high    
Version: unspecifiedCC: jlocker, kverlaen, lpetrovi, mbaluch, rrajasek
Target Milestone: ER2Keywords: Regression, TestBlocker
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:02:49 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
server.log with exception stack trace none

Description Zuzana Krejčová 2014-02-18 17:16:35 UTC
Description of problem:
If a project contains a class/data object with an inner class, Data Modeler fails to load the project's model. User gets an error message:

Error: "An error occurred when the requested data model was loaded from server". The server error is: "Data model couldn't be loaded, path: PathImpl{uri='default://master@repo/project', fileName='project', attrs={}}, projectPath: PathImpl{uri='default://master@repo/project', fileName='project', attrs={}}."

The server log contains further information:
ERROR [org.kie.workbench.common.screens.datamodeller.backend.server.DataModelerServiceImpl] (http-localhost/127.0.0.1:8080-6) 
Data model couldn't be loaded, path: PathImpl{uri='default://master@repo/project', fileName='project', attrs={}}, projectPath: PathImpl{uri='default://master@repo/project', fileName='project', attrs={}}.: org.uberfire.java.nio.file.NoSuchFileException

This is due to JGitUtil.checkPath(..) that throws NoSuchFileException if a file is not found - which of course happens because for each DataObjectTO from the projects model, this checkPath method is called and checks that a .java file exists. There is no such file for inner classes.

More plainly - if I have a class A that has an inner class B, I will have one file for both, A.java. But as things are now, the product searches for file A$B.java as well.


Version-Release number of selected component (if applicable):
BPMS 6.0.1 ER1


Additional info:
It is pretty much impossible to tell where is the problem just from the error message.
This issue is a regression from 6.0.0.

Comment 1 Jiri Locker 2014-02-18 17:25:11 UTC
Created attachment 864653 [details]
server.log with exception stack trace

Comment 2 Walter Medvedeo 2014-02-19 11:01:09 UTC
Hello,
Could you please attach the .java files you are using for the test?
Thanks!

Comment 3 Walter Medvedeo 2014-02-19 19:05:10 UTC
The following commits solves the issue.

master URL: http://github.com/droolsjbpm/kie-wb-common/commit/0b5f2ff15

6.0.x URL: http://github.com/droolsjbpm/kie-wb-common/commit/dd2f106d0

Comment 4 Tomas Livora 2014-03-05 14:49:43 UTC
Verified on BPMS 6.0.1 ER2