Bug 858226 - Guvnor fails to deploy with PostgreSQL 9.1 (column "node_id" does not exist)
Guvnor fails to deploy with PostgreSQL 9.1 (column "node_id" does not exist)
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.3.1
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: manstis
Petr Široký
Depends On:
  Show dependency treegraph
Reported: 2012-09-18 07:07 EDT by Petr Široký
Modified: 2012-11-02 12:58 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-27 11:31:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Server log file. (190.57 KB, text/x-log)
2012-09-18 07:07 EDT, Petr Široký
no flags Details
Datasource configuration (919 bytes, text/xml)
2012-09-18 07:11 EDT, Petr Široký
no flags Details
Jackrabbit repository configuration. (5.68 KB, text/xml)
2012-09-18 07:12 EDT, Petr Široký
no flags Details
Guvnor configuration. (3.53 KB, text/xml)
2012-09-18 07:13 EDT, Petr Široký
no flags Details
Server log with DEBUG enabled. (2.40 MB, text/x-log)
2012-09-25 07:07 EDT, Petr Široký
no flags Details
JackRabbit configuration that works with Postgres (6.75 KB, text/xml)
2012-09-27 11:26 EDT, manstis
no flags Details

  None (edit)
Description Petr Široký 2012-09-18 07:07:53 EDT
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):

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 07:11:08 EDT
Created attachment 613975 [details]
Datasource configuration
Comment 2 Petr Široký 2012-09-18 07:12:06 EDT
Created attachment 613976 [details]
Jackrabbit repository configuration.
Comment 3 Petr Široký 2012-09-18 07:13:20 EDT
Created attachment 613977 [details]
Guvnor configuration.
Comment 6 Petr Široký 2012-09-24 03:08:45 EDT
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 10:46:38 EDT
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 07:05:23 EDT
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 07:07:01 EDT
Created attachment 616972 [details]
Server log with DEBUG enabled.
Comment 10 manstis 2012-09-27 05:41:12 EDT

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 11:26:32 EDT
Created attachment 618144 [details]
JackRabbit configuration that works with Postgres
Comment 12 manstis 2012-09-27 11:28:05 EDT
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 11:31:10 EDT
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 12:58:01 EDT
No release note needed. See comment #13.

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