CMDBuild Forum

FAIL - Application at context path [/cmdbuild-3.1.1] could not be started

Hi all,

I am having trouble starting CMDBuild 3.1.1 in Tomcat 8.5.39. I shows error “FAIL - Application at context path [/cmdbuild-3.1.1] could not be started” in Tomcat App manager page. What could be the issue?

postgresql9.6, Tomcat 8.5.39, Java 1.80 installed.
OS used, CentOS 7 Minimal

Thank you.

The standard configurations of CMDBuild, described in the Technical Manual, consider that the Tomcat webapp folder is called “cmdbuild”, if you called it “cmdbuild-3.1.1” are you sure you have modified all the other configurations accordingly?

Hi,
Update, Tomcat 8.5.45 installed based on linuxize web

In Tomcat Manager, i uploaded and deployed cmdbuild-3.1.1.war.

using centos 7 nautilus, i copy database.conf into tomcat/conf/cmdbuild-3.1.1

Can be started but webpage did not load, loads forever.

I have followed steps as in technical manual. Can specify which configurations that should I look on?

I am unable to upload log file here due to this web error
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint “uploads_pkey”

Hi,
In the cmdbuild3.1.1 log,
there is a statement mentioned:

2019-09-30 16:59:29.554 [sys:boot] INFO o.cmdbuild.minions.SystemServiceImpl - check patch manager
2019-09-30 16:59:29.634 [sys:boot] ERROR o.cmdbuild.minions.SystemServiceImpl - system startup error
java.lang.IllegalArgumentException: the datasource is not configured!
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135) ~[guava-23.0.jar:na]
at org.cmdbuild.dao.datasource.ConfigurableDataSourceImpl.checkDatasource(ConfigurableDataSourceImpl.java:287) ~[cmdbuild-dao-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.dao.datasource.ConfigurableDataSourceImpl.getConnection(ConfigurableDataSourceImpl.java:224) ~[cmdbuild-dao-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.common.java.sql.ForwardingDataSource.getConnection(ForwardingDataSource.java:56) ~[cmdbuild-core-commons-3-SNAPSHOT.jar:na]
at org.cmdbuild.dao.postgres.ConnectionWrapperDataSource.getConnection(ConnectionWrapperDataSource.java:37) ~[cmdbuild-dao-postgresql-3-SNAPSHOT.jar:na]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) ~[spring-jdbc-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) ~[spring-jdbc-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:394) ~[spring-jdbc-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:474) ~[spring-jdbc-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:484) ~[spring-jdbc-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.cmdbuild.dao.config.inner.PatchCardRepositoryImpl.findAll(PatchCardRepositoryImpl.java:45) ~[cmdbuild-dao-config-3-SNAPSHOT.jar:na]
at org.cmdbuild.dao.config.inner.PatchManagerImpl.doReloadPatches(PatchManagerImpl.java:189) ~[cmdbuild-dao-config-3-SNAPSHOT.jar:na]
at org.cmdbuild.dao.config.inner.PatchManagerImpl.init(PatchManagerImpl.java:181) ~[cmdbuild-dao-config-3-SNAPSHOT.jar:na]
at org.cmdbuild.dao.config.inner.PatchManagerImpl.hasPendingPatches(PatchManagerImpl.java:93) ~[cmdbuild-dao-config-3-SNAPSHOT.jar:na]
at org.cmdbuild.dao.config.inner.PatchServiceImpl.hasPendingPatchesOrFunctions(PatchServiceImpl.java:112) ~[cmdbuild-dao-config-3-SNAPSHOT.jar:na]
at org.cmdbuild.minions.SystemServiceImpl.checkDatabase(SystemServiceImpl.java:258) [cmdbuild-core-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.minions.SystemServiceImpl.runNextStep(SystemServiceImpl.java:210) [cmdbuild-core-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.minions.SystemServiceImpl.runNextStep(SystemServiceImpl.java:208) [cmdbuild-core-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.minions.SystemServiceImpl.runNextStep(SystemServiceImpl.java:208) [cmdbuild-core-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.minions.SystemServiceImpl.runNextStep(SystemServiceImpl.java:208) [cmdbuild-core-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.minions.SystemServiceImpl.runNextStep(SystemServiceImpl.java:208) [cmdbuild-core-all-3-SNAPSHOT.jar:na]
at org.cmdbuild.minions.SystemServiceImpl.lambda$handleContextRefresh$0(SystemServiceImpl.java:138) [cmdbuild-core-all-3-SNAPSHOT.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222]
2019-09-30 16:59:29.637 [sys:boot] INFO o.cmdbuild.minions.SystemServiceImpl -

system is ERROR

Possible the database problem?

Hi, i assume you are having the same problem as this: Need help pleeeeease! Waiting for local host problem :( .
Just remove the ‘#’ symbols from the configuration

Hi,
Thank you for suggestion but I have did that way before.
Still did not work and stuck in “waiting for localhost”

Can you please paste here your database configuration?

Hi,
as in database.conf

db.url=jdbc:postgresql://localhost:5432/cmdbuild_30
db.username=cmdbuild
db.password=cmdbuild
db.admin.username=postgres
db.admin.password=postgres

I also check in pgAdmin4, and cmdbuild_30 inside there is running.

Hi , the error message is very clear: “the datasource is not configured!”

What is the path of the database.conf file?
Mine is in tomcat/conf//database.conf.

Depending on the distribution you are running and on how you installed tomcat, this path may vary, which is why I haven’t gave you a full path. Sorry, you will have to figure that yourself, but it usually is in the same folder as where the folder called webapps is.

Mind also that the user running tomcat does have the right permission to read from this file.

Giuseppe

Hi, I just realised that my previous message contained some shortcode that crippled the path:
IT’s /tomcat/conf/NAME_OF_THE_WEBAPP/database.conf.
Apologies,
Giuseppe

Hi Giuseppe,
Thank you for your reply. I did follow few of your scripts in your personal website.

I managed to get CMDBuild 3.1.1 running. I not sure what I did before, maybe I used some of your scripts or restart some process/service or made some changes in text editor.

The path for storing database.conf in my CentOS is in opt/tomcat/conf/cmdbuild-3.1.1/database.conf.

Now I am figuring and working out on installing DMS Alfresco for attaching documents.

ah cool! and tx for the correct path.

Giuseppe

in manual,

dbconfig runs in terminal

i cd to installation path,

cd /opt/tomcat/
bash webapps/cmdbuild-3.1.1/cmdbuild.sh dbconfig create empty -configfile conf/cmdbuild-3.1.1/database.conf

empty file can be changed either, demo, demo_03, empty_30

installation especially for beginners will not able to figure out this database.

Hope this will help out others.