[Dspace-tech] javax.swing.text.html.HTMLEditorKit Missing when Running filter-media

6 vistas
Ir al primer mensaje no leído

penni...@rhodes.edu

no leída,
24 ago 2015, 4:13:04 p.m.24/8/15
para dspac...@lists.sourceforge.net

I've been evaluating DSpace 1.4 and am impressed in how far it has come
since I first looked at it in 2003. I have been able to get it
successfully compiled and installed and running under Tomcat.

However, I am running into a problem getting thumbnails to generate
using filter-media. When I run filter-media, I get an error that appears
to say that the javax.swing.text.html.HTMLEditorKit class is missing
(error message below). We are running the Java 1.5.0.06 JDK. Is it
possible that this Swing class is not included?

We are using ant 1.6.5, so that should be OK. DSpace builds and runs in
Tomcat correctly; the problem is just with filter-media. Any ideas?
Should I try a newer/different J2EE engine?

Thanks in advance for any help...

[bin]$ /dspace/bin/filter-media
Applying Media Filters
Warning: -Xmx256m not understood. Ignoring.
Exception in thread "main" java.lang.NoClassDefFoundError: while
resolving class: org.dspace.app.mediafilter.HTMLFilter
at java.lang.VMClassLoader.resolveClass(java.lang.Class)
(/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String, boolean,
java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String)
(/usr/lib/libgcj.so.5.0.0)
at org.dspace.core.PluginManager.getAnonymousPlugin(java.lang.String)
(Unknown Source)
at org.dspace.core.PluginManager.getPluginSequence(java.lang.Class)
(Unknown Source)
at
org.dspace.app.mediafilter.MediaFilterManager.main(java.lang.String[])
(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
javax.swing.text.html.HTMLEditorKit not found in
[file:/dspace/lib/activation.jar, file:/dspace/lib/commons-cli.jar,
file:/dspace/lib/commons-codec-1.3.jar,
file:/dspace/lib/commons-collections.jar,
file:/dspace/lib/commons-dbcp.jar,
file:/dspace/lib/commons-fileupload.jar,
file:/dspace/lib/commons-pool.jar, file:/dspace/lib/dspace.jar,
file:/dspace/lib/handle.jar, file:/dspace/lib/jakarta-poi.jar,
file:/dspace/lib/jargon.jar, file:/dspace/lib/jaxen-1.1-beta-7.jar,
file:/dspace/lib/jdom.jar, file:/dspace/lib/jena.jar,
file:/dspace/lib/jstl.jar, file:/dspace/lib/log4j.jar,
file:/dspace/lib/lucene.jar, file:/dspace/lib/lucene-sandbox.jar,
file:/dspace/lib/mail.jar, file:/dspace/lib/mets.jar,
file:/dspace/lib/oaicat.jar, file:/dspace/lib/oro.jar,
file:/dspace/lib/PDFBox.jar,
file:/dspace/lib/postgresql-8.1-407.jdbc3.jar,
file:/dspace/lib/rome.jar, file:/dspace/lib/servlet.jar,
file:/dspace/lib/standard.jar, file:/dspace/lib/tm-extractors.jar,
file:/dspace/lib/xalan.jar, file:/dspace/lib/xercesImpl.jar,
file:/dspace/lib/xml-apis.jar, file:/dspace/config/,
file:/usr/share/java/libgcj-3.4.5.jar, file:./, core:/]
at java.net.URLClassLoader.findClass(java.lang.String)
(/usr/lib/libgcj.so.5.0.0)
at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String)
(/usr/lib/libgcj.so.5.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean)
(/usr/lib/libgcj.so.5.0.0)
at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader)
(/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String, boolean,
java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at _Jv_BytecodeVerifier.verify_instructions_0()
(/usr/lib/libgcj.so.5.0.0)
at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.5.0.0)
at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at _Jv_WaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
at java.lang.VMClassLoader.linkClass0(java.lang.Class)
(/usr/lib/libgcj.so.5.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Class)
(/usr/lib/libgcj.so.5.0.0)
...6 more


--
Stacy Pennington
Information Technology Services
Rhodes College

Richard Jones

no leída,
24 ago 2015, 4:13:06 p.m.24/8/15
para penni...@rhodes.edu,dspac...@lists.sourceforge.net
Hi Stacy,

> However, I am running into a problem getting thumbnails to generate
> using filter-media. When I run filter-media, I get an error that appears
> to say that the javax.swing.text.html.HTMLEditorKit class is missing
> (error message below). We are running the Java 1.5.0.06 JDK. Is it
> possible that this Swing class is not included?

The last time I saw this problem it was because despite having the Sun
JDK installed, my system was still using the Gnu Java implementation
that comes with some distributions. I believe the clue is here ....

> [bin]$ /dspace/bin/filter-media
> Applying Media Filters
> Warning: -Xmx256m not understood. Ignoring.
> Exception in thread "main" java.lang.NoClassDefFoundError: while
> resolving class: org.dspace.app.mediafilter.HTMLFilter
> at java.lang.VMClassLoader.resolveClass(java.lang.Class)
> (/usr/lib/libgcj.so.5.0.0)
^^^^^^^^^^^^^^

Check that your user profile is pointing to the right path for the Sun
JDK, as the Gnu implementation doesn't have replacements for the swing
libraries.

Cheers,

--
Richard
-------
Richard Jones
Web and Database Technology Specialist
Imperial College London
t: +44 (0)20 759 48614 / +44 (0)20 759 41815
e: richard...@imperial.ac.uk

penni...@rhodes.edu

no leída,
24 ago 2015, 4:13:27 p.m.24/8/15
para dspac...@lists.sourceforge.net

Richard, thanks a bunch for pointing me in the correct direction. Yes,
indeed, I'm running Redhat EL 4, and my /usr/bin/java symbolic links was
not pointing to the correct java app. (RHEL4 puts these java symbolic
links in the /etc/alternatives directory, and you can change them there
to point to your real java home directories and binaries.)

Now, however, I'm getting a different error when I run filter-media

[bin]$ /dspace/bin/filter-media
Applying Media Filters
Exception in thread "main" org.dspace.core.PluginInstantiationException:
Cannot load plugin class: java.lang.ClassNotFoundException: #
org.dspace.app.mediafilter.WordFilter
at
org.dspace.core.PluginManager.getAnonymousPlugin(PluginManager.java:236)
at
org.dspace.core.PluginManager.getPluginSequence(PluginManager.java:205)
at
org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.ja
va:160)
Caused by: java.lang.ClassNotFoundException: #
org.dspace.app.mediafilter.WordFilter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.dspace.core.PluginManager.getAnonymousPlugin(PluginManager.java:220)
... 2 more

This error seems pretty straightforward: the
org.dspace.app.mediafilter.WordFilter class file cannot be found.
However, it was compiled and put into the dspace .war file and is
available in Tomcat here:

/usr/local/tomcat/webapps/dspace/WEB-INF/classes/org/dspace/app/mediafil
ter/WordFilter.class

Should it be somewhere else? Do I need to rebuild DSpace after changing
what /usr/bin/java is set to?

Thanks in advance for any help...

--
Stacy Pennington
Information Technology Services
Rhodes College
penni...@rhodes.edu
901-843-3968

Jonathan Champ

no leída,
24 ago 2015, 4:13:31 p.m.24/8/15
para Stacy Pennington,dspac...@lists.sourceforge.net
On 10/17/06, penni...@rhodes.edu <penni...@rhodes.edu> wrote:
...
...

Actually, no. The class that it can't find is #. For some reason, the
WordFilter class is attempting to magically discover what the class it
is working with is, only to discover that # (the class that it thinks
it finds) is actually not a class at all. Sounds almost like the wrong
data is being passed to the wrong class. Maybe a nonexistent plugin is
being called? Someone with a bit more filter-media experience might
want to weigh in here.

Jonathan

Stuart David Lewis [sdl]

no leída,
24 ago 2015, 4:13:33 p.m.24/8/15
para Jonathan Champ,Stacy Pennington,dspac...@lists.sourceforge.net
Hi Stacy,

Have a look in your dspace.cfg file, and check for a hash '#' before the
line that contains org.dspace.app.mediafilter.WordFilter

I'm guessing you might have something like:

plugin.sequence.org.dspace.app.mediafilter.MediaFilter = \
org.dspace.app.mediafilter.PDFFilter, \
org.dspace.app.mediafilter.HTMLFilter, \
# org.dspace.app.mediafilter.WordFilter

Normally java ignores lines beginning with a hash, but in this case,
because the line before terminates with a slash '\', it looks for more
detail on the next line.

Thanks,


Stuart
_________________________________________________________________

Datblygydd Cymwysiadau'r We Web Applications Developer
Gwasanaethau Gwybodaeth Information Services
Prifysgol Cymru Aberystwyth University of Wales Aberystwyth

E-bost / E-mail: Stuart...@aber.ac.uk
Ffon / Tel: (01970) 622860
_________________________________________________________________


-----Original Message-----
From: dspace-te...@lists.sourceforge.net
[mailto:dspace-te...@lists.sourceforge.net] On Behalf Of Jonathan
Champ
Sent: 18 October 2006 18:00
To: Stacy Pennington
Cc: dspac...@lists.sourceforge.net
Subject: Re: [Dspace-tech] javax.swing.text.html.HTMLEditorKit Missing
whenRunning filter-media

------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Gabriel Farrell

no leída,
24 ago 2015, 4:13:36 p.m.24/8/15
para dspace-tech
My apologies, meant to send this to the list.

Gabe

-------- Forwarded Message --------
From: Gabriel Farrell <gs...@drexel.edu>
Reply-To: gs...@drexel.edu
To: penni...@rhodes.edu
Subject: Re: [Dspace-tech] javax.swing.text.html.HTMLEditorKit Missing
when Running filter-media
Date: Wed, 18 Oct 2006 14:00:26 -0400

On Tue, 2006-10-17 at 13:40 -0500, penni...@rhodes.edu wrote:
> Richard, thanks a bunch for pointing me in the correct direction. Yes,
> indeed, I'm running Redhat EL 4, and my /usr/bin/java symbolic links was
> not pointing to the correct java app. (RHEL4 puts these java symbolic
> links in the /etc/alternatives directory, and you can change them there
> to point to your real java home directories and binaries.)
>

I'm in the same situation, running RHEL4. What did you end up pointing
your /etc/alternatives/java at? Mine is:

lrwxrwxrwx 1 root root 30 Oct 18 13:46 /etc/alternatives/java
-> /usr/java/jre1.5.0_08/bin/java

Though I did notice that, with gcc4,

[root@dspacetest ~]# locate HTMLEditorKit
/usr/lib/gcc/i386-redhat-linux/4.1.0/include/javax/swing/text/html/HTMLEditorKit.h

> Now, however, I'm getting a different error when I run filter-media
>
> [bin]$ /dspace/bin/filter-media
> Applying Media Filters
> Exception in thread "main" org.dspace.core.PluginInstantiationException:
> However, it was compiled and put into the dspace .war file and is
> available in Tomcat here:
>
> /usr/local/tomcat/webapps/dspace/WEB-INF/classes/org/dspace/app/mediafil
> ter/WordFilter.class
>
> Should it be somewhere else? Do I need to rebuild DSpace after changing
> what /usr/bin/java is set to?
>
> Thanks in advance for any help...
>

I'm seeing plenty of "You do not have permission to extract text"
errors, but none of the above. Hmm... Is it producing any text files
at all, that is, are you getting any output like the following?

FILTERED: bitstream 1114 and created 'ch7.pdf.txt'

gabe


> --
> Stacy Pennington
> Information Technology Services
> Rhodes College
> penni...@rhodes.edu
> 901-843-3968
>
>
> > -----Original Message-----
> > Date: Fri, 13 Oct 2006 12:16:40 +0100
> > From: Richard Jones <richard...@imperial.ac.uk>
> > Subject: Re: [Dspace-tech] javax.swing.text.html.HTMLEditorKit Missing
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
--
Gabriel Farrell
Archives and Systems Librarian
Hagerty Library
Drexel University
(215) 895-1871
gs...@drexel.edu

Jonathan Champ

no leída,
24 ago 2015, 4:13:37 p.m.24/8/15
para gs...@drexel.edu,dspace-tech
On 10/18/06, Gabriel Farrell <gs...@drexel.edu> wrote:
...
> I'm seeing plenty of "You do not have permission to extract text"
> errors, but none of the above. Hmm... Is it producing any text files
...

This is the expected behavior, correct? I'm guessing: PDFs with locked content?

Jonathan

penni...@rhodes.edu

no leída,
24 ago 2015, 4:13:41 p.m.24/8/15
para dspac...@lists.sourceforge.net

Jonathan,

Thanks, you nailed it. The problem was that my dspace.cfg was having
issues with the line listing the mediafilters to use. Once I look out
the line wrap characters and just put all of the filters on one line,
filter-media immediately worked and now I see thumbnails.

Thanks again for the help...

Stacy

> -----Original Message-----
> Date: Wed, 18 Oct 2006 12:59:32 -0400
> From: "Jonathan Champ" <roy...@gmail.com>
> Subject: Re: [Dspace-tech] javax.swing.text.html.HTMLEditorKit Missing
> when Running filter-media
> To: "Stacy Pennington" <penni...@rhodes.edu>
> Cc: dspac...@lists.sourceforge.net
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> > This error seems pretty straightforward: the
> > org.dspace.app.mediafilter.WordFilter class file cannot be found.

Scott Yeadon

no leída,
24 ago 2015, 4:13:44 p.m.24/8/15
para techx...@gmail.com,dspac...@lists.sourceforge.net
Hi Corey,

>Date: Wed, 18 Oct 2006 11:39:45 +0930
>From: "Corey Wallis" <techx...@gmail.com>
>Subject: [Dspace-tech] Indexing on more fields than those in
> dspace.cfg
>To: dspac...@lists.sourceforge.net
>Message-ID:
> <19fa495f0610171909v247...@mail.gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>Dear All,
>
>I'm curently investigating an issue with our instance of DSpace.
>According to user reports it would appear DSpace is indexing on more
>fields than those specified in the dspace.cfg file.
>
>Does anyone know if there are more indexes than those specified in the
>dspace.cfg file? If there are, where I can see what fields are being
>indexed by them.
>
>
I'm not sure whether you can do this without using the Lucene API. You
can kind of check by specifying the dspace.cfg index field name as part
of the search (e.g. by entering 'keyword:holocene' in the general search
box you can limit the search for holocene to the keyword field). Do you
know what metadata may be being erroneously indexed? One thing to also
consider is if you have run the filter-media job and extracted text from
PDF/HTML/Word, that text is also indexed.

>With thanks.
>
>-Corey
>
>
>


Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos