This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes IllegalAccesError in ConfigureListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "IllegalAccesError in ConfigureListener" Watch "IllegalAccesError in ConfigureListener" New topic
Author

IllegalAccesError in ConfigureListener

pinky suresh
Greenhorn

Joined: Jul 21, 2008
Posts: 22
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

Joined: Jun 10, 2008
Posts: 66
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.


Regards,<br />Joe<br /> <br />"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."<br />--Martin Golding
pinky suresh
Greenhorn

Joined: Jul 21, 2008
Posts: 22
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

Joined: Jun 20, 2007
Posts: 36
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

Joined: Jul 21, 2008
Posts: 22
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

Joined: Jul 21, 2008
Posts: 22
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

Joined: Jun 20, 2007
Posts: 36
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

Joined: Jun 10, 2008
Posts: 66
Try changing the class loading policy of the application on the Tomcat server.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IllegalAccesError in ConfigureListener
 
Similar Threads
XFire web services help
Getting "Dispatcher initialization failed" error message while running Struts 2 example in Eclipse
java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
JSF runtime error
Eclipse + struts2.0