CMDBuild Forum

Shark server - Can't work - Problems while configuring UserGroupManager!

Hello,

starting Shark server I get this error in shark.log file:

 

"StandardAssignmentManager -> Can't work - Problems while configuring UserGroupManager!

SharkEngineManager -> Can't work - Problems while configuring AssignmentManager!

com.lutris.appserver.server.sql.DatabaseManagerException: Could not create logical database sharkdb: java.lang.NullPointerException

....

Caused by: java.lang.NullPointerException"

 

I've alredy seen several threads on this kind of error and while best of these have been solved setting tomcat user utente as root, 

this is not the case, tomcat user  (and its group too) already had that rights.

 

I also followed further advice from a Tecnoteca post:

 

"probably you changed the context.xml within the shark's webapp directory, but the original context.xml was already been copied in the $CATALINA_BASE/conf/Catalina/localhost/ directory. Please check if there is such file in that directory and change it according to your needs."

 

addind that information in the context.hml (it was not located in that directory but ma in $CATALINA_BASE/conf in my case)

 

 

I discovered the problem because I had the error "Classe RequestForChange non trovata".

and in the administration module I get and error trying to access the class:

 

"Call: services/json/workflow/xpdlversions

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

Error: org.cmdbuild.workflow.CMWorkflowException: java.lang.NullPointerException

...."

 

 

I've verified step by step all shark parameters as reported in the technical manual and all the data in the .conf and .xml files are coherent

The shark schema has been created on the database (84 tables also)

 

 

OS Ubuntu server 14.04

Tomcat 7

Postgres 9.4

Cmdbuild 2.3

java version "1.7.0_75"

 

Could anyone give me any further advice, please?

I verified  all the configuration files again but I didn't find anything wrong.
TOMCAT_USER and TOMCAT_GROUP are set to root
I can also connect to the db using the same shark credentials of the context.xml file (user shark, password shark)
 
 
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource
auth="Container"
name="UserTransaction"
type="javax.transaction.UserTransaction"
jotm.timeout="180"
factory="org.objectweb.jotm.UserTransactionFactory"/>
<Resource
name="sharkdb"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost/cmdb230"
username="shark"
password="shark"
maxIdle="10"
maxActive="300"
maxWait="5000"
factory="org.enhydra.jndi.DataSourceFactory"/>
</Context>
 
I also see the connections of shark user to the db:
ps aux | grep shark
 
postgres   4875  0.0  0.1 259460  6900 ?        Ss   16:55   0:00 postgres: shark cmdb230 127.0.0.1(40287) idle                                                                               
postgres   5142  0.0  0.1 259460  6900 ?        Ss   17:05   0:00 postgres: shark cmdb230 127.0.0.1(40350) idle                                                                               
postgres   5219  0.0  0.1 259460  6900 ?        Ss   17:10   0:00 postgres: shark cmdb230 127.0.0.1(40353) idle         
 
 
In catalina.out the first error is:
 
 
INFO: Deploying web application archive /var/lib/tomcat7/webapps/cmdbuild-shark-server-2.3.0.war
log4j:WARN No appenders could be found for logger (org.objectweb.jotm).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
++++++++++++++++++++++++++++++++++++++ init - start
Shark will be configured from file /var/lib/tomcat7/webapps/cmdbuild-shark-server-2.3.0/conf/Shark.conf
environmentType= tomcat
    t= org.objectweb.jotm.Current@37794c53
pre configure . . . . . .
 
Together Workflow Server 4.4-1
 
SharkEngineManager -> Shark engine is being initialized ...
DODS init problem.
com.lutris.appserver.server.sql.DatabaseManagerException: Could not create logical database sharkdb: java.lang.NullPointerException
at com.lutris.appserver.server.sql.StandardDatabaseManager.loadLogicalDatabase(Unknown Source)
at com.lutris.appserver.server.sql.StandardDatabaseManager.<init>(Unknown Source)
at org.enhydra.shark.utilities.dods.DODSUtilities.init(Unknown Source)
at org.enhydra.shark.utilities.dods.DODSUtilities.init(Unknown Source)
 
And in the shark.log the first error is:
 
2015-03-04 16:52:37,071: SharkEngineManager -> Working with 'org.enhydra.shark.logging.StandardLoggingManager' implementation of Logging API
2015-03-04 16:52:37,680: StandardAssignmentManager -> Can't work - Problems while configuring UserGroupManager!
2015-03-04 16:52:37,680: SharkEngineManager -> Can't work - Problems while configuring AssignmentManager!
com.lutris.appserver.server.sql.DatabaseManagerException: Could not create logical database sharkdb: java.lang.NullPointerException
at com.lutris.appserver.server.sql.StandardDatabaseManager.loadLogicalDatabase(Unknown Source)
at com.lutris.appserver.server.sql.StandardDatabaseManager.<init>(Unknown Source)
at org.enhydra.shark.utilities.dods.DODSUtilities.init(Unknown Source)
at org.enhydra.shark.utilities.dods.DODSUtilities.init(Unknown Source)
 
Any idea?
 
I solved the problem. It was due to the wrong way by which I made the change about TOMCAT7 USER privilege.
Then I had another problem because sometimes Shark server was starting before Postgres causing a very similar problem to the first one  (solved changing the start sequence ).
 

Previously Vincenzo Brienza wrote:

I solved the problem. It was due to the wrong way by which I made the change about TOMCAT7 USER privilege.
Then I had another problem because sometimes Shark server was starting before Postgres causing a very similar problem to the first one  (solved changing the start sequence ).
 
I have same problem like you , can you tell me how can you solve it ?
tks~
 
 

 

To fix the issue, edit the file /etc/default /tomcat6 or /etc/default /tomcat7 as per your setup.

Set the TOMCAT6_USER TOMCAT6_GROUP property root. 
 

 

Previously kichenin wrote:

To fix the issue, edit the file /etc/default /tomcat6 or /etc/default /tomcat7 as per your setup.
Set the TOMCAT6_USER TOMCAT6_GROUP property root. 
 

 

I followed all these hints (TOMCAT 8) and after all I git this:

 

Call: services/json/workflow/xpdlversions
------------------------------------------
Error: org.cmdbuild.workflow.CMWorkflowException: java.lang.reflect.InvocationTargetException
	at org.cmdbuild.workflow.service.TransactedSharkService$TransactedExecutor.initAndConnect(TransactedSharkService.java:49)
	at org.cmdbuild.workflow.service.TransactedSharkService$TransactedExecutor.execute(TransactedSharkService.java:23)
	at org.cmdbuild.workflow.service.TransactedSharkService.downloadAllPackages(TransactedSharkService.java:132)
	at org.cmdbuild.workflow.xpdl.CachedProcessDefinitionStore$LazyClassNameToPackageInfoMap.fetchProcessDefinitions(CachedProcessDefinitionStore.java:119)
	at org.cmdbuild.workflow.xpdl.CachedProcessDefinitionStore$LazyClassNameToPackageInfoMap.checkLoaded(CachedProcessDefinitionStore.java:111)
	at org.cmdbuild.workflow.xpdl.CachedProcessDefinitionStore$LazyClassNameToPackageInfoMap.getPackageInfoByClass(CachedProcessDefinitionStore.java:98)
	at org.cmdbuild.workflow.xpdl.CachedProcessDefinitionStore.getPackageId(CachedProcessDefinitionStore.java:209)
	at org.cmdbuild.workflow.xpdl.CachedProcessDefinitionStore.getPackageVersions(CachedProcessDefinitionStore.java:204)
	at org.cmdbuild.workflow.xpdl.AbstractProcessDefinitionManager.getVersions(AbstractProcessDefinitionManager.java:37)
	at org.cmdbuild.workflow.ForwardingProcessDefinitionManager.getVersions(ForwardingProcessDefinitionManager.java:25)

 

just another idea?