You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Joltes, Richard" <re...@g.harvard.edu> on 2018/04/03 18:22:15 UTC

Re: Odd behavior with SXSSF sheets

Yep, I finally started pulling external jars from the classpath and found
one that had been recently upgraded. Once I re-added the new version back
in, the problem vanished and the errors are gone. Whew!

cheers,

dj

On Sat, Mar 31, 2018 at 5:30 AM, Javen O'Neal <on...@apache.org> wrote:

> And double check that all your POI jars in the class path are from the same
> version.
>
> You could try cleaning and running your project from
> ant/maven/gradle/whatever your project is built with to determine if your
> IDE is referencing other jars or missing jars that are causing the cast
> errors.
>
> On Fri, Mar 30, 2018, 22:58 Dominik Stadler <do...@gmx.at>
> wrote:
>
> > Hi,
> >
> > Sounds like a messed up classpath in Eclipse or some other problem with
> the
> > IDE, I would start in the project settings where the libraries are
> > configured to check if poi-ooxml-* is still listed correctly there as
> well.
> >
> > Dominik.
> >
> > On Fri, Mar 30, 2018 at 9:44 PM, Joltes, Richard <re...@g.harvard.edu>
> > wrote:
> >
> > > Hello all,
> > >
> > > New subscriber, and I can't see anything in the archives so I hope this
> > > hasn't been discussed before. I have an application that uses the SXSSF
> > > style sheets, and which was working just fine until I reopened the
> > project
> > > today. Now it's showing lots of type-mismatch errors, and I've no idea
> > why.
> > > Rough outline:
> > >
> > > 1) instantiate an SXSSF workbook (protected SXSSFWorkbook wb;)
> > > 2) create a matching sheet (protected SXSSFSheet sheet1;)
> > >
> > > But then, when I try to instantiate the sheet the fun starts
> > >
> > > sheet1 = wb.createSheet("sheet1");
> > >
> > > Here, Eclipse is telling me to add a cast to SXSSFSheet, which makes no
> > > sense since that's how the sheet was created in the first place.
> > >
> > > From then on it's all the same --
> > >
> > > SXSSFRow r = sheet1.createRow(0); same type/cast error
> > >
> > > Creating an SXSSF cell obviously does the same thing.
> > >
> > > Even odder, all the previously working ColorScaleFormatting and other
> > color
> > > oriented code is showing up as undefined. Again, all this code was
> > working
> > > last time I had the project open. I've no explanation for this
> behavior.
> > >
> > > I was using 3.16, but just migrated to 3.17 and got the same behavior.
> > >
> > > Any ideas?
> > >
> > > Thx,
> > >
> > > Dick Joltes
> > > Harvard University
> > >
> >
>