CMDBuild Forum

Openmaint presenta "Error: no existe la función _cm_class_list()" al ingresar al entorno de administration

Hi everyone, I try to login on Openmaint  openmaint-1.1-2.5.1, I have install the following resources:

 

1. OS Windows 8.1

2. Tomcat 7.0.88

3. jdk1.8.0_171

    jre1.8.0_171

4. alfresco-community-3.4.d-installer-win-x64

5. postgresql-9.3.23-1-windows-x64

 

I try to config the file 

_________________________________________________________

in the files:

C:\Tomcat7\webapps\openmaint\WEB-INF\conf\database.conf

I see this:

 

#Thu Jun 28 15:33:48 COT 2018

db.password=mypass

db.url=jdbc\:postgresql\://localhost\:5432/postgres

db.username=postgres

______________________________________________________________________________________________________________________________________

in the file:

C:\Tomcat7\webapps\shark\conf\shark.conf

I see this:

 

# CMDBuild Custom Components Settings

#-----------------------------------------------------------------------------

# you should change these settings

 

# CMDBuild connection settings

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

org.cmdbuild.ws.username=workflow

org.cmdbuild.ws.password=changeme

 

# GroovyToolAgent settings

#CMDBuild.Groovy.Repository=

 

Note:

I try to change the url for 

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

 

Tomcat not run the application.

________________________________________________________________________________________________________________________________

in the file:

C:\Tomcat7\webapps\shark\META-INF\context.xml

I see:

 

<?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/${cmdbuild}"

username="shark"

password="shark"

maxIdle="10"

maxActive="300"

maxWait="5000"

factory="org.enhydra.jndi.DataSourceFactory"/>

</Context>

 

Note:

 

I try to change 

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

 

Tomcat not run the application.

______________________________________________________________________________________________________________________________________

 

The error with  the config a Database Existing_ is:

 

Call: services/json/configure/apply

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

Error: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT table_id, _cm_cmtable(table_id) AS table_name, _cm_cmschema(table_id) as table_schema, _cm_parent_id(table_id) AS parent_id, _cm_comment_for_table_id(table_id) AS table_comment FROM _cm_class_list() AS table_id WHERE _cm_cmschema(table_id) IN (_cm_cmschema('"Class"'::regclass::oid), 'bim')]; nested exception is org.postgresql.util.PSQLException: ERROR: no existe la función _cm_class_list()

  Hint: Ninguna función coincide en el nombre y tipos de argumentos. Puede ser necesario agregar conversión explícita de tipos.

  Position: 190

Note:

in here log file it refer to "no exist the function " _cm_class_list()"

I thing that Postgres not charge the tables structure exisiting in the Tomacat sql files but I cant to config correctly the file shark.conf

____________________________________________________________________________________________________________________________________

In pgAdminIII,  In login Roles I config the following terms, I see in SQL pane:

-- Role: postgres

-- DROP ROLE postgres;

CREATE ROLE postgres LOGIN

  ENCRYPTED PASSWORD 'md5b3b4ccc685f40db7d06ada7f9c59febe'

  SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;

ALTER ROLE postgres

  SET search_path = pg_default, postgres;

__________________________________________________________________________________________________________________________________

In DatabaseManager.log I see:
 
2018.06.28 13:22:36: databaseManager,EMERGENCY: [localhost-startStop-1] ConnectionAllocator: failed to allocate a new connection
2018.06.28 13:22:36: databaseManager,EMERGENCY+  (connection pool is not used!): 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} : The connection attempt failed.
2018.06.28 13:22:36: databaseManager,EMERGENCY+ 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} : The connection attempt failed.
 
so, I'm going to the file context.xml and I make  change of the term
 
url="jdbc:postgresql://localhost/${cmdbuild}"
for
url="jdbc:postgresql://localhost/openmaint"
 
and..
 
Tha application not run in tomcat.
 
Why is the error?