Page 1 of 1

How to extend OpenKM CLASSPATH? (java.lang.NoSuchMethodErro)

PostPosted:Thu Mar 04, 2010 2:38 pm
by crusader
Hi to all!

When server start (run.sh) i get message in console:
Code: Select all
java.lang.NoSuchMethodError: org.apache.poi.poifs.filesystem.POIFSFileSystem.getRoot()Lorg/apache/poi/poifs/filesystem/DirectoryEntry;
        at org.textmining.text.extraction.WordExtractor.extractText(WordExtractor.java:51)
        at org.apache.jackrabbit.extractor.MsWordTextExtractor.extractText(MsWordTextExtractor.java:67)
        at org.apache.jackrabbit.extractor.CompositeTextExtractor.extractText(CompositeTextExtractor.java:90)
        at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.extractText(JackrabbitTextExtractor.java:195)
... and etc ...
May be i must put path to POI jar anywhere? When i put POI jar (version 3.6) in JBOSS_CLASSPATH i get same message :( .

What i must do to solve this problem?

Re: How to extend OpenKM CLASSPATH? (java.lang.NoSuchMethodE

PostPosted:Fri Mar 05, 2010 4:14 pm
by jllort
Which version please 4.0 or 5.0 ?

Re: How to extend OpenKM CLASSPATH? (java.lang.NoSuchMethodE

PostPosted:Fri Mar 05, 2010 5:45 pm
by pavila
This is the JBoss + OpenKM bundle downloaded from SourceForge? The error means there is a missing java library.

Re: How to extend OpenKM CLASSPATH? (java.lang.NoSuchMethodE

PostPosted:Sat Mar 06, 2010 3:39 pm
by crusader
Hi to all!

This is info from JBOSS server when OpenKM 4.0 start:
Code: Select all
[root@serena /dps/OpenKM/OpenKM-4.0-JBoss-4.2.3.GA/jboss-4.2.3.GA]# ./run.sh
./run.sh: line 6: soffice: command not found
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /dps/OpenKM/OpenKM-4.0-JBoss-4.2.3.GA/jboss-4.2.3.GA

  JAVA: /usr/lib/jvm/sun-jdk-1.6//bin/java

  JAVA_OPTS: -Dprogram.name=run.sh -server -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true

  CLASSPATH: /dps/OpenKM/OpenKM-4.0-JBoss-4.2.3.GA/jboss-4.2.3.GA/bin/run.jar:/usr/lib/jvm/sun-jdk-1.6//lib/tools.jar

=========================================================================
OpenKM 4.0 was download from link in main page on http://www.openkm.com site.

In ./bin/run.sh i put in first functional line path to SUN JDK 1.6:
Code: Select all
JAVA_HOME="/usr/lib/jvm/sun-jdk-1.6/"
In the end of ./run.sh, but before JBOSS server run command (
Code: Select all
while true; do
if [ "x$LAUNCH_JBOSS_IN_BACKGROUND" = "x" ]; then
) i add to JBOSS_CLASSPATH path to POI 3.6 jar file (was download from http://poi.apache.org/download.html):
Code: Select all
CLASSPATH=$CLASSPATH:<my path to poi-3.6-20091214.jar>
That's all, folks! :)
Whith (or whithout) this OpenKM start configuration i get exception from my first post in current topic... :(

Re: How to extend OpenKM CLASSPATH? (java.lang.NoSuchMethodE

PostPosted:Sat Mar 06, 2010 5:33 pm
by jllort
Two suggestions

Change your folder OpenKM destination, I don't know why you've tried this long path, I suggest move to this
Code: Select all
/dps/jboss-4.2.3.GA]
Include the poi-3.6-20091214.jar file into server/default/lib

I can not understand why OpenKM don't find this class at starting up server ... seems strange. Could you have installed in other place and older or newer POI class and is pressent in your system classpath ? could you take a look at OpenKM.war file into /WEB-INF/lib to see if there's some POI jar. Because really the error not says the POI class is not present it says the method in POI class not exist. Do you have in this server other application deployed, could be some collision with classes if it's the case you must make some isolation.