Bug 724659 (BRMS-562)

Summary: After importing sample (or any other) repository and restarting server the ValidationException is thrown. ModeShape used.
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Petr Široký <psiroky>
Component: ModeshapeAssignee: Randall Hauch <rhauch>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 5.1.0 GACC: psiroky, rhauch, vhalbert
Target Milestone: ---   
Target Release: 5.1.0.PostGA   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/BRMS-562
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
ModeShape from SOA 5.1 GA (revision 2692) Local MySQL 5.1 database.
Last Closed: 2011-03-22 23:56:28 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:
Bug Depends On:    
Bug Blocks: 780543    
Attachments:
Description Flags
brms-jdbc-ds.xml
none
components.xml
none
modeshape-config.xml
none
modeshape-validationException.png
none
mortgage-sample-repository.xml
none
server.log none

Description Petr Široký 2011-03-04 11:33:10 UTC
Steps to Reproduce: 1. Download BRMS 5.1.0 GA standalone, install ModeShape
2. Start the server, log into Guvnor and import the sample repository when promted
3. Restart the server and log in again. The error appears.
securitylevel_name: Public

When the sample rules repository is imported, then the server is restarted and user log again into Guvnor GUI, the org.modeshape.graph.session.ValidationException is thrown. This only happens when ModeShape is used as JCR backend.

The line with excpetion: 
org.modeshape.graph.session.ValidationException: Missing primary node type "drools:categoryNodeType" for node /drools:repository/drools:tag_area/Home Mortgage in workspace "default" of "JCR brms-store"

The whole stacktrace is in attached server.log file starting on line 435.

Tested with HSQL and local MySQL.

Comment 1 Petr Široký 2011-03-04 11:34:39 UTC
Attached config files, log file and screenshot.

Comment 2 Petr Široký 2011-03-04 11:34:39 UTC
Attachment: Added: brms-jdbc-ds.xml
Attachment: Added: components.xml
Attachment: Added: modeshape-config.xml
Attachment: Added: modeshape-validationException.png
Attachment: Added: mortgage-sample-repository.xml
Attachment: Added: server.log


Comment 3 Len DiMaggio 2011-03-07 14:21:30 UTC
Randall - this is blocking our BRMS 5.1 certification with Modeshape - can you look at this on Monday? Thx!

Comment 4 Petr Široký 2011-03-08 10:35:23 UTC
Link: Added: This issue is related to BRMS-557


Comment 5 Van Halbert 2011-03-08 14:52:27 UTC
Is this an issue also for the default database HSQLDB, or only MySQL?   

Comment 6 Randall Hauch 2011-03-08 14:57:18 UTC
Can you verify that the "/drools:repository/drools:state_area/Draft" node can be loaded before BRMS is shut down and restarted? 

Comment 7 Van Halbert 2011-03-08 15:17:05 UTC
If your Mysql db is using InnoDB, can you use the InnoDB, org.hibernate.dialect.MySQLInnoDBDialect.

Comment 8 Petr Široký 2011-03-08 23:35:22 UTC
Yes, this is an issue for both HSQL and MySQL, same exception is thrown.

Before restart the GUI is responding to all commands without errors, so the "/drools:repository/drools:state_area/Draft" node is probably loaded successfully, but I can't be absolutely sure, because I don't know what operations the Guvnor is doing underneath.

Comment 9 Petr Široký 2011-03-09 16:07:07 UTC
Same exception with org.hibernate.dialect.MySQLInnoDBDialect.

Comment 10 Randall Hauch 2011-03-11 16:06:44 UTC
Link: Added: This issue Cloned to BRMS-568


Comment 11 Randall Hauch 2011-03-12 00:37:36 UTC
I've diagnosed the problem (see MODE-1113), and have a proposed fix:

https://github.com/ModeShape/modeshape/pull/34

We will definitely merge this fix into the 'master' branch, but I need advice on how this should be merged into the '2.2.x' branch (and what is needed, if anything, for a patch).

Comment 12 Randall Hauch 2011-03-14 20:40:32 UTC
The previous changes were for 'master', and need to be slightly altered for the '2.2.x' branch due to more recent changes with the unit test framework introduced in 'master' after 2.4. I generated a different pull-request for the 2.2.x changes: https://github.com/ModeShape/modeshape/pull/35

These were committed to the '2.2.x' branch, after approval from [~vhalbert]. For details, see MODE-1113.

Comment 13 Van Halbert 2011-03-15 14:57:14 UTC
Link: Added: This issue is a dependency of SOA-2976


Comment 14 Randall Hauch 2011-03-16 18:20:14 UTC
I have marked MODE-1113 as resolved. If there continues to be a problem with this issue, please reopen MODE-1113.

Comment 15 Van Halbert 2011-03-16 20:17:41 UTC
Patch has been created.

Comment 16 Van Halbert 2011-03-16 20:17:41 UTC
Link: Added: This issue depends SOA-2976