Page 1 of 1
not creating necessary tables in okm_app DB
PostPosted:Fri Nov 05, 2010 8:49 pm
by trodak
I have configured the app to use mysql on the back end. I have followed the documentation on how to setup the mysql connectivity etc... Once I do that and run the executable file, everything seems to work just fine until I look at the mysql database. The application is creating the okm_repo DB with tables just fine so I know that I have the right config in the repository.xml file.
When I look in the okm_app DB there are no tables, which tells me that it must be my datasource configuration that is not working right. I have taken the config for the datasource and created its own file in the depoy dir (mysql-ds.xml). I have also tried adding that same config to the open openkm-ds.xml as well. That is the only config that I see that has anything to do with the okm_app DB.
Can anyone point me in the right direction? Only half of the DB creation is working for me.
Server OS: Centos 5.5 64x
OpenKM5.0
MysqlServer: 5.0.77
JDBC Driver : mysql-connector-java-5.1.13-bin.jar
Re: not creating necessary tables in okm_app DB
PostPosted:Fri Nov 05, 2010 9:35 pm
by jllort
in your mysql-ds.xml points to okm_app ? is users and password right ?
take a look at creation procedure in server.log if it appears some error.
You mandatory must restarting the process:
1- stop jboss
2- delete repository folder into jboss_home
3- delete all tables into okm_repo, or drop okm_repo and create.
4- start jboss.
put here your mysql-ds.xml and your OpenKM.cfg ( the parameter is "create" ? here )
Re: not creating necessary tables in okm_app DB
PostPosted:Mon Nov 08, 2010 4:43 pm
by trodak
------------------------------server/default/deploy/mysql-ds.xml------------------------------------
Code: Select all<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mysql-ds.xml 71535 2008-04-01 07:05:03Z adrian@jboss.org $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->
<datasources>
<local-tx-datasource>
<jndi-name>OpenKMDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/okm_app?autoReconnect=true</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>openkm</user-name>
<password>*secret*</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>28680</idle-timeout-minutes>
<exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
<valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
-------------------------------------------END server/default/deploy/mysql-ds.xml-----------------------------------
Re: not creating necessary tables in okm_app DB
PostPosted:Mon Nov 08, 2010 4:44 pm
by trodak
---------------------OpenKM.cfg-------------------------
Code: Select all# Default configuration values
#
# repository.config=repository.xml
# repository.home=repository
# system.user=system
# default.user.role=UserRol
# default.admin.role=AdminRol
# principal.adapter=com.openkm.core.UsersRolesPrincipalAdapter
# max.file.size=5
# max.search.results=25
# system.demo=off
restrict.file.mime=off
restrict.file.extension=*~,*.bak,._*
#system.ocr=/usr/bin/tesseract
#system.openoffice=/usr/lib/openoffice
#system.img2pdf=/usr/bin/convert
#system.pdf2swf=/usr/bin/pdf2swf
#system.antivir=/usr/bin/clamscan
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
hibernate.hbm2ddl=create
#application.url=http://localhost:8080/OpenKM/com.openkm.frontend.Main/index.jsp
max.file.size=060520010
#principal.adapter=com.openkm.principal.DatabasePrincipalAdapter
-------------------------END OpenKM.cfg
Re: not creating necessary tables in okm_app DB
PostPosted:Mon Nov 08, 2010 6:19 pm
by trodak
2- delete repository folder into jboss_home --- Seemed to WORK! I will let you know otherwise. Thanks for the insight.
Re: not creating necessary tables in okm_app DB
PostPosted:Wed Nov 10, 2010 6:41 am
by jllort
when you create mysql-ds.xml file have you deleted the openkm-ds.xml file, because both could not exists at same time declaring jni OpenKMDS
If you delete repository folder, remember you must delete both databases and create as new ( empty )