Page 1 of 1

Can't force unlock (okm-002009)

PostPosted:Thu Apr 21, 2011 9:27 am
by Catscratch
Hi,

I can't unlock a file by another user.
Code: Select all
OKM-002009(Force UnLock): Zugriff auf Dokument verweigert

Only administrator use allowed
I should be an administrator. I'm part of the administrator group and can see the "Administration" tab.
I also see all workspaces of the other users.

So, whats the problem?
Thank you.

Re: Can't force unlock (okm-002009)

PostPosted:Thu Apr 21, 2011 11:02 am
by Catscratch
Ok, I created a user in the Active Directory with the login "okmadmin" with the same rights.

This user could unlock files of other users. So it seems you're only checking the username instead of the user rights.

Seems like es Bug in openkm...is there a plan to fix it?

best regards

Re: Can't force unlock (okm-002009)

PostPosted:Thu Apr 21, 2011 3:14 pm
by jllort
It's not a bug, it's a restriction. okmadmin has some several administrator features that others not have.

Re: Can't force unlock (okm-002009)

PostPosted:Thu Apr 21, 2011 8:51 pm
by Catscratch
But if I activate LDAP I can't use okmAdmin buildin account anymore. So there is no sense for this restriction. An administrator (or several administrators) should have the same rights. At least, they are admins too, not users.

Re: Can't force unlock (okm-002009)

PostPosted:Fri Apr 22, 2011 7:42 am
by pavila
You need an "okmAdmin" in the LDAP source (or "okmadmin" if you are on ActiveDirectory because it is no case-sensitive and you configured the system.login.lowercase property). See http://wiki.openkm.com/index.php/Active_Directory for more info. If this does not work with a "okmadmin" user, then maybe you have found a bug. In this case, feel free to post here and we try to solve it.

Re: Can't force unlock (okm-002009)

PostPosted:Sat Apr 23, 2011 7:14 am
by Catscratch
okmadmin in ldap is working.

I didn't found a bug, it's feature request that every admin should got the same rights like the okmadmin.

Re: Can't force unlock (okm-002009)

PostPosted:Tue Apr 26, 2011 2:43 pm
by pavila
ok, I will add this as an future enhancement => http://issues.openkm.com/view.php?id=1627

Re: Can't force unlock (okm-002009)

PostPosted:Tue Jan 24, 2012 10:20 am
by Catscratch
I have to reopen this topic.

I'm logged in as "okmadmin" (ldap user) but get the following error on a locked document.
Image

Image

LoginLowerCase is on.

Re: Can't force unlock (okm-002009)

PostPosted:Tue Jan 24, 2012 11:31 am
by pavila
Yes, this fails when login lowercase is on.

Re: Can't force unlock (okm-002009)

PostPosted:Tue Jan 24, 2012 12:36 pm
by Catscratch
Ok, what is the solution? Seems like a bug!

Couldn't you fix it in the next release with something like String.ToLower().Equals(...) ?

Re: Can't force unlock (okm-002009)

PostPosted:Thu Jan 26, 2012 8:41 am
by pavila
The bug is registered in out issue tracking system, as you can see at http://issues.openkm.com/view.php?id=1627.

Patchs are welcome.

On the othser side, if you want a bug to be fixed ASAP become a customer.

Re: Can't force unlock (okm-002009)

PostPosted:Fri Jan 27, 2012 11:44 am
by Catscratch
I tried to upgrade to 5.1.9.

On startup I got a lot of hibernate 3.6 migration warnings.

And then:
Code: Select all
2012-01-27 12:36:31,770 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1054, SQLState: 42S22
2012-01-27 12:36:31,771 ERROR [org.hibernate.util.JDBCExceptionReporter] Unknown column 'profile0_.PRF_MSC_UPLD_NOTI_USR' in 'field list'
2012-01-27 12:36:31,772 ERROR [com.openkm.servlet.frontend.UserConfigServlet] could not load an entity: [com.openkm.dao.bean.Profile#1]
com.openkm.core.DatabaseException: could not load an entity: [com.openkm.dao.bean.Profile#1]
	at com.openkm.dao.UserConfigDAO.findByPk(UserConfigDAO.java:225)
	at com.openkm.module.direct.DirectUserConfigModule.getConfig(DirectUserConfigModule.java:75)
	at com.openkm.api.OKMUserConfig.getConfig(OKMUserConfig.java:61)
	at com.openkm.servlet.frontend.UserConfigServlet.getUserHome(UserConfigServlet.java:78)
	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: org.hibernate.exception.SQLGrammarException: could not load an entity: [com.openkm.dao.bean.Profile#1]
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
	at org.hibernate.loader.Loader.loadEntity(Loader.java:2041)
	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
	at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3293)
	at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
	at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
	at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
	at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
	at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
	at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
	at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1038)
	at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:630)
	at org.hibernate.type.EntityType.resolve(EntityType.java:438)
	at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
	at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
	at org.hibernate.loader.Loader.doQuery(Loader.java:857)
	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.UserConfigDAO.findByPk(UserConfigDAO.java:187)
	... 32 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'profile0_.PRF_MSC_UPLD_NOTI_USR' in 'field list'
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	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.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)
	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.loadEntity(Loader.java:2037)
	... 58 more
I used the migrationguide 5.1.8 to 5.1.9. But I seems that there are some other issues?

Re: Can't force unlock (okm-002009)

PostPosted:Sat Jan 28, 2012 9:19 am
by jllort
We've added some new colum, change OpenKM.cfg to update ( restart jboss, that should create new database column )

Re: Can't force unlock (okm-002009)

PostPosted:Fri Mar 16, 2012 1:37 pm
by Catscratch
Could you please help me to configure LDAP right?

Here is the complete problem description.
http://issues.openkm.com/view.php?id=1627

The answer there was: Ask in the forum.

Re: Can't force unlock (okm-002009)

PostPosted:Mon Mar 19, 2012 12:43 pm
by jllort
Please Catscratch, create another thread for a different question / problem.