Page 1 of 1

javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Thu Oct 04, 2018 5:29 pm
by agb123
Hello,

I've just installed OpenKM on Windows 10x64 and got this error javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection. I'm using MySQL 8 and java jdk1.8.0_171
Screenshot_2.png
Screenshot_2.png (9.34 KiB) Viewed 15414 times
I'm new to this system, I hope you can help me with it.
(8.99 KiB) Downloaded 526 times
Thanks!!

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Fri Oct 05, 2018 8:24 am
by lnovoa
Hi!,
The problem is because of the MySQL version.
You have two options:
1.
  • Uninstall version 8 and install MySQL 5.7.
  • Stop the server and delete the tomcat/repository directory.
  • Modify the file Openkm.cfg the property hibernate.hbm2ddl = create.
  • Start the tomcat.
2. Follow the steps to the link:
https://docs.openkm.com/kcenter/view/ok ... oting.html

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Fri Oct 05, 2018 1:59 pm
by agb123
@Inova, thanks a lot, I followed the steps to the first option and it worked perfectly.

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Thu Jul 07, 2022 10:28 pm
by vf20fena
Im in the virtual machine .ova y compile the tomcat and run catalina.sh every thing is ok and al the en when i try to get in to the portal it saysss:
Code: Select all
avax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Sun Jul 10, 2022 4:48 pm
by jllort
That's because can not connect to the database, check:
* Mysql is started
* The okmdb exist
* Check the database configuration at server.xml ( into tomcat-XXX/conf folder )

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Tue Jan 24, 2023 9:48 pm
by ckhounesavath
I am also having the same issue. Please refer to the following:
Code: Select all
Application error
Class: org.apache.jasper.JasperException
Message: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection
Date: Tue Jan 24 13:57:14 CST 2023
What can I do to resolve this error, but not lose all of my files?

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Sat Feb 11, 2023 7:22 pm
by jllort
The problem happens because the application is not able to connect with your database. Test the configuration set in the server.conf file to connect with the database and check the connection with a database client.

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Wed Aug 16, 2023 7:26 pm
by raime20
Hola, me pasa lo mismo, pero estoy utilizando el entorno de virtualización en formato OVA que descargué del sitio oficial de OpenKM

Re: javax.servlet.ServletException: com.openkm.core.DatabaseException: Cannot open connection

PostPosted:Wed Aug 23, 2023 4:57 pm
by jllort
Check if the database is up and the user credentials are working:

* user: openkm
* password: openkm