Page 1 of 1

Installing OpenKM with NFS & MySQL in different server

PostPosted:Fri Jul 04, 2014 8:02 am
by tiopourtu
Hi all,

Could any body help me on this one. I try to install OpenKM with NFS & MySQL in different server. Let's say:

1. I install OpenKM in Webserver (192.168.123.14). The installation was succesful with using Nginx as reverse proxy listening to port 80.
2. I install NFS in RepositoryServer (192.168.123.11) and then I change the repository.home via mounting mounting the network folder shared from NFS.
3. I install MySQL in DatabaseServer (192.168.123.12). This one I had problems.

I configure OpenKM by following this instructions: http://wiki.openkm.com/index.php/MySQL_ ... e_creation.
But when I start the tomcat and then access the web say http://192.168.123.14/OpenKM then I got errot message:

Application error
Class: org.apache.jasper.JasperException
Message: javax.servlet.ServletException: java.lang.ExceptionInInitializerError

I don't know where to find the cause.. is there anybody facing the same problem or even had the solutions ?

Thanks,
Tio

Re: Installing OpenKM with NFS & MySQL in different server

PostPosted:Fri Jul 04, 2014 10:32 am
by tiopourtu
Well, finally I got it work... here is the step just in case me or someone else facing the same problem next time.

1. Turned out to be type mistake in OpenKM.cfg
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDialect --> should be hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
2. Since database user connecting from 192.168.123.14 (Webserver), so in DatabaseServer I give permission to database user okmdb@192.168.123.14
3. Stop tomcat
4. Delete $TOMCAT_HOME\webapps\OpenKM
5. Delete $TOMCAT_HOME\work\Catalina\localhost
6. Delete all files created in RepositoryServer from previous failed installation
7. Change hibernate.hbm2ddl=none to hibernate.hbm2ddl=create
8. Start tomcat
9. Access http://192.168.123.14/OpenKM

I don't know if the steps are incorrect, but finnaly I got it work.
Should anybody see if there's something wrong with those steps, I'll be glad to hear it.

Regards,
Tio

Re: Installing OpenKM with NFS & MySQL in different server

PostPosted:Sun Jul 06, 2014 9:49 am
by jllort
The steps seems correct. In documentation ( wiki ) we show the case when database is configured in same server than is openkm. I think the problem you got was only the database user grants to access from ip, nothing else. Anyway the other steps are correct.

About hibernate.dialect=org.hibernate.dialect.MySQL5InnoDialect --> should be hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect (this is correct, here force database to use by default innodb engine, but i suspect this was not the problem, latest mysql comes by default with innodb engine by default ).

Re: Installing OpenKM with NFS & MySQL in different server

PostPosted:Mon Jul 07, 2014 12:56 am
by tiopourtu
Dear jllort,

Thanks for replying. Indeed the root cause is the database permissions, because I just check the mysql engines, it defaults to use InnoDB. Again, thanks for confirming the steps, I can't continue to configure the OpenKM now.

Regards,
Tio