6 Replies Latest reply: Jun 2, 2012 3:37 PM by Stijn Van Bael RSS

AccessControlException when running Weld-based application on Google App Engine

Stijn Van Bael Newbie

I'm trying to run my Weld-based application on Google App Engine, but on initialization, following exception occurs. Googling the keywords of the exception resulted in very few results with no clue what is going on whatsoever. What may cause this and where to start looking to troubleshoot?

 

Im using Weld 1.8 with RESTEasy 2.3.3.

 

com.google.common.collect.ComputationException: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)

at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:397)

at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:183)

at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:95)

at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:134)

at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:191)

at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:368)

at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:206)

at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)

at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)

at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)

at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)

at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)

at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:202)

at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171)

at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123)

at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:446)

at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)

at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)

at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)

at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)

at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)

at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)

at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)

at java.lang.Thread.run(Thread.java:679)

Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)

at java.security.AccessControlContext.checkPermission(AccessControlContext.java:355)

at java.security.AccessController.checkPermission(AccessController.java:567)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)

at com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:56)

at java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1679)

at java.lang.Class.checkMemberAccess(Class.java:2174)

at java.lang.Class.getDeclaredMethods(Class.java:1807)

at java.lang.Class.getEnclosingMethod(Class.java:919)

at sun.reflect.generics.scope.ClassScope.computeEnclosingScope(ClassScope.java:50)

at sun.reflect.generics.scope.AbstractScope.getEnclosingScope(AbstractScope.java:74)

at sun.reflect.generics.scope.AbstractScope.lookup(AbstractScope.java:90)

at sun.reflect.generics.scope.AbstractScope.lookup(AbstractScope.java:90)

at sun.reflect.generics.factory.CoreReflectionFactory.findTypeVariable(CoreReflectionFactory.java:109)

at sun.reflect.generics.visitor.Reifier.visitTypeVariableSignature(Reifier.java:165)

at sun.reflect.generics.tree.TypeVariableSignature.accept(TypeVariableSignature.java:43)

at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:68)

at java.lang.reflect.Method.getGenericReturnType(Method.java:254)

at org.jboss.weld.introspector.jlr.WeldMethodImpl.of(WeldMethodImpl.java:63)

at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:246)

at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:98)

at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:54)

at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:42)

at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)

at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)

at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)

at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)

at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)

... 24 more