CMDBuild Forum

Error on Shark.war configuration, ERROR: relation "shkresourcestable" does not exist

Hello, Im having a problem trying to configure Openmaint, mainly with the Shark.war application, I have seen several post with similar issues that mine, but some are unanswered or  doesn't apply to my case, Im very lost, because I don't see what is wrong, I have followed the instructions on the technical manual and still don't see what Im doing wrong.

 The main problem is that by the looks Shark.war cannot access or find shark scheme on the database. I already run manually the scripts on:

 

 openmain.war/WEB-INF/sql/shark_scheme

 

I also uncommented the lines:

 

CREATE SCHEMA shark;

ALTER SCHEMA shark OWNER TO shark;

 

also checked the user shark privileges just in case , and I have check several times the configuration files for shark.war and still I can't make it work.

Please I will appreciate any help, Im getting a little desperate here.

 

 

This is the error I get:

 

2019-03-12 17:35:00,752: SharkEngineManager -> Working with 'org.enhydra.shark.CallbackUtil' implementation of core CallbackUtilities API

2019-03-12 17:35:00,753: SharkEngineManager -> Working with 'org.enhydra.shark.SharkObjectFactoryExt' implementation of core SharkObjectFactory API

2019-03-12 17:35:00,753: SharkEngineManager -> Working with 'org.enhydra.shark.StandardToolActivityHandler' implementation of core ToolAgentManager API

2019-03-12 17:35:00,753: SharkEngineManager -> Working with 'org.enhydra.shark.logging.StandardLoggingManager' implementation of Logging API

2019-03-12 17:35:01,632: StandardAssignmentManager -> Working with 'org.enhydra.shark.usergroup.DODSUserGroupManagerAdmin' implementation of UserGroup API

2019-03-12 17:35:01,762: StandardAssignmentManager -> Working with 'org.enhydra.shark.partmappersistence.DODSParticipantMappingAdmin' implementation of ParticipantMapping API

2019-03-12 17:35:01,762: SharkEngineManager -> Working with 'org.enhydra.shark.assignment.StandardAssignmentManager' implementation of Assignment API

2019-03-12 17:35:01,772: Process Cache configured - max. size is 100

2019-03-12 17:35:01,774: Resource Cache configured - max. size is 100

2019-03-12 17:35:01,774: SharkEngineManager -> Working with 'org.enhydra.shark.caching.LRUCacheMgr' implementation of Caching API

2019-03-12 17:35:02,304:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: relation "shkprocessstates" does not exist

  Position: 32)

2019-03-12 17:35:02,371:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: current transaction is aborted, commands ignored until end of transaction block)

2019-03-12 17:35:02,377: DODSPersistentManager -> persisting String variables into BLOB for sizes greater than 4000

2019-03-12 17:35:02,377: SharkEngineManager -> Working with 'org.enhydra.shark.instancepersistence.DODSSelectivePersistenceManager' implementation of InstancePersistence API

2019-03-12 17:35:02,398: DODSGlobalPersistenceManager -> persisting String data into BLOB for sizes greater than 4000

2019-03-12 17:35:02,398: SharkEngineManager -> Working with 'org.enhydra.shark.globalpersistence.DODSGlobalPersistenceManager' implementation of GlobalPersistence API

2019-03-12 17:35:02,509: SharkEngineManager -> Working with 'org.cmdbuild.workflow.CMDBuildEventAuditManager' implementation of EventAudit API

2019-03-12 17:35:02,554: SharkEngineManager -> Working with 'org.enhydra.shark.repositorypersistence.DODSRepositoryPersistenceManager' implementation of RepositoryPersistence API

2019-03-12 17:35:02,558: SharkEngineManager -> Working with 'org.enhydra.shark.scripting.StandardScriptingManager' implementation of Scripting API

2019-03-12 17:35:02,558: SharkEngineManager -> Working without Security API implementation - SecurityManager is not specified.

2019-03-12 17:35:02,666: StandardToolAgentManager -> Working with 'org.enhydra.shark.appmappersistence.DODSApplicationMappingAdmin' implementation of ApplicationMapPersistence API

2019-03-12 17:35:02,667: SharkEngineManager -> Working with 'org.enhydra.shark.toolagent.StandardToolAgentManager' implementation of ToolAgentManager API

2019-03-12 17:35:02,667: SharkEngineManager -> Working without wfEngineInteroperability API implementation - WfEngineInteroperability implementation is not specified.

2019-03-12 17:35:02,685: SharkUtilities -> synchronizing XPDL cache

2019-03-12 17:35:02,759:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: current transaction is aborted, commands ignored until end of transaction block)

2019-03-12 17:35:02,760: Problem while initializing caches !!!

2019-03-12 17:35:33,953:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: relation "shkresourcestable" does not exist

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures}

  Position: 33)

 

 

Im going to answer myself here, this was my mistake, since I miss interpreted a line in the manual; On  ${tomcat_path}/webapps/shark/META-INF/context.xml. I input the connection attributes for the openmaint database:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures}

 


 url="jdbc:postgresql://localhost:5432/openmaint"

 username="postgres"

 password="postgres"

 
when I should have been using 
 

url="jdbc:postgresql://localhost:5432/openmaint"

 username="shark"

 password="shark"



If someone have the same mistake, DON'T change the user shark, and only change the password if you change it on the database:

 

ALTER ROLE shark WITH PASSWORD 'newpassword';

 
${tomcat_path}/webapps/shark/META-INF/context.xml

 url="jdbc:postgresql://localhost:5432/openmaint"

 username="shark"

 password="newpassword"



Another step I did, just in case, was to change or setup the user 'workflow' password that is on:

${tomcat_path}/webapps/shark/conf/Shark.conf


org.cmdbuild.ws.url=http://localhost:8080/openmaint/

org.cmdbuild.ws.username=workflow

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures}

org.cmdbuild.ws.password=workflow


 

You just go to 'Administration panel' > 'Users and Groups' > 'Users'


on the right grid a list of users should be shown, select user 'workflow' and click on the button 'Change Password' and set the password you input on Shark.conf


Then you just follow the same steps that are on the technical manual to activate Shark.

1. Go to General Options

2. Workflows

3. Click on enable checkbox

4. Confirm

 

And if you are on the demo, upload the 'requestforchange.xpdl' file:

1. Go to Process

2. Select Request for change

3. on file xpdl, select the requestforchange.xpdl that is on the unzip folder of openmaint: ${openmaint_path}/extras/workflow/rfc/requestforchange.xpdl




 
Previously Jose Robles wrote:

Hello, Im having a problem trying to configure Openmaint, mainly with the Shark.war application, I have seen several post with similar issues that mine, but some are unanswered or  doesn't apply to my case, Im very lost, because I don't see what is wrong, I have followed the instructions on the technical manual and still don't see what Im doing wrong.

 The main problem is that by the looks Shark.war cannot access or find shark scheme on the database. I already run manually the scripts on:

 

 openmain.war/WEB-INF/sql/shark_scheme

 

I also uncommented the lines:

 

CREATE SCHEMA shark;

ALTER SCHEMA shark OWNER TO shark;

 

also checked the user shark privileges just in case , and I have check several times the configuration files for shark.war and still I can't make it work.

Please I will appreciate any help, Im getting a little desperate here.

 

 

This is the error I get:

 

2019-03-12 17:35:00,752: SharkEngineManager -> Working with 'org.enhydra.shark.CallbackUtil' implementation of core CallbackUtilities API

2019-03-12 17:35:00,753: SharkEngineManager -> Working with 'org.enhydra.shark.SharkObjectFactoryExt' implementation of core SharkObjectFactory API

2019-03-12 17:35:00,753: SharkEngineManager -> Working with 'org.enhydra.shark.StandardToolActivityHandler' implementation of core ToolAgentManager API

2019-03-12 17:35:00,753: SharkEngineManager -> Working with 'org.enhydra.shark.logging.StandardLoggingManager' implementation of Logging API

2019-03-12 17:35:01,632: StandardAssignmentManager -> Working with 'org.enhydra.shark.usergroup.DODSUserGroupManagerAdmin' implementation of UserGroup API

2019-03-12 17:35:01,762: StandardAssignmentManager -> Working with 'org.enhydra.shark.partmappersistence.DODSParticipantMappingAdmin' implementation of ParticipantMapping API

2019-03-12 17:35:01,762: SharkEngineManager -> Working with 'org.enhydra.shark.assignment.StandardAssignmentManager' implementation of Assignment API

2019-03-12 17:35:01,772: Process Cache configured - max. size is 100

2019-03-12 17:35:01,774: Resource Cache configured - max. size is 100

2019-03-12 17:35:01,774: SharkEngineManager -> Working with 'org.enhydra.shark.caching.LRUCacheMgr' implementation of Caching API

2019-03-12 17:35:02,304:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: relation "shkprocessstates" does not exist

  Position: 32)

2019-03-12 17:35:02,371:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: current transaction is aborted, commands ignored until end of transaction block)

2019-03-12 17:35:02,377: DODSPersistentManager -> persisting String variables into BLOB for sizes greater than 4000

2019-03-12 17:35:02,377: SharkEngineManager -> Working with 'org.enhydra.shark.instancepersistence.DODSSelectivePersistenceManager' implementation of InstancePersistence API

2019-03-12 17:35:02,398: DODSGlobalPersistenceManager -> persisting String data into BLOB for sizes greater than 4000

2019-03-12 17:35:02,398: SharkEngineManager -> Working with 'org.enhydra.shark.globalpersistence.DODSGlobalPersistenceManager' implementation of GlobalPersistence API

2019-03-12 17:35:02,509: SharkEngineManager -> Working with 'org.cmdbuild.workflow.CMDBuildEventAuditManager' implementation of EventAudit API

2019-03-12 17:35:02,554: SharkEngineManager -> Working with 'org.enhydra.shark.repositorypersistence.DODSRepositoryPersistenceManager' implementation of RepositoryPersistence API

2019-03-12 17:35:02,558: SharkEngineManager -> Working with 'org.enhydra.shark.scripting.StandardScriptingManager' implementation of Scripting API

2019-03-12 17:35:02,558: SharkEngineManager -> Working without Security API implementation - SecurityManager is not specified.

2019-03-12 17:35:02,666: StandardToolAgentManager -> Working with 'org.enhydra.shark.appmappersistence.DODSApplicationMappingAdmin' implementation of ApplicationMapPersistence API

2019-03-12 17:35:02,667: SharkEngineManager -> Working with 'org.enhydra.shark.toolagent.StandardToolAgentManager' implementation of ToolAgentManager API

2019-03-12 17:35:02,667: SharkEngineManager -> Working without wfEngineInteroperability API implementation - WfEngineInteroperability implementation is not specified.

2019-03-12 17:35:02,685: SharkUtilities -> synchronizing XPDL cache

2019-03-12 17:35:02,759:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: current transaction is aborted, commands ignored until end of transaction block)

2019-03-12 17:35:02,760: Problem while initializing caches !!!

2019-03-12 17:35:33,953:  <SqlQueryExecute><SqlQueryException>(<Replicated>:ERROR: relation "shkresourcestable" does not exist

  Position: 33)