Page 1 of 1

[4.0] Problem creating property group

PostPosted:Wed Jan 06, 2010 12:51 pm
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)

Re: [4.0] Problem creating property group

PostPosted:Thu Jan 07, 2010 11:38 am
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

Re: [4.0] Problem creating property group

PostPosted:Thu Jan 07, 2010 1:03 pm
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,

Re: [4.0] Problem creating property group

PostPosted:Mon Jan 11, 2010 6:59 pm
by pavila
Have you restarted JBoss after the changes?

Re: [4.0] Problem creating property group

PostPosted:Tue Jan 12, 2010 7:24 am
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.

Re: [4.0] Problem creating property group

PostPosted:Fri Jan 15, 2010 5:47 pm
by iceburn
Same problem here.

By the way... the FAQ is outdated. The PropertyGroupValues.properties example has only one numeric argument.

Re: [4.0] Problem creating property group

PostPosted:Sat Jan 16, 2010 9:37 am
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.

Re: [4.0] Problem creating property group

PostPosted:Sat Jan 16, 2010 2:06 pm
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

Re: [4.0] Problem creating property group

PostPosted:Sun Jan 17, 2010 11:23 am
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:

Re: [4.0] Problem creating property group

PostPosted:Mon Jan 18, 2010 7:00 am
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'>

Re: [4.0] Problem creating property group

PostPosted:Wed Jan 20, 2010 8:52 am
by jllort
OK, we'll put there. Sorry for the inconvenience but we forget to put metadata example in OpenKM distribution.

Re: [4.0] Problem creating property group

PostPosted:Wed Jan 20, 2010 8:59 am
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,

Re: [4.0] Problem creating property group

PostPosted:Wed Jan 20, 2010 1:00 pm
by jllort
I'll revise it.

Tomorrow afternoon I'll starting with wiki documentation section, hope next week it'll be finished the basic.

Re: [4.0] Problem creating property group

PostPosted:Tue Feb 02, 2010 7:10 pm
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 :(