Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalAccesError in ConfigureListener

 
pinky suresh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am leaning JSF.I created a simple dynamic web project using JSF in eclipse and using Tomcat5.5 as app server. After deploying the project, when tomcat is started i am getting IllegalAccessError.Below is the stacktrace.
java.lang.IllegalAccessError
at com.sun.faces.config.ConfigureListener.<clinit>(ConfigureListener.java:209)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1243)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3713)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

I am having the following jar files under WEB-INF/lib of my project
jsf-impl.jar
jsf-api.jar
jstl.jar
standard.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar

Request you to kindly let me know if i have missed any thing/jar files needed for sucessful operation.

Please let me know your suggestions.
 
Joe Matthew
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

This can be due to a problem with the listener configured in your web.xml. Or it can a incompatibility issue with the SUN RI version you have.
 
pinky suresh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
Thanks for the reply..

I have commented the listener code in web.xml.Still i am getting the same error.Let me know what could be issue.

Also let me know about the second about sun RI used...
 
Ryan Lubke
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd ensure that there are no other instances of jsf-impl within the tomcat installation (i.e. server/lib or common/lib).
 
pinky suresh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The illegalAccessError for ConfigureListener was resolved
and problem was due to presence of jstl-impl.jar file in server/lib as well as commons/lib.

But now i am getting the following exception
java.lang.NoClassDefFoundError: javax.servlet.ServletRequest
at javax.servlet.jsp.jstl.core.Config.set(Unknown Source)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:123)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:799)

I have servlet-api.ja
 
pinky suresh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for previous incomplete reply...

I have servlet-api.jar in commons/lib and still i am getting the NoClassDefFoundError for ServletRequest.

Please let me know what i am missing.
 
Ryan Lubke
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by pinky suresh:
Sorry for previous incomplete reply...

I have servlet-api.jar in commons/lib and still i am getting the NoClassDefFoundError for ServletRequest.

Please let me know what i am missing.


Might try following up with the tomcat folks. Something seems wrong with your installation now.
 
Joe Matthew
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try changing the class loading policy of the application on the Tomcat server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic