We have an app running on App Engine and using Spring framework. Recently we have added some new features that are based on AOP. We decided to use @AspectJ style hence we ad
A stack overflow usually indicates an infinite loop. With aspectj you could have this in the following case:
Class Logger {
@Autowired
ConfigService conf;
//... used for logging intercepted methods
}
Class ConfigServiceImpl implements ConfigService {
//... this is used to retrieve config
}
If you now use aspectj expressions that says: I want to log my configServiceImpl then you will also have infinite loop when using the configService:
I cannot explain why it is working on your local setup and not on app engine. Or why it is only when you are using @Configuration but I think you should look in the direction of a "circular dependency" like this.
This is either because of infinite recursion, or because your stack is just too big. Try bumping up your stack size to see if that solves the problem (using, for example, -Xss1m
). If this does not help, then you may have infinite recursion. See also:
Java stack overflow error - how to increase the stack size in Eclipse?
It seems that the issue has been fixed in App Engine version 1.9.7. See more details here.