I was wondering if anyone could help.....
I have written a Java bean called ShoppingCart and class called Product for
a shopping cart facility. Both compiled successfully. The code I used has
been taken from a book. The page to display the contents of the catalog
from the database loads as normal. If I select 'BUY' next to the product, I
get the below message
500 Internal Server Error
/DisplayCatalog.jsp:
javax.servlet.ServletException: Exception thrown on line '57' from page
'C:\\Program
Files\\Allaire\\JRun\\servers\\default\\default-app\\DisplayCatalog.jsp'.
java.lang.IllegalAccessError: try to access class Product from class
jrun__DisplayCatalog2ejsp13
at
jrun__DisplayCatalog2ejsp13._jspService(jrun__DisplayCatalog2ejsp13.java:104
)
at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:40)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
at
allaire.jrun.servlet.JRunNamedDispatcher.forward(../servlet/JRunNamedDispatc
her.java:34)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:175)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:88)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:330)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:107)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)
Can anyone explain why it doesn't work?
Is your class Product public?
HTH,
Roman
--
________________________________________________________________________
Roman Seibold, Dipl.-Inform.
Haenchen & Partner, Beratungsgesellschaft fuer Wirtschaftsinformatik mbH
Calwer Str. 1, 71034 Boeblingen, Germany
Roman....@haenchen.softwarezentrum.de
http://www.haenchen.softwarezentrum.de
Phone: +49 (0)7031 2126 100
FAX: +49 (0)7031 2126 199
________________________________________________________________________