I tried to implement testing of Struts2 actions by following articles such
as:

http://cimballisblog.blogspot.com/2009/09/unit-testing-struts2-actions-with.html
http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/

without luck.
The problem is when my action code tries to access a member from a ManyToOne
relationship:

org.hibernate.LazyInitializationException: could not initialize proxy - no
Session
    at
org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
    at
org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
    at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)

Did anyone succedd in trying to do that sort of testing?
I'm quite lost.
I tried with my ActionTest class:
- using @RunWith(SpringJUnit4ClassRunner.class)
- extending AbstractTransactionalDataSourceSpringContextTests
but I'll always get stuck in the same place.

Josep

Reply via email to