Page 1 of 1

Simple Importer, not so simple...

PostPosted:Tue May 27, 2014 2:21 pm
by Frogman27
I've been trying to get the simple importer running on an OSX Server 10.9 for over a week. At first the issue was ImageMagick. I believe that is resolved, but still can't get preview working, so maybe not. The simple importer doesn't work at all. When I try to run the ScanImporter.sh in a terminal window I get a huge list of command instruction for ImageMagick, and then the following error...

By default, 'file' is written in the MIFF image format. To
specify a particular image format, precede the filename with an image
format name and a colon (i.e. ps:image) or specify the image type as
the filename suffix (i.e. image.ps). Specify 'file' as '-' for
standard input or output.
Code: Select all
import: delegate library support not built-in `' (X11) @ error/import.c/ImportImageCommand/1303.
./ScanImporter.bsh: line 6: syntax error near unexpected token `('
./ScanImporter.bsh: line 6: `String token = DbSessionManager.getInstance().getSystemToken();'
Anyone have an idea? I've searched and found the same error talked about, but so far haven't found a solution. Anyone run into this and fixed it?

Re: Simple Importer, not so simple...

PostPosted:Wed May 28, 2014 8:07 pm
by jllort
About scanImporter.bsh can you give me the url where you've got the the bsh script ?
What OpenKM version do you got installed ?

Re: Simple Importer, not so simple...

PostPosted:Wed May 28, 2014 9:15 pm
by Frogman27
http://wiki.openkm.com/index.php/Cronta ... e_importer

Got it from here. The only thing I've changed are the file paths.

This is a recent install. The version is whatever was newest about 30 days ago.

Re: Simple Importer, not so simple...

PostPosted:Fri May 30, 2014 7:23 am
by jllort
got to Administration -> Sctipting and execute:
Code: Select all
import com.openkm.core.*;
import com.openkm.api.*;
import java.io.*;
import com.openkm.module.db.stuff.DbSessionManager;
 
String token = DbSessionManager.getInstance().getSystemToken();
print(token);

Re: Simple Importer, not so simple...

PostPosted:Mon Jun 02, 2014 12:06 pm
by Frogman27
I ran it. The script output was

9b88498f-e4bc-4354-bbc3-a22fccdf0810

Re: Simple Importer, not so simple...

PostPosted:Wed Jun 04, 2014 5:42 pm
by jllort
That means this part of the code is going right. Try to add other parts until you get the error, seems is not what I suspected. Add few lines and test again to validate during increasing.