• Property Group Migration from 5.1 to 6.2.2

  • 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.
 #20755  by camenni
 
Hello there,

I've been trying to migrate our 5.1 openkm system to the newer 6.2.2. Everything work except for displaying the property groups on the files that have been imported. This is the property group we have (i've cheched with the dtd and everything seems to be correct)
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.1//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.1.dtd">
 <property-groups>
  <property-group label="Aankoop" name="okg:aankoop">
    <select label="Bestandstype" name="okp:aankoop.filetype" type="simple">
      <option label="datalijst" value="datalijst"/>
      <option label="order" value="order" />
	  <option label="orderform" value="orderform" />
      <option label="prijslijst" value="prijslijst" />
    </select>
	<select label="Ordertype" name="okp:aankoop.ordertype" type="simple">
		<option label="voorseizoen" value="voorseizoen"/>
		<option label="bijbestelling" value="bijbestelling"/>
	</select>
	<input label="Ordernummer" type="text" name="okp:aankoop.ordernummer" />
    <select label="Seizoen" name="okp:aankoop.season" type="simple">
	  <option label="2011-12 Winter" value="2011-12_winter"/>
      <option label="2012 Zomer" value="2012_zomer"/>
	  <option label="2012-13 Winter" value="2012-13_winter"/>
	  <option label="2013 Zomer" value="2013_zomer"/>
	  <option label="2013-14 Winter" value="2013-14_winter"/>
	  <option label="2014 Zomer" value="2014_zomer"/>
	  <option label="2014-15 Winter" value="2014-15_winter"/>
	  <option label="2015 Zomer" value="2015_zomer"/>
    </select>
	<select label="Afdeling" name="okp:aankoop.afdeling" type="multiple">
		<option label="Badgoed" value="badgoed"/>
		<option label="Bike" value="bike"/>
		<option label="Fashion" value="fashion"/>
		<option label="Fitness" value="fitness"/>
		<option label="Jeans" value="jeans"/>
		<option label="Ondergoed" value="ondergoed"/>
		<option label="Opdruk" value="opdruk"/>
		<option label="Outdoor" value="outdoor"/>
		<option label="Racketsporten" value="racketsporten"/>
		<option label="Running" value="running"/>
		<option label="Ski" value="ski"/>
		<option label="Snowboard" value="snowboard"/>
		<option label="Surf" value="surf"/>
		<option label="Voetbal" value="voetbal"/>
	</select>
	<select label="Categorie" name="okp:aankoop.categorie" type="multiple">
		<option label="Accessoires" value="accessoires"/>
		<option label="Hardware" value="hardware"/>
		<option label="Schoenen" value="schoenen"/>
		<option label="Textiel" value="textiel"/>
	</select>
	<select label="Doelgroep" name="okp:aankoop.doelgroep" type="multiple">
		<option label="Dames" value="dames"/>
		<option label="Heren" value="heren"/>
		<option label="Jongens" value="jongens"/>
		<option label="Meisjes" value="meisjes"/>
		<option label="Unisex" value="unisex"/>
		<option label="Unisex junior" value="unisex_junior"/>
	</select>
	<select label="Status" name="okp:aankoop.status" type="simple">
		<option label="In onderhandeling" value="in_onderhandeling"/>
		<option label="Definitief" value="definitief"/>
	</select>
    <textarea label="Opmerkingen" name="okp:aankoop.opmerkingen"/>
  </property-group>
  <property-group label="Data" name="okg:data">
  <select label="Status" name="okp:data.status" type="simple">
	<option label="Data in" value="data_in"/>
	<option label="Work in progress" value="work_in_progress"/>
	<option label="Data naar Gemshop" value="data_naar_gemshop"/>
  </select>
  </property-group>
</property-groups>


The error message OpenKM gives when we try to open a file

OKM-009006(getMetaData): Application interal error

Failed parsing JSON source: java.io.StringReader@35cbe8 to Json

The tomcat code :
Code: Select all
2013-01-15 16:45:00,405 [Thread-819] WARN  com.openkm.extractor.TextExtractorWor
ker - Error while indexing in Hibernate Search (before transaction completion)
com.openkm.core.DatabaseException: Error while indexing in Hibernate Search (bef
ore transaction completion)
        at com.openkm.dao.NodeDocumentDAO.textExtractorHelper(NodeDocumentDAO.ja
va:1265)
        at com.openkm.extractor.TextExtractorWorker.processSerial(TextExtractorW
orker.java:138)
        at com.openkm.extractor.TextExtractorWorker.processQueue(TextExtractorWo
rker.java:125)
        at com.openkm.extractor.TextExtractorWorker.run(TextExtractorWorker.java
:80)
        at sun.reflect.GeneratedMethodAccessor3149.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at bsh.Reflect.invokeOnMethod(Unknown Source)
        at bsh.Reflect.invokeObjectMethod(Unknown Source)
        at bsh.BSHPrimarySuffix.doName(Unknown Source)
        at bsh.BSHPrimarySuffix.doSuffix(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at com.openkm.util.ExecutionUtils.runScript(ExecutionUtils.java:112)
        at com.openkm.core.Cron$RunnerBsh.run(Cron.java:103)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.HibernateException: Error while indexing in Hibernate S
earch (before transaction completion)
        at org.hibernate.search.backend.impl.EventSourceTransactionContext$Deleg
ateToSynchronizationOnBeforeTx.doBeforeTransactionCompletion(EventSourceTransact
ionContext.java:175)
        at org.hibernate.engine.ActionQueue$BeforeTransactionCompletionProcessQu
eue.beforeTransactionCompletion(ActionQueue.java:554)
        at org.hibernate.engine.ActionQueue.beforeTransactionCompletion(ActionQu
eue.java:216)
        at org.hibernate.impl.SessionImpl.beforeTransactionCompletion(SessionImp
l.java:571)
        at org.hibernate.jdbc.JDBCContext.beforeTransactionCompletion(JDBCContex
t.java:250)
        at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:138)
        at com.openkm.dao.HibernateUtil.commit(HibernateUtil.java:317)
        at com.openkm.dao.NodeDocumentDAO.textExtractorHelper(NodeDocumentDAO.ja
va:1261)
        ... 18 more
Caused by: org.hibernate.search.bridge.BridgeException: Exception while calling
bridge#set
        class: com.openkm.dao.bean.NodeDocument
        path: properties
        field bridge: properties
        at org.hibernate.search.bridge.util.ContextualExceptionBridge.buildBridg
eException(ContextualExceptionBridge.java:78)
        at org.hibernate.search.bridge.util.ContextualExceptionBridge.set(Contex
tualExceptionBridge.java:86)
        at org.hibernate.search.engine.DocumentBuilderIndexedEntity.buildDocumen
tFields(DocumentBuilderIndexedEntity.java:481)
        at org.hibernate.search.engine.DocumentBuilderIndexedEntity.getDocument(
DocumentBuilderIndexedEntity.java:443)
        at org.hibernate.search.engine.DocumentBuilderIndexedEntity.createAddWor
k(DocumentBuilderIndexedEntity.java:380)
        at org.hibernate.search.engine.DocumentBuilderIndexedEntity.addWorkToQue
ue(DocumentBuilderIndexedEntity.java:358)
        at org.hibernate.search.engine.WorkPlan$PerEntityWork.enqueueLuceneWork(
WorkPlan.java:456)
        at org.hibernate.search.engine.WorkPlan$PerClassWork.enqueueLuceneWork(W
orkPlan.java:257)
        at org.hibernate.search.engine.WorkPlan.getPlannedLuceneWork(WorkPlan.ja
va:150)
        at org.hibernate.search.backend.WorkQueue.prepareWorkPlan(WorkQueue.java
:134)
        at org.hibernate.search.backend.impl.BatchedQueueingProcessor.prepareWor
ks(BatchedQueueingProcessor.java:124)
        at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchroniza
tion.beforeCompletion(PostTransactionWorkQueueSynchronization.java:89)
        at org.hibernate.search.backend.impl.EventSourceTransactionContext$Deleg
ateToSynchronizationOnBeforeTx.doBeforeTransactionCompletion(EventSourceTransact
ionContext.java:172)
        ... 25 more
Caused by: com.google.gson.JsonParseException: Failed parsing JSON source: java.
io.StringReader@18489c3 to Json
        at com.google.gson.JsonParser.parse(JsonParser.java:59)
        at com.google.gson.Gson.fromJson(Gson.java:443)
        at com.google.gson.Gson.fromJson(Gson.java:396)
        at com.google.gson.Gson.fromJson(Gson.java:372)
        at com.openkm.module.db.stuff.SetPropertiesFieldBridge.set(SetProperties
FieldBridge.java:72)
        at org.hibernate.search.bridge.util.ContextualExceptionBridge.set(Contex
tualExceptionBridge.java:83)
        ... 36 more
Caused by: com.google.gson.ParseException: Encountered " <IDENTIFIER_SANS_EXPONE
NT> "definitief "" at line 1, column 1.
Was expecting one of:
    <EOF>
    <DIGITS> ...
    "null" ...
    "NaN" ...
    "Infinity" ...
    <BOOLEAN> ...
    <SINGLE_QUOTE_LITERAL> ...
    <DOUBLE_QUOTE_LITERAL> ...
    ")]}\'\n" ...
    "{" ...
    "[" ...
    "-" ...

        at com.google.gson.JsonParserJavacc.generateParseException(JsonParserJav
acc.java:705)
        at com.google.gson.JsonParserJavacc.jj_consume_token(JsonParserJavacc.ja
va:587)
        at com.google.gson.JsonParserJavacc.parse(JsonParserJavacc.java:62)
        at com.google.gson.JsonParser.parse(JsonParser.java:54)
        ... 41 more
Hope this is clear enough. Thanks in advance and hop to hear from you guys soon.
Thanks for a great product!
 #20793  by jllort
 
I suppose this problem only happens in document which have metadata no ?

Make a initial revision I can identify the problem if with Select values:
Code: Select all
String[] propValues = gson.fromJson(propValue, String[].class);
Now we should discover the reason in deep, go to administration -> database query and execute:
Code: Select all
SELECT * FROM OKM_NODE_PROPERTY = "UUID"; // where UUID is the document UUID which have problems ( You can get it from tab properties view )
And let see the select values.
 #20803  by camenni
 
Thank you very much for the reply.
The problem occurs, like you said, only on files that have metadata.
I'll try what you asked today en will post a reply.

Although i do not quite understand what you mean with
Make a initial revision I can identify the problem if with Select values:
Code: Select all
String[] propValues = gson.fromJson(propValue, String[].class);
Is this something i have to do?
Thanks in advance!
 #20805  by camenni
 
I just ran the query you asked me to run.
Code: Select all
SELECT * FROM OKM_NODE_PROPERTY WHERE NPG_NODE = '556ddcc5-b8eb-48e6-bd3f-b54c729db708'
Time: 00:00:00.001

NPG_ID	NPG_GROUP	NPG_NAME	NPG_VALUE	NPG_NODE
587	okg:aankoop	okp:aankoop.afdeling	[]	556ddcc5-b8eb-48e6-bd3f-b54c729db708
581	okg:aankoop	okp:aankoop.categorie	[]	556ddcc5-b8eb-48e6-bd3f-b54c729db708
582	okg:aankoop	okp:aankoop.doelgroep	[]	556ddcc5-b8eb-48e6-bd3f-b54c729db708
585	okg:aankoop	okp:aankoop.filetype	order	556ddcc5-b8eb-48e6-bd3f-b54c729db708
586	okg:aankoop	okp:aankoop.opmerkingen		556ddcc5-b8eb-48e6-bd3f-b54c729db708
589	okg:aankoop	okp:aankoop.ordernummer		556ddcc5-b8eb-48e6-bd3f-b54c729db708
588	okg:aankoop	okp:aankoop.ordertype	voorseizoen	556ddcc5-b8eb-48e6-bd3f-b54c729db708
584	okg:aankoop	okp:aankoop.season	2012-13_winter	556ddcc5-b8eb-48e6-bd3f-b54c729db708
583	okg:aankoop	okp:aankoop.status	definitief	556ddcc5-b8eb-48e6-bd3f-b54c729db708
One of the files with the error has this UUID = 556ddcc5-b8eb-48e6-bd3f-b54c729db708
I searched for the NPG_NODE with value of the files UUID. Is this correct?

If i add a new file and add a property group everything works fine, the problem only occurs for files that were imported from the previous file system.

Thanks in advance! Hope this helps something!
 #20806  by camenni
 
Hello there again,

I tested a few values for the okp:aankoop.filetype NPG_NAME. Could it be that filetype is a reserved word? Or something like that?
In the logs of tomcat, the error always indicates the value for okp:aankoop.filetype. I tried every possible value options and always got the same error, so I guess that is the only solution?

But why can i add a new document with the same values and not get this error?

Thanks in advance! I hope this information helps a little bit more.
 #20969  by jllort
 
Try with:
Code: Select all
UPDATE OKM_NODE_PROPERTY SET NPG_VALUE='[order]' where NPG_NODE = '556ddcc5-b8eb-48e6-bd3f-b54c729db708'
Depending your database could be some little difference
Code: Select all
UPDATE OKM_NODE_PROPERTY SET NPG_VALUE='["order"]' where NPG_NODE = '556ddcc5-b8eb-48e6-bd3f-b54c729db708'
If it goes right you can do some select to create list of updates using concat mysql function.
 #20974  by camenni
 
It worked!
I had to change the value from stringValue to ["stringValue"]
I just changed every file with a concat function like you said and everything works like a charm now.
Thank you very much for your help!

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.