Bug 1066600 - Inner classes break the Data Modeler
Summary: Inner classes break the Data Modeler
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Data Modeler
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ER2
: 6.0.1
Assignee: Walter Medvedeo
QA Contact: Tomas Livora
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-18 17:16 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:02:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
server.log with exception stack trace (8.29 KB, text/plain)
2014-02-18 17:25 UTC, Jiri Locker
no flags Details

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


Note You need to log in before you can comment on or make changes to this bug.