Bug 44869 - method getFromUnicodeLE doesn't exist in org.apache.poi.util.StringUtil
Summary: method getFromUnicodeLE doesn't exist in org.apache.poi.util.StringUtil
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.0-FINAL
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-24 06:31 UTC by TQM-Team
Modified: 2008-04-24 11:41 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TQM-Team 2008-04-24 06:31:30 UTC
if i want to extract text from powerpoint sheets in different ways i always get a runtime exception about the non-(no longer?) existent method 'org.apache.poi.util.StringUtil.getFromUnicodeLE' (poi-bin-3.0.2-FINAL-20080204)

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.poi.util.StringUtil.getFromUnicodeLE([B)Ljava/lang/String;
	at org.apache.poi.hslf.record.CurrentUserAtom.init(CurrentUserAtom.java:160)
	at org.apache.poi.hslf.record.CurrentUserAtom.<init>(CurrentUserAtom.java:112)
	at org.apache.poi.hslf.HSLFSlideShow.readCurrentUserStream(HSLFSlideShow.java:275)
	at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:131)
	at org.apache.poi.hslf.extractor.PowerPointExtractor.<init>(PowerPointExtractor.java:92)
	at org.apache.poi.hslf.extractor.PowerPointExtractor.<init>(PowerPointExtractor.java:85)

. . .
Comment 1 Josh Micich 2008-04-24 11:41:20 UTC
NoSuchMethodError (the link-time equivalent of NoSuchMethodException) usually occurs across jars, when two incompatible versions are interacting.  In this case it looks like poi.jar(StringUtil) vs poi-scratchpad.jar(CurrentUserAtom).

This error says that CurrentUserAtom is invoking a version of StringUtil that is different to the one that it was compiled against.  However, the getFromUnicodeLE method seems to have been present in StringUtil for a long time.  I decompiled that class as found in poi-bin-3.0.2-FINAL-20080204.tar.gz (http://www.apache.org/dyn/closer.cgi/poi/release/) just to make sure the method was there too.

It would be interesting to know what copy of StringUtil.class you have.

I'm pretty sure that such LinkageErrors cannot occur in any recent version of POI (assuming the no other weird stuff on the classpath).  Please re-open this bugzilla if you think you can reproduce the error with a pure and consistent deploy of version 3.0.2-FINAL.