[4.0] Problem creating property group

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.
Post Reply
olexandr
Junior Boarder
Junior Boarder
Posts: 27
Joined: Wed Jan 06, 2010 12:37 pm

[4.0] Problem creating property group

Post by olexandr » Wed Jan 06, 2010 12:51 pm

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)

pavila
Moderator
Moderator
Posts: 3072
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: [4.0] Problem creating property group

Post by pavila » Thu Jan 07, 2010 11:38 am

Try with this modification in PropertyGroupValues.properties:

Code: Select all

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

olexandr
Junior Boarder
Junior Boarder
Posts: 27
Joined: Wed Jan 06, 2010 12:37 pm

Re: [4.0] Problem creating property group

Post by olexandr » Thu Jan 07, 2010 1:03 pm

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,

pavila
Moderator
Moderator
Posts: 3072
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: [4.0] Problem creating property group

Post by pavila » Mon Jan 11, 2010 6:59 pm

Have you restarted JBoss after the changes?

olexandr
Junior Boarder
Junior Boarder
Posts: 27
Joined: Wed Jan 06, 2010 12:37 pm

Re: [4.0] Problem creating property group

Post by olexandr » Tue Jan 12, 2010 7:24 am

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 4180 times

iceburn
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Fri Jan 15, 2010 5:45 pm

Re: [4.0] Problem creating property group

Post by iceburn » Fri Jan 15, 2010 5:47 pm

Same problem here.

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

jllort
Moderator
Moderator
Posts: 10834
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: [4.0] Problem creating property group

Post by jllort » Sat Jan 16, 2010 9:37 am

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.

iceburn
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Fri Jan 15, 2010 5:45 pm

Re: [4.0] Problem creating property group

Post by iceburn » Sat Jan 16, 2010 2:06 pm

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

ticl
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Wed Jan 06, 2010 1:39 pm

Re: [4.0] Problem creating property group

Post by ticl » Sun Jan 17, 2010 11:23 am

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:

olexandr
Junior Boarder
Junior Boarder
Posts: 27
Joined: Wed Jan 06, 2010 12:37 pm

Re: [4.0] Problem creating property group

Post by olexandr » Mon Jan 18, 2010 7:00 am

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'>

jllort
Moderator
Moderator
Posts: 10834
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: [4.0] Problem creating property group

Post by jllort » Wed Jan 20, 2010 8:52 am

OK, we'll put there. Sorry for the inconvenience but we forget to put metadata example in OpenKM distribution.

olexandr
Junior Boarder
Junior Boarder
Posts: 27
Joined: Wed Jan 06, 2010 12:37 pm

Re: [4.0] Problem creating property group

Post by olexandr » Wed Jan 20, 2010 8:59 am

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,

jllort
Moderator
Moderator
Posts: 10834
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: [4.0] Problem creating property group

Post by jllort » Wed Jan 20, 2010 1:00 pm

I'll revise it.

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

pavila
Moderator
Moderator
Posts: 3072
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: [4.0] Problem creating property group

Post by pavila » Tue Feb 02, 2010 7:10 pm

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 :(

Post Reply