• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error when creating cell comments using POI

 
Greenhorn
Posts: 10
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The below code works fine for HSSFWorkbook but it gives me an error when using for XSSFWorkbook.

Exception in thread "main" java.lang.NoSuchMethodError: schemasMicrosoftComVml.CTShape.getClientDataList()Ljava/util/List;
at org.apache.poi.xssf.usermodel.XSSFComment.setColumn(XSSFComment.java:127)
at org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:302)
at org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:50)

The error is thrown for the line Comment comment = drawing.createCellComment(anchor);



Any help appreciated. Thanks in advance.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My guess: your classpath contains an outdated version of one of the jar files which POI depends on. It would be the jar file which contains the "schemasMicrosoftComVml.CTShape" class -- but I couldn't tell you which jar that might be.
 
Tushar Ravi
Greenhorn
Posts: 10
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul for your valuable feedback. I did try creating a separate project and run the same program with only the jars related for this but still in vain
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And to create this project, you did what? Did you just copy the jars from the other project (where you had the problem), or did you go right back to the POI download and extract the jars from it?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic