dspace filter-media
在DSpace 5.3上运行得非常好。每次运行它以升级后执行5.4以索引新的PDF(已经测试过所有类型的PDF!),它会崩溃并出现以下异常堆栈:
dspace@mylinux:/opt/dspace/deploy/bin> ./dspace filter-media
File: Supercalifragilisticexpialidocious.pdf.txt
Exception: org/apache/fontbox/afm/AFMParser
java.lang.NoClassDefFoundError: org/apache/fontbox/afm/AFMParser
at org.apache.pdfbox.pdmodel.font.PDFont.addAdobeFontMetric(PDFont.java:165)
at org.apache.pdfbox.pdmodel.font.PDFont.addAdobeFontMetric(PDFont.java:152)
at org.apache.pdfbox.pdmodel.font.PDFont.getAdobeFontMetrics(PDFont.java:122)
at org.apache.pdfbox.pdmodel.font.PDFont.<clinit>(PDFont.java:114)
at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:100)
at org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:213)
at org.apache.pdfbox.util.PDFStreamEngine.getFonts(PDFStreamEngine.java:607)
at org.apache.pdfbox.util.operator.SetTextFont.process(SetTextFont.java:59)
at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:557)
at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:268)
at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:235)
at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:215)
at org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:460)
at org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:385)
at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:344)
at org.dspace.app.mediafilter.PDFFilter.getDestinationStream(PDFFilter.java:101)
at org.dspace.app.mediafilter.MediaFilterManager.processBitstream(MediaFilterManager.java:734)
at org.dspace.app.mediafilter.MediaFilterManager.filterBitstream(MediaFilterManager.java:550)
at org.dspace.app.mediafilter.MediaFilterManager.filterItem(MediaFilterManager.java:500)
at org.dspace.app.mediafilter.MediaFilterManager.applyFiltersItem(MediaFilterManager.java:468)
at org.dspace.app.mediafilter.MediaFilterManager.applyFiltersAllItems(MediaFilterManager.java:403)
at org.dspace.app.mediafilter.MediaFilterManager.main(MediaFilterManager.java:340)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
Caused by: java.lang.ClassNotFoundException: org.apache.fontbox.afm.AFMParser
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 28 more
Caused by: java.util.zip.ZipException: error reading zip file
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:56)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:679)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:415)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at sun.misc.IOUtils.readFully(IOUtils.java:65)
at java.util.jar.JarFile.getBytes(JarFile.java:390)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:180)
at java.util.jar.JarFile.getManifest(JarFile.java:167)
at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:779)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:416)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
... 34 more
系统信息:
答案 0 :(得分:0)
我让它运行,但无法弄明白为什么。有什么想法吗?
我所做的是将以前的DSpace的广告从[dspace]/lib.bak
复制到[dspace]/lib
。所以,没有这套罐子,这不起作用,
-rw-r--r-- 1 dspace users 4173 Dec 17 09:43 additions-5.4.jar
-rw-r--r-- 1 dspace users 2159510 Dec 17 09:43 dspace-api-5.4.jar
-rw-r--r-- 1 dspace users 849983 Dec 14 12:24 dspace-api-lang-5.0.6.jar
-rw-r--r-- 1 dspace users 129054 Dec 17 09:45 dspace-oai-5.4-classes.jar
-rw-r--r-- 1 dspace users 130628 Dec 17 09:43 dspace-services-5.4.jar
现在我有了这个并且它工作得很好:
-rw-r--r-- 1 dspace users 4172 Sep 1 13:40 additions-5.2.jar
-rw-r--r-- 1 dspace users 4170 Sep 2 14:04 additions-5.3.jar
-rw-r--r-- 1 dspace users 4173 Dec 17 09:43 additions-5.4.jar
-rw-r--r-- 1 dspace users 2157296 Sep 1 13:38 dspace-api-5.2.jar
-rw-r--r-- 1 dspace users 2158457 Sep 2 14:04 dspace-api-5.3.jar
-rw-r--r-- 1 dspace users 2159510 Dec 17 09:43 dspace-api-5.4.jar
-rw-r--r-- 1 dspace users 845777 Sep 1 13:39 dspace-api-lang-5.0.5.jar
-rw-r--r-- 1 dspace users 849983 Dec 14 12:24 dspace-api-lang-5.0.6.jar
-rw-r--r-- 1 dspace users 128126 Sep 1 13:51 dspace-oai-5.2-classes.jar
-rw-r--r-- 1 dspace users 128849 Sep 2 14:06 dspace-oai-5.3-classes.jar
-rw-r--r-- 1 dspace users 129054 Dec 17 09:45 dspace-oai-5.4-classes.jar
-rw-r--r-- 1 dspace users 130562 Sep 1 13:38 dspace-services-5.2.jar
-rw-r--r-- 1 dspace users 130557 Sep 2 14:04 dspace-services-5.3.jar
-rw-r--r-- 1 dspace users 130628 Dec 17 09:43 dspace-services-5.4.jar
我很高兴我已经解决了这个问题,当然,但我真的想知道为什么!
从5.3升级到5.4后,通过将git标签dspace-5.4
合并到我的本地5.3分支中,我发出mvn -U clean package
后跟ant update
。