ninada / full-hibernate-plugin-for-struts2

Automatically exported from code.google.com/p/full-hibernate-plugin-for-struts2
1 stars 0 forks source link

Stack overflow in injectHibernateCoreSessionByAnnotation #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Instantiate an object inside the action that contains an inner object i.e.:
public class TramiteActionGrid {
...

public BusquedaVecinoActuacion busquedaVecinoActuacion = new 
BuscadorExpAction().new BusquedaVecinoActuacion();
}

2. The definition of the class that contains the inner classes is as follows:

public class BuscadorExpAction extends ActionGeneric {

//defines an inner object inside
public BuscadorExpAction.BusquedaGeneralActuacion busquedaGralActuacion = new 
BuscadorExpAction.BusquedaGeneralActuacion();

....

//inner class definition
public class BusquedaGeneralActuacion extends ActionGeneric {
.....
}

//end of class definition
}

What is the expected output? What do you see instead?
The expected output is the plugin trying to inject the session/transaction 
without errors, I see an stack overflow error instead in 
"injectHibernateCoreSessionByAnnotation".

What version of the product are you using? On what operating system?
struts2-fullhibernatecore-plugin-2.2.2-GA.jar on Windows XP

Please provide any additional information below.
Probably related to issues 21 and 12, caused by the call to the recursive 
function injectHibernateCoreSessionByAnnotation.  The inner class has a 
reference to the parent object, that has a reference to the inner class, that 
has a reference to the parent object, that has a reference to the inner 
class,...,etc. :-)

Original issue reported on code.google.com by jdib...@gmail.com on 11 Mar 2011 at 9:48