CMDBuild Forum

CMDBuild Windows instalaltion issue

Hello,

I’m trying to install CMDBuild 3.4 on a Windows 10 that is a remote machine but I’m getting error.
Thanks

08:57:22.168 DEBUG o.c.utils.postgres.PgLibsUtils - invalid default pg lib
java.lang.RuntimeException: java.io.IOException: Cannot run program “psql.exe”: CreateProcess error=2, The system cannot find the file specified
at org.cmdbuild.utils.lang.CmExceptionUtils.toRuntimeException(CmExceptionUtils.java:102)
at org.cmdbuild.utils.lang.CmExceptionUtils.runtime(CmExceptionUtils.java:60)
at org.cmdbuild.utils.exec.CmProcessUtils.executeProcess(CmProcessUtils.java:84)
at org.cmdbuild.utils.exec.CmProcessUtils.executeProcess(CmProcessUtils.java:44)
at org.cmdbuild.utils.postgres.PgLibsUtils.getLibVersion(PgLibsUtils.java:86)
at org.cmdbuild.utils.postgres.PgLibsUtils.getPgLibs(PgLibsUtils.java:73)
at org.cmdbuild.utils.postgres.PostgresHelperImpl.(PostgresHelperImpl.java:78)
at org.cmdbuild.utils.postgres.PostgresHelperConfigImpl$PostgresHelperBuilder.buildHelper(PostgresHelperConfigImpl.java:222)
at org.cmdbuild.utils.postgres.PostgresUtils.dumpContainsSchema(PostgresUtils.java:55)
at org.cmdbuild.dao.config.inner.DatabaseCreator.restoreDump(DatabaseCreator.java:333)
at org.cmdbuild.dao.config.inner.DatabaseCreator.configureDatabase(DatabaseCreator.java:169)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:42)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:36)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:32)
at org.cmdbuild.utils.gui.GuiCommandRunner$InstallHelper.lambda$install$10(GuiCommandRunner.java:319)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: Cannot run program “psql.exe”: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at org.cmdbuild.utils.exec.CmProcessUtils.executeProcess(CmProcessUtils.java:58)
… 13 common frames omitted
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:494)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
… 15 common frames omitted
08:57:22.168 ERROR o.c.utils.gui.GuiCommandRunner - error executing install
org.cmdbuild.dao.DaoException: Error while configuring the database
at org.cmdbuild.dao.config.inner.DatabaseCreator.configureDatabase(DatabaseCreator.java:185)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:42)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:36)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:32)
at org.cmdbuild.utils.gui.GuiCommandRunner$InstallHelper.lambda$install$10(GuiCommandRunner.java:319)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.cmdbuild.dao.DaoException: java.lang.IllegalArgumentException: CM: autodetect failed to find postgres libs on this system
at org.cmdbuild.dao.config.inner.DatabaseCreator.restoreDump(DatabaseCreator.java:389)
at org.cmdbuild.dao.config.inner.DatabaseCreator.configureDatabase(DatabaseCreator.java:169)
… 5 common frames omitted
Caused by: java.lang.IllegalArgumentException: CM: autodetect failed to find postgres libs on this system
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135)
at org.cmdbuild.utils.postgres.PgLibsUtils.getPgLibs(PgLibsUtils.java:77)
at org.cmdbuild.utils.postgres.PostgresHelperImpl.(PostgresHelperImpl.java:78)
at org.cmdbuild.utils.postgres.PostgresHelperConfigImpl$PostgresHelperBuilder.buildHelper(PostgresHelperConfigImpl.java:222)
at org.cmdbuild.utils.postgres.PostgresUtils.dumpContainsSchema(PostgresUtils.java:55)
at org.cmdbuild.dao.config.inner.DatabaseCreator.restoreDump(DatabaseCreator.java:333)
… 6 common frames omitted

Good day!

Did you eventually find a solution to this above problem? Im also having the same error and I don’t know how to go about resolving it

I really hope this helps someone as I struggled with this same exact issue for days. Googling was zero help. So was this forum :(. Now that I have it working I thought I’d pay it forward.
Multiple things had to be fixed to get this working, all having to do with paths.
Open up environmental variables (search Environment > open Edit system environment variables> Environment Variables button.
In the bottom pane ADD:
LD_LIBRARY_PATH
C:\Program Files\PostgreSQL\12\lib

EDIT PATH variable:
ADD: C:\Program Files\PostgreSQL\12\bin

Make sure PostGIS is actually installed. I used the StackBuilder and it said it installed but it didn’t. I used the binary installer from the Postgres website. That actually installed and activated the GIS extensions.
This got the DB Dump process to finish without breaking. Still can’t get the site to load, it just spins but the root Tomcat page loads and I’m seeing output about a configuration error in relationship to the DB so hopefully I’ll be running soon. I’ll update when I can actually load the app. Hope the above helps someone and maybe can mutually find a resolution.

I’ve worked in SaaS as a DBA and Sr SysAdmin for almost 2 decades. The documentation and install doc is pathetic. I’d be fired and looking for work as a Walmart greeter if I turned out what they did :frowning: