• Migration from 5.0.4 to 5.1.7

  • 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.
 #12154  by Catscratch
 
Hi,

I tried your migration guide but got a lot of problems with it.

However, I'm at a point where I can login, but get exceptions on the repository on some (not all) files.

Here is an example:
Code: Select all
2011-09-15 10:00:23,511 ERROR [com.openkm.servlet.frontend.DashboardServlet] Invalid UUID: /okm:root/Studentische Arbeiten/Aktuelle/Bachelor_Axel_Schroeder/Veroeffentlichung/Veröffentlichung_v0.9.docx: null
com.openkm.core.RepositoryException: Invalid UUID: /okm:root/Studentische Arbeiten/Aktuelle/Bachelor_Axel_Schroeder/Veroeffentlichung/Veröffentlichung_v0.9.docx: null
	at com.openkm.module.direct.DirectDashboardModule.getUserLastDownloadedDocuments(DirectDashboardModule.java:397)
	at com.openkm.api.OKMDashboard.getUserLastDownloadedDocuments(OKMDashboard.java:120)
	at com.openkm.servlet.frontend.DashboardServlet.getUserLastDownloadedDocuments(DashboardServlet.java:380)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:207)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:662)
Caused by: javax.jcr.RepositoryException: Invalid UUID: /okm:root/Studentische Arbeiten/Aktuelle/Bachelor_Axel_Schroeder/Veroeffentlichung/Veröffentlichung_v0.9.docx: null: null
	at org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:858)
	at com.openkm.module.direct.DirectDashboardModule.getDocuments(DirectDashboardModule.java:525)
	at com.openkm.module.direct.DirectDashboardModule.getUserLastDownloadedDocuments(DirectDashboardModule.java:412)
	at com.openkm.module.direct.DirectDashboardModule.getUserLastDownloadedDocuments(DirectDashboardModule.java:391)
	... 31 more
Caused by: java.lang.IllegalArgumentException
	at org.apache.jackrabbit.uuid.UUID.<init>(UUID.java:122)
	at org.apache.jackrabbit.uuid.UUID.fromString(UUID.java:162)
	at org.apache.jackrabbit.core.SessionImpl.getNodeByUUID(SessionImpl.java:855)
	... 34 more
I migrated the repository like you described. What's wrong here?

Best regards.
 #12183  by jllort
 
The cause of the problem is that some database changes can not be asumed totally by hibernate.

The problem is that OpenKM 5.0 is not full compatible with 5.1 for it reason we only export users and roles. There're several ways to upgrade 5.0 to 5.1, copy repository folder to new jboss 5.1.x and start up or mantaining older jboss 5.0.x I think this is your case, you must set OpenKM.cfg to create ( ensure you've got users / roles script backup ) restart jboss all database will be recreated at startup, then you must login as okmAmin / admin and restore the users information, the other nformation will be lost. Remember set OpenKM.cfg parameter to none.

If there're some parameter you want to mantaining from older database ( configuration etc... ) take a look on it before recreating database. Take a look before if you've got some kind of configuration done in other places, that you want mantaining in new OpenKM installation. We've only created the user, roles script. Other interesting tables could be config and profiles. ( here probably we've done some changes ).

Other solution could be drop activity tables and set OpenKM.cfg to update ( but I suggest creation, because we've made changes in other tables and I can no ensure to you with it will be enought ).

If you've got a problem with re-create new dbms because you don't want lose some data, tell here.
 #12208  by luke
 
I migrated OpenKM 5.0.4 to 5.1.8 with your instruction and It works perfectly. I didn`t find any problems so far. My snapshot build is 7215. I only have to create new User Config profile.
 #12572  by ilbuzzo
 
I'll need to update my openkm installation (5.0.4) to 5.1.7.
In my configuration I use PostgreSQL as database both for users and repository.
Is it possible to update without losing information stored in the database?
Do I need to manually check tables and restore data?
 #12594  by jllort
 
It's possible but there's some extra job for doing it.
If you want to make this kind of migration I suggest:
1- Configure new OpenKM fresh installation 5.1.X
2- Compare okm_* tables from version 5.0 to 5.0 looking for differences ( you can get some application like data studio for doing it ).
3- Then manually must adapt older structure to newer ( you'll get some time for doing it. )
4- After it you'll only need replace older OpenKM.war with newer

Obviously before doing it ...make a backup

With our migration purpose you'll lose some information like okm_activity, but if you've not workflows we've thinked is not relevant and can be lost, but that decision really it's in your hand. We've not decided making the big tables update, because it's not trivial and for major user could be really a hard process.
 #12605  by ilbuzzo
 
Thanks for your answer.
I'll try to update manually to preserve activity logs and other db tables.
I suppose that there are no changes in okm_repo database but all changes are limited to okm_app database.
Is it correct (this will simplify my procedure)?
 #12609  by jllort
 
Yes okm_repo has no changes ( in this case there's no repository version change ). I suggest you backup entire repository , etc... but specially backup your okm_app database.

If you create some migration scripts, you could provide us and will share with the rest of community users.

I suggest first execute our scripts with your old database, that ensures migration of users, and roles tables. Probably there're other minor changes on login-service.xml ( at conf folder ) and repository.xml / workspace.xml could have some changes on version 5.1.X take a look on it ... you only need make few changes on these files. Read with care http://wiki.openkm.com/index.php/Migrat ... 4_to_5.1.8
 #12610  by ilbuzzo
 
If I manage to migrate without troubles I'll release the procedure followed (as well as scripts).
I used the following three with my PostgreSQL installation
Code: Select all
SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || USR_ID || ''', ''' || USR_NAME || ''', ''' || USR_PASSWORD || ''', ''' || USR_EMAIL || ''', ''' || CASE WHEN USR_ACTIVE THEN 'T' ELSE 'F' END || ''');' FROM OKM_USER;
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' || ROL_ID || ''', ''' || CASE WHEN ROL_ACTIVE THEN 'T' ELSE 'F' END || ''');' FROM OKM_ROLE;
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || UR_USER || ''', ''' || UR_ROLE || ''');' FROM OKM_USER_ROLE;
Thanks again for the information.
 #12733  by pavila
 
I updated yesterday the wiki to include the PostgreSQL sentences. But didn't see this post until today :?

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.