• OpenKM 5.0-Beta scanner problem

  • He we will discuss about how to make customization and improvement to the OpenKM source code.
He we will discuss about how to make customization and improvement to the OpenKM source code.
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.
 #6773  by mateusz
 
Hi,

I'm trying to deploy scanner project which I build myself, but in the end I have problem. In compilation process everything is all right (except pom.xml warning about java-plugin.jar) but when I deploy this project and run scanner (by clicking icon in GUI) and open java console I have this error:
Code: Select all
Java Plug-in 1.6.0_20
Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
User home directory = C:\Users\Mateusz
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


Exception in thread "thread applet-com.openkm.applet.Scanner-1" java.lang.NoClassDefFoundError: org/apache/http/entity/mime/content/ContentBody
    at com.openkm.applet.Scanner.init(Scanner.java:63)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.http.entity.mime.content.ContentBody
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 3 more
Caused by: java.io.IOException: open HTTP connection failed:http://.../OpenKM/com.openkm.frontend.Main/org/apache/http/entity/mime/content/ContentBody.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 6 more
 #6779  by jllort
 
Missing inlcuding some libraries while compilation jar ? Take a look in original jar for included libraries.
 #6797  by mateusz
 
Hi,

I checked jar files and comparison is like this:

My jar file missing:
- /META-INF/OKM.DSA
- /META-INF/OKM.SF
- all /ws folder

I also checked pom.xml and in version 4.1 is dependency

<dependency>
<groupId>com.openkm</groupId>
<artifactId>ws-client</artifactId>
<version>2.1</version>
</dependency>

but in 5.0 this is missing.

Thanks a lot.

Mateusz
 #6811  by glennm
 
Has anybody got a solution to this?

I've got the same problem:
Code: Select all
Exception in thread "thread applet-com.openkm.applet.Scanner-1" java.lang.NoClassDefFoundError: org/apache/http/entity/mime/content/ContentBody
    at com.openkm.applet.Scanner.init(Scanner.java:63)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1579)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.apache.http.entity.mime.content.ContentBody
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:219)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 3 more
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/OpenKM/com.openkm.frontend.Main/org/apache/http/entity/mime/content/ContentBody.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Applet2ClassLoader.java:537)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Applet2ClassLoader.java:51)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Applet2ClassLoader.java:192)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:189)
    ... 5 more
And the compile of the scanner was successful - no errors / warnings!!!
--> mvn clean install
--> produced 2 jars - scanner-jar-with-dependencies.jar and scanner.jar
--> I then copied both of these to src/openkm/main/webapps
--> compiled this (again with mvn clean install) - (successful - only some gwt depreciated warnings)
--> copied reultant OpenKM.war to jboss-4.2.3.GA/server/default/deploy
--> OpenKM starts fine, when clicking on the scanner button the console gives the above error
(which is weird because scanner-jar-with-dependencies.jar contains the org/apache/http/entity/mime/content/ContentBody.class !!!)

What am I doing wrong - I must have recompiled / ran this thing etc 100+ times!! V.E.R.Y. frustrating (which is worsened by the COMPLETE LACK OF DOCUMENTATION regarding the scanner applet - even though this is proudly mentioned in the feature list!! The scanner applet is even broken on the demo page (http://demo.openkm.com/OpenKM (which has been 503 unavailable for the whole day now)), reporting a scanner class not found error.

Regards
Glenn
 #6823  by jllort
 
Try replacing scanner-jar-with-dependencies.jar file name to scanner.jar and only copy this to OpenKM folder.

Tell me if it solves the problem ? because on UI I'm sure we call scanner.jar file.

In developer guide we don't explain anything about scanner and uploader modules, until today nobody has been interested on them.
 #6876  by lis
 
I still have this some problem
Code: Select all
Exception in thread "thread applet-com.openkm.applet.Scanner-1" java.lang.NoClassDefFoundError: org/apache/http/entity/mime/content/ContentBody
	at com.openkm.applet.Scanner.init(Scanner.java:63)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.http.entity.mime.content.ContentBody
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 3 more
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/OpenKM/com.openkm.frontend.Main/org/apache/http/entity/mime/content/ContentBody.class
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 8 more
 #6877  by mateusz
 
OK, but how can I get this jar file? My compiled jar still doesn't work. Maybe I use other tools then you. Maybe you can provide some how to?
 #6883  by pavila
 
You can compile the Scanner applet just with:
Code: Select all
$ mvn clean package
But you also need to sign the jar. Check for jarsigner man pages for more info (or Google).

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.