
full-hibernate-plugin-for-struts2 - issue #22
Stack Overflow when calling classes that spawn threads
What steps will reproduce the problem?
include a class like this in an action:
public class GCImpl implements GC { Logger logger = Logger.getLogger(this.getClass()); private Handler handler;
private GCImpl()
{
handler = new Handler();
new Thread(handler, "Handler").start();
}
private class Handler extends Thread
{
@Override
public void run()
{
while (true)
{
synchronized (this)
{
//do stuff;
try
{
wait(1000);
}
catch (Exception e)
{
logger.error("Exception thrown " + e.getMessage(), e);
}
}
}
}
}
}
What is the expected output? What do you see instead? java.lang.StackOverflowError java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findResource(URLClassLoader.java:382) java.lang.ClassLoader.getResource(ClassLoader.java:1003) java.lang.ClassLoader.getResource(ClassLoader.java:998) java.lang.ClassLoader.getSystemResource(ClassLoader.java:1101) java.lang.Class.getResource(Class.java:2072) com.googlecode.s2hibernate.struts2.plugin.interceptors.SessionTransactionInjectorInterceptor.isCandidadeClass(SessionTransactionInjectorInterceptor.java:396) com.googlecode.s2hibernate.struts2.plugin.interceptors.SessionTransactionInjectorInterceptor.injectHibernateCoreSessionByAnnotation(SessionTransactionInjectorInterceptor.java:459)
........
What version of the product are you using? On what operating system? 2.2-GA
Please provide any additional information below. I am using Spring's DI to inject this class into my action, but it doesn't require a hibernate session to run so @SessionTarget is not set.
Comment #1
Posted on Sep 8, 2010 by Grumpy RabbitHello. My friend, this plugin is for using without spring. If you're using spring for Hibernate Session injection, no need of use this project. Compatibility between theese project is not guaranteed.
Status: Invalid
Labels:
Type-Defect
Priority-Medium