Yes, this is the only version in the classpath.  I did have a problem with
the build, though - The JAR file for the final build didn't include the
HSSF usermodel & util classes, so I had to download the source, recompile
everything, and then JAR it up again.  Maybe there is some inconsistency
between the bin and the src?  Maybe I included something in the JAR that
shouldn't be in there?





"Andrew C. Oliver" <[EMAIL PROTECTED]> on 10/10/2002 07:21:13 AM

Please respond to "POI Users List" <[EMAIL PROTECTED]>

To:   POI Users List <[EMAIL PROTECTED]>
cc:

Subject:  Re: access errors when trying to write out Excel file


Oh yuck.  This is actually something else.  Its saying you can't
access the class from the other class and its happening inside of POIFS.

Is this the ONLY version of POI in your classpath? (I could see maybe
getting this error with two versions in the classpath)

Anyone have any clues?  This error is totally weird.  (it may even be a
JVM bug)


On Thu, 2002-10-10 at 07:18, Sabrina L Landis wrote:
>
>
>
>
>
>
> "Andrew C. Oliver" <[EMAIL PROTECTED]>@main.gmane.org> on
> 10/09/2002 04:17:51 PM
>
> Please respond to "POI Users List" <[EMAIL PROTECTED]>
>
> Sent by:  news <[EMAIL PROTECTED]>
>
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  Re: access errors when trying to write out Excel file
>
>
> On Wed, 09 Oct 2002 06:59:27 -0400, Sabrina L Landis wrote:
>
> > Hi,
> > I am working on a project that requires simple query list screens to be
> > exported to Excel.  The spreadsheet format is very simple, and I've
been
> > able to generate the file with no problem using a standalone Java
class.
> >
> > However, when I try to generate the same file using a servlet or JSP
> > within our application, I get error messages.  The serlvet produces the
> > error message "java.lang.IllegalAccessError: try to access class
> > org.apache.poi.poifs.storage.BigBlock from class
> > org.apache.poi.poifs.filesystem.POIFSDocument$BigBlockStore".  The JSP
> > produces the error message "?CAL4MX9N.xls? cannot be accessed.  The
file
> > may be read-only, or you may be trying to access a read-only location.
> > Or, the server the document is stored on may note be responding."
> >
> > I put in a bunch of debug statements and found out that the program
runs
> > fine up to the point where it calls the HSSFWorkbook.write method to
> > output the file.  We think it may be a problem with the code trying to
> > write to a restricted area of our file system.  I am using the POI 1.5
> > final release (HSSF usermodel API), JDK 1.3.1_04, my application server
> > is Oracle 9ias (OC4J), and I've tried to run the code on both NT and
> > Unix boxes.  Any advice on how to resolve this problem would be greatly
> > appreciated.
> >
> >
>
> Just a couple of suggestions.  By itself HSSFWorkbook writes to a stream.
> So if the stream is pointing to a restricted area of your
filesystem...you
> did it.
>
> ----> When I tested with the servlet, I explicitly pointed the stream to
> areas that the application has access to.  When I tested with the JSP, I
> tried to use the ServletOutputStream.  Neither scenario worked.
>
> You need to supply a stack trace, perhaps a JSP with the minimum amount
> of code necessary to replicate the problem (maybe a "Hello World"
> spreadsheet).
>
> ----> Here is is:
>      java.lang.IllegalAccessError: try to access class
> org.apache.poi.poifs.storage.BigBlock from class
> org.apache.poi.poifs.filesystem.POIFSDocument$BigBlockStore
>       at
>
org.apache.poi.poifs.filesystem.POIFSDocument$BigBlockStore.writeBlocks(POIFSDocument.java:639)

>       at
>
org.apache.poi.poifs.filesystem.POIFSDocument.writeBlocks(POIFSDocument.java:311)

>       at
>
org.apache.poi.poifs.filesystem.POIFSFileSystem.writeFilesystem(POIFSFileSystem.java:296)

>       at
> org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:469)
>       at
>
com.itvsdr.web.sit.commands.SITGenExcelCommand.generateExcelData(SITGenExcelCommand.java:340)

>       at
>
com.itvsdr.web.sit.commands.SITGenExcelCommand.execute(SITGenExcelCommand.java:121)

>       at SITAdmin.service(SITAdmin.java:180)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
>       at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
>
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:508)

>       at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
>
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:177)

>       at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
>
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:576)

>       at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
> J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
>       at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
> J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
>
> I'm not sure whether IllegalAccessError refers to POIFS trying to read
> your input stream or some temp file written in your "work" directory by
> your app server.  (which would probably mean someone has tweaked the
> permissions incorrectly).
>
> Lastly, please upgrade to 1.5.1 as it contains bugfixes to 1.5.0 (none of
> which have anything to do with the problem you're having, but certainly
> might help with any future issues you may encounter).
>
> ----> Sorry, I mistyped - I am using 1.5.1.
>
> Thanks,
>
> Andy
>
>
> > Regards,
> > Sabrina
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]
>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]
>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
>
>
--
http://www.superlinksoftware.com - software solutions for business
http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in
Java
http://krysalis.sourceforge.net/centipede - the best build/project
structure
              a guy/gal could have! - Make Ant simple on complex Projects!
The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>








--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to