Quantcast

BPELSE persistence in Postgresql

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

BPELSE persistence in Postgresql

babakco
This post has NOT been accepted by the mailing list yet.
Hi All

I need to use postgresql as DB for persistence in BPELSE but I get this error :



 WARNING [com.sun.jbi.framework] (sun-bpel-engine) JBIFW1147: Engine sun-bpel-engine cannot be started. The LifeCycle start() method threw a javax.jbi.JBIException exception. The exception message is: BPCOR-7040: BPELSE Persistence Schema for JDBC Non-XA Resource jndibpelnonxa and/or JDBC XA Resource jndibpelxa  not Valid. Please verify that persistence schema exists and contain all the required tables.
javax.jbi.JBIException: BPCOR-7040: BPELSE Persistence Schema for JDBC Non-XA Resource jndibpelnonxa and/or JDBC XA Resource jndibpelxa  not Valid. Please verify that persistence schema exists and contain all the required tables.

I check the database and i see that some table create :



--------------------------------------------------------------------------------------------------------------------------------------
/*
Navicat PGSQL Data Transfer

Source Server         : ESB-185.49.87.205
Source Server Version : 90404
Source Host           : 185.49.87.205:5432
Source Database       : bpel
Source Schema         : public

Target Server Type    : PGSQL
Target Server Version : 90404
File Encoding         : 65001

Date: 2015-10-31 17:33:46
*/


-- ----------------------------
-- Table structure for crmp
-- ----------------------------
DROP TABLE IF EXISTS "public"."crmp";
CREATE TABLE "public"."crmp" (
"stateid" varchar(128) COLLATE "default",
"crmpinvokeid" varchar(128) COLLATE "default" NOT NULL,
"partnerlink" varchar(1028) COLLATE "default",
"operation" varchar(1028) COLLATE "default",
"bpelmessageexchange" varchar(4000) COLLATE "default",
"replyvariableid" numeric DEFAULT (-1),
"responseobj" text COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for engine
-- ----------------------------
DROP TABLE IF EXISTS "public"."engine";
CREATE TABLE "public"."engine" (
"engineid" varchar(128) COLLATE "default" NOT NULL,
"location" varchar(1028) COLLATE "default",
"lastupdatetime" timestamp(6)
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for enginecorrelation
-- ----------------------------
DROP TABLE IF EXISTS "public"."enginecorrelation";
CREATE TABLE "public"."enginecorrelation" (
"enginecorrid" numeric,
"bpelid" varchar(1028) COLLATE "default",
"engineid" varchar(128) COLLATE "default",
"value" varchar(4000) COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for eventhandler
-- ----------------------------
DROP TABLE IF EXISTS "public"."eventhandler";
CREATE TABLE "public"."eventhandler" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"ehid" varchar(128) COLLATE "default" NOT NULL,
"scopeguid" varchar(128) COLLATE "default",
"eventmodelid" numeric,
"status" char(1) COLLATE "default" DEFAULT 'I'::bpchar,
"timeval" timestamp(6),
"repeatevery" numeric
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for foreach
-- ----------------------------
DROP TABLE IF EXISTS "public"."foreach";
CREATE TABLE "public"."foreach" (
"foreachid" numeric NOT NULL,
"stateid" varchar(128) COLLATE "default" NOT NULL,
"counter" int4,
"successes" int4,
"startcount" int4,
"finalcount" int4,
"completioncount" int4
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for instancecorrelation
-- ----------------------------
DROP TABLE IF EXISTS "public"."instancecorrelation";
CREATE TABLE "public"."instancecorrelation" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"inscorrid" numeric NOT NULL,
"value" varchar(4000) COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for lastcheckpoint
-- ----------------------------
DROP TABLE IF EXISTS "public"."lastcheckpoint";
CREATE TABLE "public"."lastcheckpoint" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"activityid" numeric NOT NULL,
"timeval" timestamp(6),
"pickcompositeactid" numeric,
"branchinvokecounter" numeric DEFAULT 0
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for nmproperty
-- ----------------------------
DROP TABLE IF EXISTS "public"."nmproperty";
CREATE TABLE "public"."nmproperty" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"scopeguid" varchar(128) COLLATE "default" NOT NULL,
"varid" numeric NOT NULL,
"propname" varchar(1028) COLLATE "default" NOT NULL,
"propvalue" text COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for nmsimpleproperty
-- ----------------------------
DROP TABLE IF EXISTS "public"."nmsimpleproperty";
CREATE TABLE "public"."nmsimpleproperty" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"scopeguid" varchar(128) COLLATE "default" NOT NULL,
"varid" numeric NOT NULL,
"propname" varchar(1028) COLLATE "default" NOT NULL,
"propvalue" varchar(4000) COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for outstandingmsgex
-- ----------------------------
DROP TABLE IF EXISTS "public"."outstandingmsgex";
CREATE TABLE "public"."outstandingmsgex" (
"msgexid" varchar(128) COLLATE "default" NOT NULL,
"stateid" varchar(128) COLLATE "default",
"bpelid" varchar(1028) COLLATE "default" NOT NULL
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for partnerlink
-- ----------------------------
DROP TABLE IF EXISTS "public"."partnerlink";
CREATE TABLE "public"."partnerlink" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"plinkid" numeric NOT NULL,
"value" text COLLATE "default",
"scopeguid" varchar(128) COLLATE "default" NOT NULL
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for scope
-- ----------------------------
DROP TABLE IF EXISTS "public"."scope";
CREATE TABLE "public"."scope" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"scopeid" numeric,
"scopeguid" varchar(128) COLLATE "default" NOT NULL,
"parentscopeguid" varchar(128) COLLATE "default",
"scopestate" varchar(3) COLLATE "default",
"compensateid" numeric,
"completionorder" numeric,
"faultname" varchar(4000) COLLATE "default",
"faultdata" text COLLATE "default",
"faultactivityid" numeric
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for simplevariable
-- ----------------------------
DROP TABLE IF EXISTS "public"."simplevariable";
CREATE TABLE "public"."simplevariable" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"varid" numeric NOT NULL,
"stringvalue" varchar(4000) COLLATE "default",
"scopeguid" varchar(128) COLLATE "default" NOT NULL
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for state
-- ----------------------------
DROP TABLE IF EXISTS "public"."state";
CREATE TABLE "public"."state" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"bpelid" varchar(1028) COLLATE "default",
"engineid" varchar(128) COLLATE "default",
"ownerlock" char(1) COLLATE "default" DEFAULT 'Y'::bpchar,
"status" varchar(32) COLLATE "default" DEFAULT 'RUNNING'::character varying
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for variable
-- ----------------------------
DROP TABLE IF EXISTS "public"."variable";
CREATE TABLE "public"."variable" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"varid" numeric NOT NULL,
"scalabilitypassivated" char(1) COLLATE "default" DEFAULT 'N'::bpchar NOT NULL,
"value" text COLLATE "default",
"scopeguid" varchar(128) COLLATE "default" NOT NULL
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for variableattachment
-- ----------------------------
DROP TABLE IF EXISTS "public"."variableattachment";
CREATE TABLE "public"."variableattachment" (
"stateid" varchar(128) COLLATE "default" NOT NULL,
"scopeguid" varchar(128) COLLATE "default" NOT NULL,
"varid" numeric NOT NULL,
"name" varchar(1028) COLLATE "default" NOT NULL,
"attachment" text COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Table structure for waitingima
-- ----------------------------
DROP TABLE IF EXISTS "public"."waitingima";
CREATE TABLE "public"."waitingima" (
"stateid" varchar(128) COLLATE "default",
"partnerlink" varchar(1028) COLLATE "default",
"operation" varchar(1028) COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------

-- ----------------------------
-- Indexes structure for table crmp
-- ----------------------------
CREATE INDEX "crmpfkey" ON "public"."crmp" USING btree (stateid);
CREATE INDEX "crmpindex" ON "public"."crmp" USING btree (stateid, partnerlink, operation);
CREATE INDEX "crmpreplyvarindex" ON "public"."crmp" USING btree (replyvariableid, stateid);

-- ----------------------------
-- Primary Key structure for table crmp
-- ----------------------------
ALTER TABLE "public"."crmp" ADD PRIMARY KEY ("crmpinvokeid");

-- ----------------------------
-- Indexes structure for table engine
-- ----------------------------
CREATE INDEX "enginelastut" ON "public"."engine" USING btree (lastupdatetime);

-- ----------------------------
-- Primary Key structure for table engine
-- ----------------------------
ALTER TABLE "public"."engine" ADD PRIMARY KEY ("engineid");

-- ----------------------------
-- Indexes structure for table enginecorrelation
-- ----------------------------
CREATE INDEX "enginecorridindex" ON "public"."enginecorrelation" USING btree (enginecorrid);

-- ----------------------------
-- Primary Key structure for table eventhandler
-- ----------------------------
ALTER TABLE "public"."eventhandler" ADD PRIMARY KEY ("stateid", "ehid");

-- ----------------------------
-- Indexes structure for table foreach
-- ----------------------------
CREATE INDEX "foreachfkey" ON "public"."foreach" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table foreach
-- ----------------------------
ALTER TABLE "public"."foreach" ADD PRIMARY KEY ("foreachid", "stateid");

-- ----------------------------
-- Indexes structure for table instancecorrelation
-- ----------------------------
CREATE INDEX "instcorrfkey" ON "public"."instancecorrelation" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table instancecorrelation
-- ----------------------------
ALTER TABLE "public"."instancecorrelation" ADD PRIMARY KEY ("stateid", "inscorrid");

-- ----------------------------
-- Indexes structure for table lastcheckpoint
-- ----------------------------
CREATE INDEX "lcpfkey" ON "public"."lastcheckpoint" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table lastcheckpoint
-- ----------------------------
ALTER TABLE "public"."lastcheckpoint" ADD PRIMARY KEY ("stateid", "activityid");

-- ----------------------------
-- Indexes structure for table nmproperty
-- ----------------------------
CREATE INDEX "nmpropertyfkey" ON "public"."nmproperty" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table nmproperty
-- ----------------------------
ALTER TABLE "public"."nmproperty" ADD PRIMARY KEY ("stateid", "scopeguid", "varid", "propname");

-- ----------------------------
-- Indexes structure for table nmsimpleproperty
-- ----------------------------
CREATE INDEX "nmsimplepropertyfkey" ON "public"."nmsimpleproperty" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table nmsimpleproperty
-- ----------------------------
ALTER TABLE "public"."nmsimpleproperty" ADD PRIMARY KEY ("stateid", "scopeguid", "varid", "propname");

-- ----------------------------
-- Primary Key structure for table outstandingmsgex
-- ----------------------------
ALTER TABLE "public"."outstandingmsgex" ADD PRIMARY KEY ("msgexid", "bpelid");

-- ----------------------------
-- Indexes structure for table partnerlink
-- ----------------------------
CREATE INDEX "partnerlinkfkey" ON "public"."partnerlink" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table partnerlink
-- ----------------------------
ALTER TABLE "public"."partnerlink" ADD PRIMARY KEY ("stateid", "plinkid", "scopeguid");

-- ----------------------------
-- Indexes structure for table scope
-- ----------------------------
CREATE INDEX "scopefkey" ON "public"."scope" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table scope
-- ----------------------------
ALTER TABLE "public"."scope" ADD PRIMARY KEY ("stateid", "scopeguid");

-- ----------------------------
-- Indexes structure for table simplevariable
-- ----------------------------
CREATE INDEX "simplevarfkey" ON "public"."simplevariable" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table simplevariable
-- ----------------------------
ALTER TABLE "public"."simplevariable" ADD PRIMARY KEY ("stateid", "varid", "scopeguid");

-- ----------------------------
-- Indexes structure for table state
-- ----------------------------
CREATE INDEX "stateengineidindex" ON "public"."state" USING btree (engineid);
CREATE INDEX "statestatusindex" ON "public"."state" USING btree (status);

-- ----------------------------
-- Primary Key structure for table state
-- ----------------------------
ALTER TABLE "public"."state" ADD PRIMARY KEY ("stateid");

-- ----------------------------
-- Indexes structure for table variable
-- ----------------------------
CREATE INDEX "variablefkey" ON "public"."variable" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table variable
-- ----------------------------
ALTER TABLE "public"."variable" ADD PRIMARY KEY ("stateid", "varid", "scalabilitypassivated", "scopeguid");

-- ----------------------------
-- Indexes structure for table variableattachment
-- ----------------------------
CREATE INDEX "variableattachmentfkey" ON "public"."variableattachment" USING btree (stateid);

-- ----------------------------
-- Primary Key structure for table variableattachment
-- ----------------------------
ALTER TABLE "public"."variableattachment" ADD PRIMARY KEY ("stateid", "scopeguid", "varid", "name");

-- ----------------------------
-- Indexes structure for table waitingima
-- ----------------------------
CREATE INDEX "waitingimaindex" ON "public"."waitingima" USING btree (stateid, partnerlink, operation);

-- ----------------------------
-- Foreign Key structure for table "public"."enginecorrelation"
-- ----------------------------
ALTER TABLE "public"."enginecorrelation" ADD FOREIGN KEY ("engineid") REFERENCES "public"."engine" ("engineid") ON DELETE NO ACTION ON UPDATE NO ACTION;

-- ----------------------------
-- Foreign Key structure for table "public"."eventhandler"
-- ----------------------------
ALTER TABLE "public"."eventhandler" ADD FOREIGN KEY ("stateid") REFERENCES "public"."state" ("stateid") ON DELETE NO ACTION ON UPDATE NO ACTION;

-- ----------------------------
-- Foreign Key structure for table "public"."waitingima"
-- ----------------------------
ALTER TABLE "public"."waitingima" ADD FOREIGN KEY ("stateid") REFERENCES "public"."state" ("stateid") ON DELETE NO ACTION ON UPDATE NO ACTION;

-------------------------------------------------------------------------------------------------------------------------------

I test on :
 Postgresql 9.3.9 by  postgresql-9.3-1104.jdbc41.jar  on openjdk7 and openjdk8 on freebsd

Postgresql 9.4.4 by  postgresql-9.4-1204.jdbc4.jar  on openjdk7 and openjd8 on freebsd

Postgresql 9.4.5 by  postgresql-9.4-1204.jdbc4.jar  on oraclejdk8 on windows


but all the same .


this is my  context.xml :


<?xml version="1.0" encoding="UTF-8"?>

<context xmlns="http://www.open-esb.net/standalone/jndi/">


   

   
        <dataSource-pool-properties>
            <dbConnector-name>postgresNonXAPool</dbConnector-name>
            <datasource-classname>org.postgresql.ds.PGSimpleDataSource</datasource-classname>       
            <resource-type>Datasource</resource-type>
            <database-name>POSTGRESQL</database-name>       
            <database-vendor>Postgres</database-vendor>
            <database-version>9.3.9</database-version>               
            <dbconnector-description>DBConnector for postgres BPEL NonXA</dbconnector-description>
            <dataSource-properties>
                <property>
                    <name>user</name>
                    <value>bpel</value>
                    <description></description>
                </property>
                <property>
                    <name>password</name>
                    <value>netcommand</value>
                    <description></description>
                </property>
                <property>
                    <name>serverName</name>
                    <value>127.0.0.1</value>
                    <description></description>
                </property>
                <property>
                    <name>portNumber</name>
                    <value>5432</value>
                    <description></description>
                </property>
                <property>
                    <name>databaseName</name>
                    <value>bpel</value>
                    <description></description>
                </property>   
            </dataSource-properties>
            <pool-properties>
                <property>
                    <name>initialSize</name>
                    <value>11</value>
                    <description></description>
                </property>
                <property>
                    <name>maxActive</name>
                    <value>20</value>
                    <description></description>
                </property>
                <property>
                    <name>maxIdle</name>
                    <value>10</value>
                    <description></description>
                </property>
                <property>
                    <name>minIdle</name>
                    <value>10</value>
                    <description></description>
                </property>
            </pool-properties>
        </dataSource-pool-properties>




   

   

 
        <dataSource-pool-properties>
            <dbConnector-name>postgresXAPool</dbConnector-name>
            <datasource-classname>org.postgresql.xa.PGXADataSource</datasource-classname>       
            <resource-type>Datasource</resource-type>
            <database-name>POSTGRESQL</database-name>       
            <database-vendor>Postgres</database-vendor>
            <database-version>9.3.9</database-version>               
            <dbconnector-description>DBConnector for postgres BPEL-XA</dbconnector-description>
            <dataSource-properties>
                <property>
                    <name>user</name>
                    <value>bpel</value>
                    <description></description>
                </property>
                <property>
                    <name>password</name>
                    <value>netcommand</value>
                    <description></description>
                </property>
                <property>
                    <name>serverName</name>
                    <value>127.0.0.1</value>
                    <description></description>
                </property>
                <property>
                    <name>portNumber</name>
                    <value>5432</value>
                    <description></description>
                </property>
                <property>
                    <name>databaseName</name>
                    <value>bpel</value>
                    <description></description>
                </property>   
            </dataSource-properties>
            <pool-properties>
                <property>
                    <name>initialSize</name>
                    <value>11</value>
                    <description></description>
                </property>
                <property>
                    <name>maxActive</name>
                    <value>20</value>
                    <description></description>
                </property>
                <property>
                    <name>maxIdle</name>
                    <value>10</value>
                    <description></description>
                </property>
                <property>
                    <name>minIdle</name>
                    <value>10</value>
                    <description></description>
                </property>
            </pool-properties>
        </dataSource-pool-properties>

        <jdbc-resources>
            <dbConnector-name>postgresNonXAPool</dbConnector-name>
            <jndi-name>jndibpelnonxa</jndi-name>       
            <description>Datasource connection to Postgres for BPEL noXA</description>
        </jdbc-resources>       

        <jdbc-resources>
            <dbConnector-name>postgresXAPool</dbConnector-name>
            <jndi-name>jndibpelxa</jndi-name>       
            <description>Datasource connection to Postgres BPEL XA</description>
        </jdbc-resources>
   

</context>



Please help

BR
Loading...