title: tomee ExceptionInInitializerError and ThreadLocalProxy is not visible from class loader
body: <p>I implemented CXF on Tomcat server using Apache TomEE.</p>
  
  <p>I get this error message on the start up.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>SEVERE: error invoking org.apache.tomee.webservices.TomeeJaxRsService@3b1c4405
  java.lang.ExceptionInInitializerError
   at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.&lt;clinit&gt;(CxfRsHttpListener.java:134)
   at org.apache.openejb.server.cxf.rs.CxfRSService.createHttpListener(CxfRSService.java:167)
   at org.apache.openejb.server.rest.RESTService.deployApplication(RESTService.java:459)
   at org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:275)
   at org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.apache.openejb.observer.ObserverManager$MethodInvocation.invoke(ObserverManager.java:399)
   at org.apache.openejb.observer.ObserverManager.doFire(ObserverManager.java:110)
   at org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:99)
   at org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:134)
   at org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1651)
   at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:116)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
   at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
   at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:648)
   at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:618)
   at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:43)
   at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:175)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
   at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
   at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:35)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
   at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
   at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)
   at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:100)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
   at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
   at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
   at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:227)
   at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:194)
   at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
   at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
   at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
   at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
   at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
   at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.IllegalArgumentException: interface org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy is not visible from class loader
   at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:616)
   at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:592)
   at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:244)
   at java.lang.reflect.WeakCache.get(WeakCache.java:141)
   at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:455)
   at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:738)
   at org.apache.cxf.jaxrs.utils.InjectionUtils.createThreadLocalProxy(InjectionUtils.java:905)
   at org.apache.cxf.jaxrs.model.AbstractResourceInfo.addContextMethod(AbstractResourceInfo.java:167)
   at org.apache.cxf.jaxrs.model.AbstractResourceInfo.checkContextMethod(AbstractResourceInfo.java:150)
   at org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextSetterMethods(AbstractResourceInfo.java:132)
   at org.apache.cxf.jaxrs.model.AbstractResourceInfo.&lt;init&gt;(AbstractResourceInfo.java:65)
   at org.apache.cxf.jaxrs.model.ProviderInfo.&lt;init&gt;(ProviderInfo.java:29)
   at org.apache.cxf.jaxrs.provider.ProviderFactory.initJaxbProviders(ProviderFactory.java:131)
   at org.apache.cxf.jaxrs.provider.ProviderFactory.&lt;init&gt;(ProviderFactory.java:120)
   at org.apache.cxf.jaxrs.provider.ProviderFactory.getInstance(ProviderFactory.java:161)
   at org.apache.cxf.jaxrs.provider.ProviderFactory.&lt;clinit&gt;(ProviderFactory.java:73)
   ... 74 more</code></pre>
  </div>
  </div>
  </p>
  
  <p>I don't really understand what the error message means.</p>