• Can't Get MySQL working with OpenKM

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #31073  by b33gopher
 
I am trialing 6.4.14 Pro on Ubuntu 14.04. I am trying to setup OpenKM with mySQL following these directions http://wiki.openkm.com/index.php/MySQL_-_OpenKM_6.2 but I am getting an error when browsing to the server. I'm sure I am missing something but can't seem to figure out what. Any help would be appreciated.

1) I have installed OpenKM to /opt/openkm-version#
2) I installed mysql
3) before running openkm I did the following

a) configured OpenKM.cfg with these lines
Code: Select all
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl=create
b) created database and user
Code: Select all
DROP DATABASE IF EXISTS okmdb;
CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER openkm@localhost IDENTIFIED BY '*secret*';
GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;
c) added the following lines to the server.xml file
Code: Select all
<Resource name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"
          maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1"
          username="openkm" password="password" driverClassName="com.mysql.jdbc.Driver"
          url="jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"/>
4) OpenKM.xml isn't recreated until OpenKM is started. However, once the file is created. my entries matched what is in the documentation
Code: Select all
<security:authentication-manager alias="authenticationManager">
  <security:authentication-provider>
    <security:password-encoder hash="md5"/>
    <security:jdbc-user-service 
        data-source-ref="dataSource"
        users-by-username-query="select usr_id, usr_password, 1 from OKM_USER where usr_id=? and usr_active='T'"
        authorities-by-username-query="select ur_user, ur_role from OKM_USER_ROLE where ur_user=?"/>
  </security:authentication-provider>
</security:authentication-manager>
5) Started OpenKM service
6) Browsed to http://<server ip>:8080/OpenKM/login.jsp
7) Received Error message: see attached document
Attachments
OpenKM Error.JPG
OpenKM Error.JPG (23.07 KiB) Viewed 3921 times
 #31088  by pavila
 
I cant understand what are you trying to do. If you downloaded OpenKM 6.4.x trial after the installation process you have Tomcat + OpenKM already configured. The trial is configured to use an embeded database called Hypersonic. I think it's enought for testing. Why do you need to install it for MySQL?
 #31092  by b33gopher
 
I'm looking at purchasing your Pro version. I'm not that familiar with MYSQL and wanted to make sure I could configure MYSQL with OpenKM before proceeding to purchase the product.
 #31095  by pavila
 
Most of our customers have OpenKM with OpenKM. Don't care about configuration because we install and configure OpenKM for your.
 #31112  by b33gopher
 
As long as you have a support contract, I'm sure that is fine for many of your customers. However, if we don't have a support contract, and need to do a disaster recovery or migrate the software to another server for example, then it's important to understand how the software is configured/installed with mysql.
 #31118  by pavila
 
Well, it's quite simple. The steps your followed are right. But trial has been modified to ease it's installation process. You won't be able to configure it with MySQL unles you modify "WEB-INF/web.xml", where Spring is configured. This part should be this way:
Code: Select all
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
      /WEB-INF/applicationContext.xml
      file:${catalina.home}/OpenKM.xml
    </param-value>
  </context-param>
Keep on mind that this trial has a time limitation, so disaster recovery or migration has little sense.
 #31121  by b33gopher
 
Thanks for your reply. My intension is to have a disaster recovery setup for the production Pro install not the trial. I asssumed the trial would be setup similar to the actual Pro install which is why I wanted to get it working with MYSQL. Apparently that isn't the case. There isn't any specific documentation pertaining to the MSSQL setup for Pro that I've found. I've only found documentation pertaining to an older commmunity version 6.2 which is what I linked to in my original post. Does that particular documentation also pertain to the Pro version or is the MYSQL Pro version documentation only available through a support contract? That's fine if it is. It just seems a bit unclear on your site.
 #31135  by jllort
 
The steps for connecting community and professional are exactly the same ( same files, and same configuration ). About documentation we're doing a major improvemente, and I hope in 3-4 months will be able to be shown ( then will be clear what's professional and what community documentation, because now all is not clear, we know it and we're working to solve ).

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.