Getting java.lang.IllegalAccessError: tried to access method... while deploying war file in JBoss EAP 6/7
Issue
- JBoss unable to deploy war file
- When attempting to start JBoss we are finding the following error in the
server.log
:
JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: java.lang.IllegalAccessError: tried to access method org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingletonMutex()Ljava/lang/Object; from class org.springframework.context.event.AbstractApplicationEventMulticaster
- Exception when starting JBoss EAP 7, error on the
server.log
:
ERROR [io.undertow.request] (default task-439) UT005023: Exception handling request to /common-runtime/account-entry: java.lang.IllegalAccessError: tried to access field java.lang.invoke.MethodHandles$Lookup.IMPL_LOOKUP from class org.apache.camel.support.RestConsumerContextPathMatcher
at org.apache.camel.support.RestConsumerContextPathMatcher.dt_252_matchBestPath_63(RestConsumerContextPathMatcher.java) [camel-core-2.20.2.jar:2.20.2]
at org.apache.camel.support.RestConsumerContextPathMatcher.matchBestPath(RestConsumerContextPathMatcher.java:161) [camel-core-2.20.2.jar:2.20.2]
at org.apache.camel.http.common.HttpRestServletResolveConsumerStrategy.resolve(HttpRestServletResolveConsumerStrategy.java:50) [camel-http-common-2.20.2.jar:2.20.2]
at org.apache.camel.http.common.CamelServlet.resolve(CamelServlet.java:227) [camel-http-common-2.20.2.jar:2.20.2]
at org.apache.camel.http.common.CamelServlet.doService(CamelServlet.java:114) [camel-http-common-2.20.2.jar:2.20.2]
at org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:73) [camel-http-common-2.20.2.jar:2.20.2]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final-redhat-1.jar:1.0.0.Final-redhat-1]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.3.24.Final-redhat-1.jar:1.3.24.Final-redhat-1]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-
(...)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.