• [4.0] Problem creating property group

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #3675  by olexandr
 
Hi!

I am trying to create a property group as it is described in this post http://www.openkm.com/Usage/1790-ReTrac ... .html#1790.

Here are my files:
Code: Select all
PropertyGroup.cnd
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>
[okg:status2] mixin
- okp:status2.tipo (string) = '' autocreated
- okp:status2.comentario (string) = '' autocreated

PropertyGroupValues.properties
okp\:status2.tipo=3,draft,peerreviewed,approved
okp\:status2.comentario=2

PropertyGroupBundle.properties
okg\:status2=Document Status2
okp\:status2.tipo=Document Status2
okp\:status2.tipo.draft=Draft
okp\:status2.tipo.peerreviewed=Peer reviewed
okp\:status2.tipo.approved=Approved
okp\:status2.comentario=Comments
Than I can register PropertyGroup.cnd without error. I can even add this property group to the file and after thath I have a popup dialog box with error:
OKM-009006(getMetaData): Internal repository error
For input string "draft"
And I can't choose values for the property

Here is the message from the server.log:
Code: Select all
2010-01-06 14:25:08,340 ERROR [es.git.openkm.backend.server.OKMPropertyGroupServletAdmin] For input string: "draft"
java.lang.NumberFormatException: For input string: "draft"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:481)
        at java.lang.Integer.parseInt(Integer.java:514)
        at es.git.openkm.module.direct.DirectPropertyGroupModule.parseMetadata(DirectPropertyGroupModule.java:388)
        at es.git.openkm.module.direct.DirectPropertyGroupModule.getMetaData(DirectPropertyGroupModule.java:326)
        at es.git.openkm.api.OKMPropertyGroup.getMetaData(OKMPropertyGroup.java:137)
        at es.git.openkm.backend.server.OKMPropertyGroupServletAdmin.getMetaData(OKMPropertyGroupServletAdmin.java:95)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
        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:432)
        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:636)
 #3686  by pavila
 
Try with this modification in PropertyGroupValues.properties:
Code: Select all
okp\:status2.tipo=1,3,draft,peerreviewed,approved
okp\:status2.comentario=2,2
 #3690  by olexandr
 
Hello!

Thank you for the reply - it did a half of the trick!
Now I can go to administrations - and I can see my property group and it's values (type and comment). I can also add the property to the document without error.

But when I switch to property tab - I see nothing, I press "Change" - but nothing happens - the same empty tab.

Regards,
 #3733  by olexandr
 
Yes, of course, I did restart - but it did not help.
I even reinstall OpenKM from scratch - but the same problem. I can see the content of property group in the administration - properties, but I see nothing when applying it to the document.
Attachments
openkm.JPG
openkm.JPG (24.03 KiB) Viewed 7405 times
 #3785  by jllort
 
We'll change faq.

Take a look at my_groups.cnd with OpenKM comes by default as example. Don't register in a production environment only for testing purpose. And compare with you properties files values. Remember for registering groups, you must restart jboss, properties files are only loaded in starting up jboss don't change on fly.
 #3790  by iceburn
 
I've found the problem. The order argument must start with 0. The correct definition for PropertyGroupValues.properties should be:
Code: Select all
okp\:status2.tipo=0,3,draft,peerreviewed,approved
okp\:status2.comentario=1,2
 #3795  by ticl
 
I couldn't find my_groups.cnd file in SCM or the binary archive of version 4.0. Could someone please post the necessary files to create property groups? :oops:
 #3801  by olexandr
 
Dear iceburn, you made my day :) Thank you everything works!

Dear jillort and ticl, there is no my_groups.cnd and no examples by default. There is a file PropertyGroup.cnd with the default content:
Code: Select all
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>
 #3815  by jllort
 
OK, we'll put there. Sorry for the inconvenience but we forget to put metadata example in OpenKM distribution.
 #3816  by olexandr
 
Dear jllort,

there is one more thing about these groups - a little misunderstanding in documentation:
OpenKM FAQ (http://www.openkm.com/FAQ.html) - Value types are defined as 1=list, 2=input, 3= select multiple, 4=Text area
And your message from the forum (http://www.openkm.com/Usage/1790-ReTrac ... .html#1809): 1- Input, 2- TextArea, 3- List, 4- List select multiple.

From my experience the correct version is the forum one. So I think there is an error in the FAQ.

Regards,
 #3820  by jllort
 
I'll revise it.

Tomorrow afternoon I'll starting with wiki documentation section, hope next week it'll be finished the basic.
 #3988  by pavila
 
Actually Property Groups creation is crappy. We have to improve it in the next OpenKM release. May be we can use an XML definition which is best to manage than a property file :(

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.