Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jakarta POI HWPFDocument

Status
Not open for further replies.

jumper2

Programmer
Jul 13, 2007
41
ES
Hi,

I need to make a validation on the word file what the user want to upload. As soon my file is not a real word file I get this failure message:

"java.lang.NoSuchMethodError: org.apache.poi.util.StringUtil.getFromUnicodeLE([BII)Ljava/lang/String;"

My code is like:

try
{
POIFSFileSystem poifs = new POIFSFileSystem(inStream);
HWPFDocument hwpf = new HWPFDocument(poifs);
}
catch (IOException ioe)
{
System.out.println("IOException: " + ioe);
}
catch (Exception e)
{
System.out.println("Exception: " + e);
}

The code gets broken as I try to read the "poifs" into as HWPFDocument...

Is there somebody who could help me?
 
Looks like there's a version conflict. Are you using the same version for all your jars?

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top