CMDBuild Forum

CMDBuild 1.4 and Shark Installation

Hello, I want install Shark 1.4.0.2 with CMDBuild 1.4.0.2.

CMDBuild runs OK!!! But Shark no.

 

When install Shark I configured the content.xml with the cmdbuild PostgreSQL database:

<?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"
   auth="Container"
   type="javax.sql.DataSource"
   factory="org.objectweb.jndi.DataSourceFactory"
   maxActive="300"
   maxIdle="2"
   maxWait="5000"
   driverClassName="org.postgresql.Driver"
   username="shark"
   password="shark"
   url="jdbc:postgresql://10.6.121.106/cmdbuild"
   defaultAutoCommit="true"
   removeAbandoned="true"
   removeAbandonedTimeout="60"
   logAbandoned="true" />
</Context>


 

And the Shark.conf:

"#=============================================================================
# SHARK webapp properties
#-----------------------------------------------------------------------------
DatabaseManager.ConfigurationDir=/var/lib/tomcat6/webapps/shark/conf/dods

#=============================================================================
# SHARK CMDBuild properties
#-----------------------------------------------------------------------------
CMDBuild.Groovy.Repository=/var/lib/tomcat6/webapps/shark/script
CMDBuild.WS.EndPoint=http://10.6.121.106:8080/cmdbuild/services/soap/Private
CMDBuild.EndPoint=http://10.6.121.106:8080/cmdbuild/shark/
CMDBuild.WS.MaxConn=100"

 

But when I want access Shark via CMDBuild, show the next message in details:

org.cmdbuild.exception.CMDBWorkflowException: WF_WAPI_CONNECTION_ERROR
	at org.cmdbuild.exception.CMDBWorkflowException$WorkflowExceptionType.createException(CMDBWorkflowException.java:54)
	at org.cmdbuild.workflow.WorkflowCache.create(WorkflowCache.java:46)
	at org.cmdbuild.workflow.WorkflowCache.getInstance(WorkflowCache.java:35)
	at org.cmdbuild.elements.ProcessTypeImpl.getPackageVersions(ProcessTypeImpl.java:125)
	at org.cmdbuild.servlets.json.schema.ModWorkflow.xpdlInfo(ModWorkflow.java:115)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:94)
	at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:55)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:54)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:28)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:37)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:662)






And in catalina.out:

java.sql.SQLException: SQLException in StandardPoolDataSource:getConnection exception: java.sql.SQLException: SQLException in StandardPoolDataSource:getConnection no connection available java.sql.SQLException: Cannot get connection for URL jdbc:postgresql://localhost/${cmdbuild} : FATAL: database "${cmdbuild}" does not exist
        at org.enhydra.jdbc.pool.StandardPoolDataSource.getConnection(StandardPoolDataSource.java:213)
        at org.enhydra.jdbc.pool.StandardPoolDataSource.getConnection(StandardPoolDataSource.java:164)
        at com.lutris.appserver.server.sql.datasource.DataSourceDBConnection.<init>(DataSourceDBConnection.java:93)
        at com.lutris.appserver.server.sql.DataSourceDBConnectionFactory.createConnection(DataSourceDBConnectionFactory.java:31)
        at com.lutris.appserver.server.sql.datasource.DataSourceConnectionAllocator.createConnection(DataSourceConnectionAllocator.java:454)
        at com.lutris.appserver.server.sql.datasource.DataSourceConnectionAllocator.allocate(DataSourceConnectionAllocator.java:620)
        at com.lutris.appserver.server.sql.standard.StandardLogicalDatabase.allocateConnection(StandardLogicalDatabase.java:586)
        at com.lutris.appserver.server.sql.standard.StandardDBTransactionFactory.getTransaction(StandardDBTransactionFactory.java:29)
        at org.enhydra.dods.jta.SyncDBTransactionFactory.getTransaction(SyncDBTransactionFactory.java:110)
        at com.lutris.appserver.server.sql.standard.StandardLogicalDatabase.createTransaction(StandardLogicalDatabase.java:619)
        at com.lutris.appserver.server.sql.StandardDatabaseManager.createTransaction(StandardDatabaseManager.java:745)
        at org.enhydra.shark.instancepersistence.data.ResourceQuery.<init>(ResourceQuery.java:183)
        at org.enhydra.shark.instancepersistence.DODSPersistentManager.getPersistedResourceObject(DODSPersistentManager.java:3822)
        at org.enhydra.shark.instancepersistence.DODSPersistentManager.restoreResource(DODSPersistentManager.java:1638)
        at org.enhydra.shark.SharkUtilities.getResource(SharkUtilities.java:518)
        at org.enhydra.shark.WAPIImpl.connect(WAPIImpl.java:101)
        at org.enhydra.shark.ws.WAPIWrapper.connect(WAPIWrapper.java:50)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)

 

 

And in cmdbuild.log:

 

ERROR 2011-12-15 03:31:03 [jsonrpc ] A org.cmdbuild.exception.CMDBWorkflowException occurred calling method class org.cmdbuild.servlets.json.schema.ModWorkflow.xpdlInfo: WF_WAPI_CONNECTION_ERROR

 

 

I dont understand why not found the database =$...

 

Thanks for your attendance, great job!!!

Hello Esteban,

 
I suppose you are changing Shark's META-INF/context.xml but Tomcat (sometimes) copies it to its  ${tomcat_home}/conf/${service_name}/${webapp_name}.xml (e.g. /opt/tomcat/conf/Catalina/shark.xml).
 
To solve your problem you should stop Tomcat, remove the copy of the context.xml and restart it. This should be enough.
 
Paolo

Hi Paolo,

 

We installed CMDBuild 1.5 on Tomcat6.

After some issues, CMDBuild is now up and running, and after some trials, it sounds great!

 

But we now encounter exactly the same issue than raised by Esteban when trying to configure Shark.

As indicated in the doc, we

configured shark/META-INF/context.xml url:

url="jdbc:postgresql://localhost/cmdbuild"

 

After restarting, we get the following error:

"Cannot get connection for URL jdbc:postgresql://localhost/${cmdbuild} : FATAL: database "${cmdbuild}" does not exist"

 

I found the local copy of context.xml here: /etc/tomcat6/Catalina/localhost/

cmdbuild-shark-webapp.xml

And effectively, it contains the old value:

url="jdbc:postgresql://localhost/${cmdbuild}"

 

So I stopped the service, removed this file, and restarted => the new file contains "${cmdbuild}" again!

 

Thanks in advance for your help,

Mathieu

 

My team succefully installed  cmdbuild-2.0.0. RAR yesterday, and now is trying to enable workflow in CMDB, but could not find {CMDBUILD}/WEB-INF/conf, would you please advice how to move forward?

Many thanks!

Lucia

 

Tecnoteca ha scritto:

Hello Esteban,

 
I suppose you are changing Shark's META-INF/context.xml but Tomcat (sometimes) copies it to its  ${tomcat_home}/conf/${service_name}/${webapp_name}.xml (e.g. /opt/tomcat/conf/Catalina/shark.xml).
 
To solve your problem you should stop Tomcat, remove the copy of the context.xml and restart it. This should be enough.
 
Paolo

 

Mathieu ha scritto:

Hi Paolo,

 

We installed CMDBuild 1.5 on Tomcat6.

After some issues, CMDBuild is now up and running, and after some trials, it sounds great!

 

But we now encounter exactly the same issue than raised by Esteban when trying to configure Shark.

As indicated in the doc, we

configured shark/META-INF/context.xml url:

url="jdbc:postgresql://localhost/cmdbuild"

 

After restarting, we get the following error:

"Cannot get connection for URL jdbc:postgresql://localhost/${cmdbuild} : FATAL: database "${cmdbuild}" does not exist"

 

I found the local copy of context.xml here: /etc/tomcat6/Catalina/localhost/

cmdbuild-shark-webapp.xml

And effectively, it contains the old value:

url="jdbc:postgresql://localhost/${cmdbuild}"

 

So I stopped the service, removed this file, and restarted => the new file contains "${cmdbuild}" again!

 

Thanks in advance for your help,

Mathieu

 

Please remove shark's .war file from the directory "webapps" of Tomcat.

And

rm -fr /var/cache/tomcat6/temp/*

rm -fr /var/cache/tomcat6/work/*

rm -fr /var/log/tomcat6/*

rm -fr /etc/tomcat6/Catalina/localhost/*

And restart tomcat.

Lucia,

with {CMDBUILD} or ${CMDBUILD} we mean to the folder of your CMDBuild application, so, for example: /opt/tomcat/webapps/cmdbuild

In this case "{CMDBUILD}/WEB-INF/conf" would mean "/opt/tomcat/webapps/cmdbuild/WEB-INF/conf"

 

Lucia ha scritto:

My team succefully installed  cmdbuild-2.0.0. RAR yesterday, and now is trying to enable workflow in CMDB, but could not find {CMDBUILD}/WEB-INF/conf, would you please advice how to move forward?

Many thanks!

Lucia

OK, we cleaned all these directories, then we modified the setting

:

   url="jdbc:postgresql://localhost/cmdbuild"

directly inside the shark.war, and deployed.

The url is now correct, we progress!

 

But we now encounter another error:

 

2012-10-22 11:27:05,094: StandardAssignmentManager -> Can't work - Problems while configuring UserGroupManager!

2012-10-22 11:27:05,094: 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)

   etc ....

 

There is probably something else to configure somewhere?

 

Any clue?

 

(we have this in shark-server.war/conf/Shark.conf:

#DatabaseManager.ConfigurationDir=@@/conf/dods

Is it normal?)

 

Mathieu

 

Mathieu,
which shark version are you try to install? Still the version released for CMDBuild 1.5 that you mention before, or you are trying the new version? Shark 2.3 (old) or Shark 4.4 (new)?
 
And could you give us some details about your system configuration? (OS, tomcats, webapps, ...)
Thanks.
 

We are testing the new CMDBUILD (2.0), and we are trying to install the new Shark (4.4).

 

System configuration is:

- CentOS release 6.2

- Tomcat 6

List of files/dirs in  {tomcat}/webapps/ :

Cmdbuild/

cmdbuild-shark/  (got from cmdbuild-distribution-shark-overlay-2.0.0.zip)

cmdbuild-shark-server/

Cmdbuild.war

cmdbuild-shark-server.war

 

Hi Mathieu, I encountered the same error: http://www.cmdbuild.org/it/supporto/forum/tecniche/584359201?b_start=0#35587054.

My config:

- Debian 6.0.6 and and Ubuntu 12.04 LTS.
- cmdbuild 2.0.2 (source: https://bitbucket.org/tecnoteca/cmdbuild/downloads/cmdbuild-2.0.2.war)
- shark 2.0.2 (source https://bitbucket.org/tecnoteca/cmdbuild/downloads/cmdbuild-shark-server-2.0.2.war)

Maybe we missed some configuration somewhere...

Regards,

Minja

Mathieu ha scritto:

We are testing the new CMDBUILD (2.0), and we are trying to install the new Shark (4.4).

 

System configuration is:

- CentOS release 6.2

- Tomcat 6

List of files/dirs in  {tomcat}/webapps/ :

Cmdbuild/

cmdbuild-shark/  (got from cmdbuild-distribution-shark-overlay-2.0.0.zip)

cmdbuild-shark-server/

Cmdbuild.war

cmdbuild-shark-server.war

 

Hi Minjia.
this error is probably due to the user that is running your tomcat.
In fact, we had experienced the same problem running the system tomcat6 which is started with the user tomcat6.
Asking to that tomcat to start as a superuser (changing in /etc/default/tomcat6 the properties TOMCAT6_USER and TOMCAT6_GROUP to root) makes the problem disappear.
Probably shark needs access to libraries or parts of the filesystem on which the user "tomcat6" has no privileges .
 
Best regards, 
Lisa