https://bz.apache.org/bugzilla/show_bug.cgi?id=61298
Bug ID: 61298
Summary: NoClassDefFoundError:
org/apache/commons/collections4/bidimap/TreeBidiMap
Product: POI
Version: 3.16-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: POIFS
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Code that worked in v3.15 doesn't work with v3.16 and v3.17beta. At runtime, I
get an exception for
new PropertySet(dis)
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/collections4/bidimap/TreeBidiMap
at org.apache.poi.hpsf.Section.<init>(Section.java:178)
at org.apache.poi.hpsf.MutableSection.<init>(MutableSection.java:41)
at org.apache.poi.hpsf.PropertySet.init(PropertySet.java:494)
at org.apache.poi.hpsf.PropertySet.<init>(PropertySet.java:196)
at documents.WordDoc.getDocMetadata(WordDoc.java:626)
at documents.WordDoc.<init>(WordDoc.java:89)
at documents.Scan.rhapsodyCheckFile(Scan.java:205)
at documents.Scan.rhapsodyCheckFile(Scan.java:153)
at documents.Scan.checkFile(Scan.java:625)
at rhapsody.Overnight.checkFilesForFolder(Overnight.java:158)
at documents.Scan.main(Scan.java:830)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.collections4.bidimap.TreeBidiMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 11 more
public WordDoc(File file) throws IOException {
try {
try {
hdoc = new HWPFDocument(new FileInputStream(file));
getDocMetadata(file);
// snip
} catch (IllegalArgumentException ex) {
if (!ex.getMessage().contains("Office 2007+ XML")) {
Scan.reportError(0, file.getPath(), null, null, null, null, null,
null, ex.getMessage(), null, null);
throw new IOException();
}
}
private void getDocMetadata(File file) throws IOException {
POIFSFileSystem poifs = new POIFSFileSystem(new FileInputStream(file));
DirectoryEntry dir = poifs.getRoot();
DocumentEntry siEntry = (DocumentEntry)
dir.getEntry(SummaryInformation.DEFAULT_STREAM_NAME);
DocumentInputStream dis = new DocumentInputStream(siEntry);
try {
SummaryInformation si = new SummaryInformation(new PropertySet(dis));
// snip
} catch (UnexpectedPropertySetTypeException ex) {
} catch (NoPropertySetStreamException ex) {
} catch (MarkUnsupportedException ex) {
} catch (UnsupportedEncodingException ex) {
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]