Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalAccessError

 
Matt Siegel
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm getting a wierd exception when I try to use a class in my jsp page.
/main.jsp:
javax.servlet.ServletException: Exception thrown on line '35' from page 'D:\\Inetpub\\wwwroot\\main.jsp'.
java.lang.IllegalAccessError: try to access class Customer from class jrun__main2ejsp9
at jrun__main2ejsp9._jspService(jrun__main2ejsp9.java:66)
at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:175)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(WorkerThread.java:75)
 
Sheldon Rego
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Its better if U specify the exact code of how U have specified the servlet as I cannot interpret the error just by what U have written.
Regrds
Shel
 
Matt Siegel
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the best, quickest example that I could give you.
<html>
<head>
<title>Test</title>
</head>
<body>
<%! private Test1 test1 = new Test1(); %>
<%= test1.getString() %>
</body>
</html>
I have a class named Test1 that I created that contains a String. I just can't do anything with any classes that I created, unless I am just calling a static method on the class.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic