Bug 779260 (SOA-1651)

Summary: jBPM fails during startup on selected databases
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Jiri Pechanec <jpechane>
Component: JBPM - within SOA, ConfigurationAssignee: Julian Coleman <jcoleman>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.0.0 ER4   
Target Milestone: ---   
Target Release: 5.0.0 GA, 5.0.0 ER5   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-1651
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
MSSQL 2005
Last Closed: 2009-12-14 05:00:42 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:

Description Jiri Pechanec 2009-11-26 08:14:08 UTC
Date of First Response: 2009-11-26 06:01:55
project_key: SOA

If the server is configured to run against MSSQL2005 it throws an exception
2009-11-26 02:46:31,538 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.esb:service=JBPMDatabaseInitializer state=Create mode=Manual requiredState=Installed
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert explicit value for identity column in table 'JBPM_ID_USER' when IDENTITY_INSERT is set to OFF.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
	at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
	at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)

The reason is that JDatabaseInitializer service executes import.sql. This file tries to write values to identity column which is not supported for all databases. Cutomer should not be forced to change database wide config setting just for the first server startup.

Comment 1 Julian Coleman 2009-11-26 11:01:55 UTC
1)  We did not require this file for 4.2 and 4.3, so it should be possible to remove it.
2) Multiple tables with identity columns will not work with MS-SQL:
  http://msdn.microsoft.com/en-us/library/ms188059.aspx


Comment 2 Julian Coleman 2009-11-27 15:05:17 UTC
Fixed with revision 4371 of:
  build-tools/builders/esb/pre-patch/empty_import_sql.xml  (added)
  build-tools/builders/esb/resource/jbpm-sql/import.sql  (added)

Commit message:
  SOA-1651
  Replace import.sql with an empty file. 
  We do no need the user, group and membership details in the database on
  the platform.


Comment 3 Jiri Pechanec 2009-12-14 05:00:42 UTC
Verified in ER5