Bug 724798 (BRMS-638) - Repository initialization fails with ModeShape
Summary: Repository initialization fails with ModeShape
Keywords:
Status: VERIFIED
Alias: BRMS-638
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor), Modeshape
Version: BRMS 5.2.0-Dev1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: BRMS 5.2.0.GA
Assignee: manstis
QA Contact: Jiri Locker
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks: BRMS-576
TreeView+ depends on / blocked
 
Reported: 2011-07-13 11:34 UTC by Jiri Locker
Modified: 2021-09-15 11:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Encountered with MySQL 5.1, MS SQL 2008, Oracle 11g R2. Not encountered with DB2 and PostgreSQL 8.4.
Last Closed:
Type: Bug


Attachments (Terms of Use)
server.log (12.19 KB, text/plain)
2011-07-13 11:35 UTC, Jiri Locker
no flags Details
server.log with hibernate INFO (75.41 KB, text/plain)
2011-07-22 13:48 UTC, Jiri Locker
no flags Details
modeshape-debug.log (3.32 KB, text/plain)
2011-07-22 13:53 UTC, Jiri Locker
no flags Details
server.log with a recent Modeshape (BRMS 5.2.0 ER2) (102 bytes, text/plain)
2011-08-12 14:43 UTC, Lukáš Petrovický
no flags Details
Modeshape configuration used (108 bytes, text/plain)
2011-08-12 14:44 UTC, Lukáš Petrovický
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 724784 0 high CLOSED Saving package configuration breaks the package when ModeShape is used. 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 724805 0 high CLOSED Intermittent/recurring error seen with MySQL 5.1 and Modeshape - with BRMS 5.2 ER1 - MySQLIntegrityConstraintViolationEx... 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker BRMS-638 0 Blocker Closed Repository initialization fails with ModeShape 2019-04-25 12:24:20 UTC
Red Hat Issue Tracker MODE-1225 0 Critical Closed MySQL 5.1 - UTC_TIMESTAMP is reserved and fails when the DNA_CHANGELOG table is trying to be created 2019-04-25 12:24:20 UTC
Red Hat Issue Tracker MODE-1245 0 Critical Closed When using ModeShape, BRMS and MySQL, there's a timing issue when nodes are being checked in, causing an ItemNotFoundExc... 2019-04-25 12:24:20 UTC

Internal Links: 724784 724805

Description Jiri Locker 2011-07-13 11:34:49 UTC
Affects Testing: Blocks Testing
securitylevel_name: Public

Exception is thrown during repository initialization, BRMS fails to deploy.

Comment 1 Jiri Locker 2011-07-13 11:35:32 UTC
Attachment: Added: server.log


Comment 2 Jiri Locker 2011-07-19 08:21:38 UTC
Affects Testing: Added: [Blocks Testing]


Comment 3 Randall Hauch 2011-07-19 15:50:08 UTC
It's strange that it works for some DBMSes but not others. Could this be due to the differences in transaction isolation level? That kind of makes sense that the database needs a bit more liberal isolation.

I'd suggest changing the isolation level for Oracle or MySQL, and trying again. If that works, then try it for the other two DBMSes.

Comment 4 Randall Hauch 2011-07-20 14:11:13 UTC
Assigning to Kurt as he requested: "I would say the only way is to reproduce it in an integration test to reproduce, so that we can isolate and understand the issue, then if it turns out to be a ModeShape issue we can ask Randall for help. Please assign to me and i will take a look. It'd be great to have a debug trace of this as well."

Comment 5 Randall Hauch 2011-07-20 14:13:16 UTC
Link: Added: This issue relates to BRMS-622


Comment 7 Len DiMaggio 2011-07-20 18:39:44 UTC
Link: Added: This issue relates to BRMS-646


Comment 8 Jiri Locker 2011-07-22 13:48:15 UTC
Created attachment 514701 [details]
server.log with hibernate INFO

I've attached server log containing hibernate logging at INFO level. I find these entries interesting:

2011-07-22 15:23:48,478 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (modeshape-start-repo-2-thread-1) Running hbm2ddl schema export
2011-07-22 15:23:48,479 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (modeshape-start-repo-2-thread-1) exporting generated schema to database
2011-07-22 15:23:49,368 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (modeshape-start-repo-2-thread-1) Unsuccessful: create table DNA_CHANGELOG (ID bigint not null auto_increment, CHANGES longblob not null, CHANGE_COUNT integer not null, UTC_TIMESTAMP bigint not null, USERNAME varchar(64) not null, primary key (ID)) ENGINE=InnoDB
2011-07-22 15:23:49,369 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (modeshape-start-repo-2-thread-1) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UTC_TIMESTAMP bigint not null, USERNAME varchar(64) not null, primary key (ID)) ' at line 1
2011-07-22 15:23:50,358 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (modeshape-start-repo-2-thread-1) Unsuccessful: create index NS_CHANGE_TS_INX on DNA_CHANGELOG (UTC_TIMESTAMP)
2011-07-22 15:23:50,358 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (modeshape-start-repo-2-thread-1) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UTC_TIMESTAMP)' at line 1
2011-07-22 15:23:51,866 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (modeshape-start-repo-2-thread-1) schema export complete

Comment 9 Jiri Locker 2011-07-22 13:53:41 UTC
Created attachment 514706 [details]
modeshape-debug.log

Also attaching org.modeshape DEBUG output.

Comment 10 Kurt T Stam 2011-07-22 14:24:20 UTC
Jiri, just double checking that the Mysql5 dialect is being set in the hibernate config? --Kurt

Comment 11 Van Halbert 2011-07-22 15:07:22 UTC
The problem is in the use of UTC_TIMESTAMP as a column name.   The column name is being renamed.   Also, since this table is no longer used, it is being deprecated.

Comment 12 Kurt T Stam 2011-07-22 15:11:04 UTC
So it looks like this issue is caused by a modeshape column naming issue:
https://issues.jboss.org/browse/MODE-1225. I'm assuming the same is
true for the other databases this issue is reported on.

--Kurt

Comment 13 Randall Hauch 2011-07-25 16:25:49 UTC
A fix for MODE-1225 has been committed into the '2.5.x' branch currently used for the 5.2 products, so it should appear in the next build.

Comment 14 Ryan Zhang 2011-07-27 06:41:05 UTC
I would pick up in the next build BRMS 5.2 ER2

Comment 15 Kurt Stam 2011-07-28 14:47:14 UTC
FYI: BRMS depends on the ModeShape service, so it is a runtime dependency only; You don't have to wait for a new BRMS build to upgrade the ModeShape service.

Comment 16 Van Halbert 2011-07-28 14:58:09 UTC
ModeShape was rebased yesterday into git.app and a mead build was done.

Comment 17 Jiri Locker 2011-08-03 13:30:03 UTC
The latest ModeShape build fixes MODE-1225 (failing schema export due to UTC_TIMESTAMP column), but we still get the exception during jboss-brms.war deployment. The exception can be view in the attached server.log.

Comment 18 Randall Hauch 2011-08-03 14:13:05 UTC
I don't see the log file. With the fix, there is no longer a UTC_TIMESTAMP column, and in fact the table in which the column appears should no longer appear in the schema. As a result, I'm not convinced your using a ModeShape build containing the fix.

Comment 19 Jiri Locker 2011-08-03 14:30:08 UTC
Sorry, I haven't probably made myself clear enough.

Firstly, we confirm that MODE-1225 is fixed in the latest ModeShape build, that Van is referring to in comment 16.

Secondly, we still encounter the exception contained in attachment 514566 [details]. That means the bug reported in this bugzilla is not directly caused by MODE-1225 and the real cause needs to be looked fore somewhere else (might not be a ModeShape bug at all). That's why I have already assigned back to Tihomir to conduct further investigation.

Comment 20 Lukáš Petrovický 2011-08-12 14:43:39 UTC
Created attachment 518041 [details]
server.log with a recent Modeshape (BRMS 5.2.0 ER2)

Attaching a recent server.log

Comment 21 Lukáš Petrovický 2011-08-12 14:44:33 UTC
Created attachment 518042 [details]
Modeshape configuration used

Comment 22 Lukáš Petrovický 2011-08-12 14:46:08 UTC
I should mention that server running on top of Oracle 11g was used to generate these past two attachments.

Comment 23 Van Halbert 2011-08-12 15:15:57 UTC
MODE-1225 has been resolved and should be in the next build.     This was an issue with Oracle and PostreSQL.

Comment 24 Lukáš Petrovický 2011-08-14 16:01:31 UTC
Jirka already explained the situation in comment 19 - we know that the issue is fixed *AND* repository initialization still fails with Modeshape. Please see attachment 518041 [details], which is the current manifestation of the problem.

If you wish, we can close this bug and file a new one for this new problem.

Comment 25 Van Halbert 2011-08-25 00:39:04 UTC
Commit ID:   24938f14255fdc2a037a
for MODE-1245 was committed to the 2.5.x branch to resolve the ItemNotFoundException that is occurring at start up time.    

This should be available for the next BRMS ER3 build.

Comment 26 Lukáš Petrovický 2011-08-31 13:14:52 UTC
This bug is now fixed. Thanks!


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