• CSV Import Error

  • Nous essayons de faire OpenKM aussi intuitif que possible, mais tout avis est bienvenu.
Nous essayons de faire OpenKM aussi intuitif que possible, mais tout avis est bienvenu.

Moderator: dedisoft

Forum rules: Avant de poser une question, merci de regarder la documentation du wiki ou d'utiliser la fonction recherche du forum. Et rappelez vous que nous n'avons ni boule de cristal ni possibilité de lire dans les pensées, aussi pensez à spécifier quelle version d'OpenKM vous utilisez ainsi que la version du navigateur web et du système d'exploitation. Pour de plus amples informations lisez Comment reporter un bug efficacement (anglais).
 #45647  by gerardo
 
Hi,
I'm trying to run a script to import metadata from an excel csv file. Unfortunately it does not work. OpenKM is installed on a Ubuntu Server edition.

Script Error:

bsh.EvalError: Sourced file: inline evaluation of: ``import java.io.FileReader; import java.io.Reader; import java.util.Iterator; . . . '' : Error in method invocation: Method getDocument() not found in class'com.openkm.bean.QueryResult' : at Line: 58 : in file: inline evaluation of: ``import java.io.FileReader; import java.io.Reader; import java.util.Iterator; . . . '' : queryResult .getDocument ( )

Script Output:
1>>>> /okm:root/doc2.txt

Some suggestions, where am I wrong?

Thanks for helping
 #45653  by jllort
 
The error is clear the method getDocument does not exist into the class QueryResult ( if you take a look at the queryResult class https://github.com/openkm/document-mana ... esult.java should use getNode() method ).
Code: Select all
You should do something like
if (queryResult.getNode() instanceof Document) {
  Document doc = (Document) queryResult.getNode()
}
Seems the code you have applied it corresponds to previous OpenKM version. Can you tell us from where did you copy it?

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.