Is your Building class and constructor public? I know it sounds basic but
its important to the servlet container.


-----Original Message-----
From: Matt White [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 5:02 PM
To: [EMAIL PROTECTED]
Subject: IllegalAccessError?


This is most likely a newbie question, so please bear with me.

I have a class of my own, ("Building") which is compiled and placed in my
WEB-INF directory.

Whenever I try to instantiate this class, I receive a IllegalAccessError
error. According to the Java 1.2.2 API docs:

"Thrown if an application attempts to access or modify a field, or to call a
method that it does not have access to. 

Normally, this error is caught by the compiler; this error can only occur at
run time if the definition of a class has incompatibly changed."

Which makes sense, but the JSP will die with just this:

Building b = new Building();

When I go into the generated servlet, I can see that it dies on this same
line every time. If I run it like this:

Building b;
b = new Building();

... it will die on the second line.

To see if there's a problem in my Building class I wrote a simple
application which simply takes a dozen Building objects, tosses them into a
LinkedList object, and then prints them out one at a time. It works great as
an application, but this servlet is giving me fits.

Am I doing something wrong?  I'm at a loss.

- Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to