Bug 821682

Summary: Designer is broken, throws NPEs and CCEs
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: jBPM 5Assignee: Kris Verlaenen <kverlaen>
Status: VERIFIED --- QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: rzhang
Target Milestone: ER8   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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
repo to test with
none
full server log none

Description Zuzana Krejčová 2012-05-15 10:40:31 UTC
Description of problem:
The Designer got seriously broken in ER7. When I try to open/validate/save a simple process of mine, it throws some ClassCastExceptions, NullPoinerExceptions, org.eclipse.emf.ecore.resource.Resource$IOWrappedException, process opens but the canvas is blank after for the second and later openings/processes. 
And tries to convince me upon validation that my Parallel Gateway needs to have direction set to Diverging or Converging when looking at the source via the icons next to those gateways shows it it already set so. The process can't be saved.

I'm writing all of this as one report, because the reason for these problems seems to be some class import issue, or some such mistake. See these exceptions:

java.lang.ClassCastException: org.eclipse.bpmn2.impl.Bpmn2FactoryImpl cannot be cast to org.omg.spec.bpmn._20100524.model.ModelFactory
 	at org.omg.spec.bpmn._20100524.model.impl.ModelFactoryImpl.init(ModelFactoryImpl.java:34)

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature 'definitions' not found. (inputStream://dummyUriWithValidSuffix.xml, 2, 514)
 	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
...
Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'definitions' not found. (inputStream://dummyUriWithValidSuffix.xml, 2, 514)
 	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeature(XMLHandler.java:1991)
...

ERROR [JbpmProfileImpl] 
java.lang.NullPointerException
	at org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshallDefinitions(Bpmn2JsonMarshaller.java:201)


The problem lies solely with the Designer, Guvnor can build the package and instances of processes can be started in the Console, human tasks executed. All worked well in ER6.


Version-Release number of selected component (if applicable):
BRMS 5.3 ER7


Steps to Reproduce:
(With standalone package, modified only brms-users.properties, brms-roles.properties to include the admin and some more users, jbpm-human-task.war web.xml to use sample users and groups.)
1. Log into Guvnor, import the provided repository.
2. Open the Evaluation process inside the defaultPackage.
3. Validate the process.
4. Look at the server logs.
5. Open the Hello process.
6. Look again at the logs.

Comment 1 Zuzana Krejčová 2012-05-15 10:41:15 UTC
Created attachment 584636 [details]
repo to test with

Comment 2 Zuzana Krejčová 2012-05-15 10:42:31 UTC
Created attachment 584637 [details]
full server log

Comment 3 Zuzana Krejčová 2012-05-15 11:08:18 UTC
Oh and processes can't be saved. I have a freshly made process added to the repo, made in the Designer. Validation says it's ok, but it cannot be saved, prompting me to validate again. With the same results. And stack traces in the server log.

Comment 4 Tihomir Surdilovic 2012-05-15 11:58:24 UTC
I need to know two things in order to attempt to fix:

1) What branch did you guys use to build designer for ER7
2) Is the production build process changing the dependencies to drools and jbpm jars in designer before deploying?


Please attach or email me the designer war used for ER7 and I will also test locally.

Comment 7 Tihomir Surdilovic 2012-05-15 17:27:03 UTC
Fix is available in the Designer 2.2.x branch and the jBPM 5.2.x branch. This will require a build of jbpm and designer in order to get fixed.

Designer has dependencies to drools in jbpm in its pom.xml. I was wondering if anyone could tell me if product build is changing those or keeping them to point to community versions? Please let me know.

Thanks.

Comment 8 Lukáš Petrovický 2012-05-16 06:39:46 UTC
(In reply to comment #7)
> Designer has dependencies to drools in jbpm in its pom.xml. I was wondering if
> anyone could tell me if product build is changing those or keeping them to
> point to community versions? Please let me know.

Let's have someone from productization to answer that. Trevor?

Comment 9 Ryan Zhang 2012-05-16 08:23:20 UTC
(In reply to comment #7)
> Fix is available in the Designer 2.2.x branch and the jBPM 5.2.x branch. This
> will require a build of jbpm and designer in order to get fixed.
> 
> Designer has dependencies to drools in jbpm in its pom.xml. I was wondering if
> anyone could tell me if product build is changing those or keeping them to
> point to community versions? Please let me know.
Yes, I change it to from 5.3.0-ER6 to 5.3.0.BRMS-ER7 which should reflect the latest drools and jbpm version.
Should I not to use the latest one, Tihomir?

> 
> Thanks.

Comment 10 Tihomir Surdilovic 2012-05-16 12:36:06 UTC
Yes, definitely change them :) Thanks!

Comment 11 Ryan Zhang 2012-05-25 09:08:19 UTC
Please verify them on ER8.