OpenKM 6.4.14 DbSessionManager Problem
PostPosted:Mon Jan 12, 2015 6:50 am
Hello together,
(i am from Germany. Sorry for my english
)
We use OpenKM 6.4.14 with Java jdk 1.7.0 Update 71 and Windows 7 64Bit.
The installation from OpenKM 6.4.14 was very easy.
The start from tomcat was successfully.
I create a importer crontab.
When i am using the import then i get following error:

Some more information.
When I had install OpenKM 6.3.0 on another computer with the same conditions, the import is successfully...
André
(i am from Germany. Sorry for my english

We use OpenKM 6.4.14 with Java jdk 1.7.0 Update 71 and Windows 7 64Bit.
The installation from OpenKM 6.4.14 was very easy.
The start from tomcat was successfully.
I create a importer crontab.
When i am using the import then i get following error:
Code: Select all
My import.bsh file:
- Script error bsh.EvalError: Sourced file: inline evaluation of: ``import com.openkm.core.*; import com.openkm.api.*; import java.io.*; import c . . . '' : Typed variable declaration : Attempt to resolve method: getInstance() on undefined variable or class name: DbSessionManager : at Line: 6 : in file: inline evaluation of: ``import com.openkm.core.*; import com.openkm.api.*; import java.io.*; import c . . . '' : DbSessionManager .getInstance ( )
Code: Select all
Following text stand in the log (catalina.2015-01-12.log):import com.openkm.core.*;
import com.openkm.api.*;
import java.io.*;
import com.openkm.module.db.stuff.DbSessionManager;
String token = DbSessionManager.getInstance().getSystemToken();
OKMDocument document = OKMDocument.getInstance();
OKMFolder folder = OKMFolder.getInstance();
public void autoImport(String okmPath, File fldpath){
try {
print("Scanning " + fldpath.getName() + "<br>");
for (File file : fldpath.listFiles()) {
print("Importing " + file.getName() + "<br>");
try {
if (file.isDirectory()) {
try {
folder.createSimple(token, okmPath + file.getName());
} catch (ItemExistsException ie) {
print("folder already exists<br>");
// Folder already exists - just ignore exception
}
autoImport( okmPath + file.getName() + "/", file);
} else {
// Check if file is still being written to
long length = file.length();
Thread.sleep(1000);
if (file.length() > length) continue; // Skip file this time
document.createSimple(token, okmPath + file.getName(), new FileInputStream(file));
}
print("Created " + okmPath + file.getName() + "<br>");
} catch (Exception e) {
print ("Exception:" + e + "<br>");
// Something bad happened to prevent import. Skip to next file.
continue;
}
file.delete();
}
} catch (Exception e) {
print("Exception: " + e + "<br>");
}
}
autoImport("/okm:root/Scans/", new File("D:/OpenKM_Import"));
Code: Select all
What is wrong? Jan 12, 2015 6:58:40 AM com.openkm.util.LoggerWatchdog doOnChange
Information: *** Log4j configuration file changed ***
Jan 12, 2015 7:01:11 AM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom
Warnung: Supplied path does not exist. Unable to add plugins from there.
Jan 12, 2015 7:01:26 AM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom
Warnung: Supplied path does not exist. Unable to add plugins from there.
Jan 12, 2015 7:01:27 AM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom
Warnung: Supplied path does not exist. Unable to add plugins from there.
Jan 12, 2015 7:01:28 AM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom
Warnung: Supplied path does not exist. Unable to add plugins from there.
Jan 12, 2015 7:01:29 AM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom
Warnung: Supplied path does not exist. Unable to add plugins from there.
Jan 12, 2015 7:01:29 AM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom
Warnung: Supplied path does not exist. Unable to add plugins from there.
Jan 12, 2015 7:01:30 AM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom
Warnung: Supplied path does not exist. Unable to add plugins from there.

Some more information.
When I had install OpenKM 6.3.0 on another computer with the same conditions, the import is successfully...
André