Bug 858226

Summary: Guvnor fails to deploy with PostgreSQL 9.1 (column "node_id" does not exist)
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Petr Široký <psiroky>
Component: BRM (Guvnor)Assignee: manstis
Status: CLOSED NOTABUG QA Contact: Petr Široký <psiroky>
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1CC: brms-jira, manstis
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-27 15:31:10 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:
Attachments:
Description Flags
Server log file.
none
Datasource configuration
none
Jackrabbit repository configuration.
none
Guvnor configuration.
none
Server log with DEBUG enabled.
none
JackRabbit configuration that works with Postgres none

Description Petr Široký 2012-09-18 11:07:53 UTC
Created attachment 613973 [details]
Server log file.

Description of problem:
When starting standalone BRMS with PostgreSQL 9.1 as backend for jakckrabbit, deploying fails with following exception (complete stacktrace is  at attached server.log):
Failed to execute SQL (stacktrace on DEBUG log level)
org.postgresql.util.PSQLException: ERROR: column "node_id" does not exist

Version-Release number of selected component (if applicable):
5.3.1-ER1

Steps to Reproduce:
1. Download and unzip standalone distribution.
2. Setup Jackrabbit to use PostgreSQL 9.1 (sample configuration attached)
3. Setup datasource in EAP (datasource configuration attached)
4. Start the server
  
Actual results:
Failed deployment with above exception.

Expected results:
Guvnor is successfully deployed.

Comment 1 Petr Široký 2012-09-18 11:11:08 UTC
Created attachment 613975 [details]
Datasource configuration

Comment 2 Petr Široký 2012-09-18 11:12:06 UTC
Created attachment 613976 [details]
Jackrabbit repository configuration.

Comment 3 Petr Široký 2012-09-18 11:13:20 UTC
Created attachment 613977 [details]
Guvnor configuration.

Comment 6 Petr Široký 2012-09-24 07:08:45 UTC
Only following Jackrabbit tables are created:
 -- fs_fsentry (fsentry_length, fsentry_lastmod, fsentry_data, fsentry_name, fsentry_path)

 -- versioning_fs_fsentry (fsentry_length, fsentry_lastmod, fsentry_data, fsentry_name, fsentry_path)

 -- versioning_pm_binval (binval_data, binval_id)

 -- versioning_pm_bundle (bundle_data, node_id_lo, node_id_hi)

 -- versioning_pm_names (name, id)

 -- versioning_pm_refs (refs_data, node_id_lo, node_id_hi)

Rest of the tables is simply not created.

Comment 7 manstis 2012-09-24 14:46:38 UTC
Hmmm... were there any start-up errors. I was at least expecting the following:-

create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null, NODE_DATA bytea not null)

create table ${schemaObjectPrefix}PROP (PROP_ID varchar not null, PROP_DATA bytea not null)

create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA bytea not null)

create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar not null, BINVAL_DATA bytea not null)

Comment 8 Petr Široký 2012-09-25 11:05:23 UTC
I did not find any start-up errors (other than the above) even with DEBUG logging enabled. Not sure whats going on, when I try to create the tables manually it is successful.

Comment 9 Petr Široký 2012-09-25 11:07:01 UTC
Created attachment 616972 [details]
Server log with DEBUG enabled.

Comment 10 manstis 2012-09-27 09:41:12 UTC
Hello, 

Could you please clarify that if you create the tables manually Guvnor works OK with Postgres? 

Could you try deleting the repository folder, deleting everything from Postgres and restarting? I would have expected to see some log entries advising some tables were being created.

I know I am asking alot, but is it also possible to log Postgres's activity on BRMS start-up?

Comment 11 manstis 2012-09-27 15:26:32 UTC
Created attachment 618144 [details]
JackRabbit configuration that works with Postgres

Comment 12 manstis 2012-09-27 15:28:05 UTC
After discussions with Petr it was found that there was an error in the repository.xml file that was not working with Postgres. Attached is a repository.xml file that works. This was generated from Guvnor itself.

Comment 13 Petr Široký 2012-09-27 15:31:10 UTC
Hi Mike,

I have found that this is caused by configuration issue on our side, I forgot to specify postgresql specific PersitenceManager class.

Comment 14 manstis 2012-11-02 16:58:01 UTC
No release note needed. See comment #13.