• Is it possible to copy openKM from machine A to machine B?

  • 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.
 #29226  by shie
 
Hi, exports!
Is it possible to copy openKM from machine A to machine B? It may be a stupid way, but I want to try it.
machine A : source, well run, with many files and users in it. Windows, openkm-6.3.0-community(update from 6.2.4), mysql56.
machine B: the new machine I want to run openKM on it.
My steps:
Step 1:
Install openkm-6.3.0-community and mysql on machine B. And other programs like openoffice, etc.
Step 2:
Deploy mysql and openKM as normal. The password of database (okmdb) is the same as machine A. And login as okmAdmin successfully.
Step 3:
Stop openKM and mysql. Backup & delete 2 folders: “repository” and “MySQL Server 5.6” on machine B, except ib_logfile and .err in the “MySQL Server 5.6”.
Step 4:
Copy these folders (“repository” and “MySQL Server 5.6”) from machine A to machine B, except ib_logfile and .err in the “MySQL Server 5.6”.
Step 5:
Start mysql and openKM on machine B. OpenKM boot up with some error. I can login openKM with the usernames and passwords on machine A. So the database copied from machine A works. But after login, it comes the error when “Loading user values”
Code: Select all
OKM-012024(GetRootFolder): Database error
could not execute query
boot up error:
Code: Select all
2014-07-10 20:05:31,275 [localhost-startStop-1] INFO  com.openkm.servlet.RepositoryStartupServlet- *** Repository initializing... ***
2014-07-10 20:05:31,306 [localhost-startStop-1] WARN  org.hibernate.util.JDBCExceptionReporter- SQL Error: 1054, SQLState: 42S22
2014-07-10 20:05:31,306 [localhost-startStop-1] ERROR org.hibernate.util.JDBCExceptionReporter- Unknown column 'nodefolder0_1_.NBS_PATH' in 'field list'
2014-07-10 20:05:31,306 [localhost-startStop-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- Servlet /OpenKM threw load() exception
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nodefolder0_1_.NBS_PATH' in 'field list'
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
	at com.mysql.jdbc.Util.getInstance(Util.java:384)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2264)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
	at org.hibernate.loader.Loader.doQuery(Loader.java:802)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
	at org.hibernate.loader.Loader.doList(Loader.java:2542)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
	at org.hibernate.loader.Loader.list(Loader.java:2271)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
	at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890)
	at com.openkm.dao.NodeFolderDAO.findByPk(NodeFolderDAO.java:200)
	at com.openkm.module.db.DbRepositoryModule.create(DbRepositoryModule.java:113)
	at com.openkm.module.db.DbRepositoryModule.initialize(DbRepositoryModule.java:85)
	at com.openkm.servlet.RepositoryStartupServlet.start(RepositoryStartupServlet.java:175)
	at com.openkm.servlet.RepositoryStartupServlet.init(RepositoryStartupServlet.java:127)
	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2014-07-10 20:05:31,322 [localhost-startStop-1] WARN  org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet- CMIS version is not defined! Setting it to CMIS 1.0.
2014-07-10 20:05:31,400 [localhost-startStop-1] INFO  org.apache.catalina.startup.HostConfig- Deploying web application directory C:\KM\openkm-6.3.0-community\tomcat\webapps\ROOT
2014-07-10 20:05:32,008 [main] INFO  org.apache.coyote.http11.Http11Protocol- Starting ProtocolHandler ["http-bio-172.18.73.158-8080"]
2014-07-10 20:05:32,024 [main] INFO  org.apache.coyote.ajp.AjpProtocol- Starting ProtocolHandler ["ajp-bio-127.0.0.1-8009"]
2014-07-10 20:05:32,024 [main] INFO  org.apache.catalina.startup.Catalina- Server startup in 21455 ms
 #29253  by jllort
 
really your doing and update to 6.2.4 to 6.3.0.
First on B should act as a 6.2.5 migration http://wiki.openkm.com/index.php/Migrat ... 4_to_6.2.5
Then get OpenKM.war from 6.2.3 and do the upgrade from 6.2.5 ( is the same than 6.2.6 ) to 6.3 http://wiki.openkm.com/index.php/Migrat ... 2.6_to_6.3
 #29276  by shie
 
Thank you for your reply, jllort.
It does the version issue. I have installed openKM 6.3 on machine B, while the source (machine A) is based on openKM 6.2.4 and update to 6.3.
My steps solving this problem:
step 1:
Downgrade openKM from 6.3 to 6.2.4.
Make a backup!!!
Stop Tomcat
Edit OpenKM.cfg and set hibernate.hbm2ddl to update
Replace the OpenKM.war (6.3) with OpenKM.war (6.2.4)
delete these folders:
$TOMCAT_HOME/webapps/OpenKM
$TOMCAT_HOME/work/Catalina/localhost
And start Tomcat again.
And the boot up error is no longer displayed. I can login successfully. And all files copied from machine A are listed on my new openKM. So the transplanting is successful.

step 2:
upgrade from 6.2.4 to 6.2.5 http://wiki.openkm.com/index.php/Migrat ... 4_to_6.2.5
step 3:
upgrade from 6.2.5 ( is the same than 6.2.6 ) to 6.3 http://wiki.openkm.com/index.php/Migrat ... 2.6_to_6.3
That's all.

Thanks again.

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.