My app is using Spring 3.0. If i disable Spring AOP, my app runs fine both on local and appspot.
But when i enable Spring AOP (tested with advice or aspects), in local runtime everything is fine and works, but in appspot im getting this error: java.lang.StackOverflowError at java.lang.String.endsWith(Unknown Source) at sun.security.provider.PolicyFile.canonPath(Unknown Source) at java.io.FilePermission$1.run(Unknown Source) at java.io.FilePermission$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.io.FilePermission.init(Unknown Source) at java.io.FilePermission.<init>(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.getPermission(Unknown Source) at sun.misc.URLClassPath.check(Unknown Source) at sun.misc.URLClassPath$FileLoader.getResource(Unknown Source) at sun.misc.URLClassPath$FileLoader.findResource(Unknown Source) at sun.misc.URLClassPath.findResource(Unknown Source) at java.net.URLClassLoader$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:631) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:659) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:659) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResour... My applicationContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"> <!-- Habilita annotations para JPA --> <!-- VERIFICAR: <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" / > --> <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" / > <context:property-placeholder location="classpath:application.properties" /> <!-- JPA Entity Manager --> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> <property name="persistenceUnitName" value="transactions-optional" / > </bean> <!-- Activates spring transaction container --> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <!-- Cache configuration --> <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> <property name="configLocation"> <value>classpath:ehcache.xml</value> </property> </bean> <!-- Activates annotations to be detected in bean classes: @Transaction --> <tx:annotation-driven transaction-manager="transactionManager" /> <!-- Activates various annotations to be detected in bean classes: Spring's @Required and @Autowired, as well as JSR 250's @Resource. --> <context:annotation-config /> <!-- Habilita o AOP AspectJ por annotations. --> <-- <aop:aspectj-autoproxy proxy-target-class="false" /> --> <aop:config proxy-target-class="false"> <aop:advisor pointcut="@annotation (br.com.myapplication.infrastructure.web.AjaxMethod)" advice-ref="ajaxErrorHandlerInteceptor"/> </aop:config> <!-- Instruct Spring to find beans components. --> <context:component-scan base-package="br.com.myapplication" /> </beans> My class AjaxErrorHandlerInteceptor : package br.com.myapplication.infrastructure.web; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; @Component public class AjaxErrorHandlerInteceptor implements MethodInterceptor { @Override public Object invoke(MethodInvocation mi) throws Throwable { try { return mi.proceed(); } catch (Exception e) { Logger targetLogger = Logger.getLogger(mi.getThis().getClass()); } return "success"; } } --------------------- Complete error message: Failed startup of context com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@6147d9 {/,/base/data/home/apps/myapp/1.335882616755927913} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in URL [file:/ base/data/home/apps/myapp/1.335882616755927913/WEB-INF/classes/ applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Post-processing of the FactoryBean's object failed; nested exception is java.lang.StackOverflowError at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:315) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1298) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1060) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:449) at org.springframework.beans.factory.support.AbstractBeanFactory $1.getObject(AbstractBeanFactory.java:289) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:286) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:188) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:528) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:716) at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:383) at org.springframework.web.context.ContextLoader.createWebApplicationContext (ContextLoader.java:270) at org.springframework.web.context.ContextLoader.initWebApplicationContext (ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized (ContextLoaderListener.java:47) at org.mortbay.jetty.handler.ContextHandler.startContext (ContextHandler.java:530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler (AppVersionHandlerMap.java:190) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler (AppVersionHandlerMap.java:167) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest (JettyServletEngineAdapter.java:127) at com.google.apphosting.runtime.JavaRuntime.handleRequest (JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4823) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4821) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 359) at com.google.net.rpc.impl.Server$2.run(Server.java:820) at com.google.tracing.LocalTraceSpanRunnable.run (LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan (LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc(Server.java:775) at com.google.net.rpc.impl.Server.processRequest(Server.java:348) at com.google.net.rpc.impl.ServerConnection.messageReceived (ServerConnection.java:436) at com.google.net.rpc.impl.RpcConnection.parseMessages (RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived (RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 428) at com.google.net.async.EventDispatcher.processNetworkEvents (EventDispatcher.java:762) at com.google.net.async.EventDispatcher.internalLoop (EventDispatcher.java:207) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown (RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run (JavaRuntime.java:374) at java.lang.Thread.run(Unknown Source) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Post-processing of the FactoryBean's object failed; nested exception is java.lang.StackOverflowError at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean (FactoryBeanRegistrySupport.java:166) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean (FactoryBeanRegistrySupport.java:102) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance (AbstractBeanFactory.java:1376) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:243) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:188) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:309) ... 44 more Caused by: java.lang.StackOverflowError at java.lang.String.endsWith(Unknown Source) at sun.security.provider.PolicyFile.canonPath(Unknown Source) at java.io.FilePermission$1.run(Unknown Source) at java.io.FilePermission$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.io.FilePermission.init(Unknown Source) at java.io.FilePermission.<init>(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.getPermission(Unknown Source) at sun.misc.URLClassPath.check(Unknown Source) at sun.misc.URLClassPath$FileLoader.getResource(Unknown Source) at sun.misc.URLClassPath$FileLoader.findResource(Unknown Source) at sun.misc.URLClassPath.findResource(Unknown Source) at java.net.URLClassLoader$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:631) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:659) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:659) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResour --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---