Re: Quick fix for "the dreaded org.hibernate.LazyInitializationException" with WicketTester

2013-06-09 Thread vzog
I managed to make a similar workaround to enable reopening of session in unit tests using your approach. I'm using wicket 6.7, hibernate 4 and spring 3.2.2. please let me know if you have any problem in this configuration Thanks a lot Leon Nieuwoudt wrote > Hi all, > > After about 5 minutes of "o

Re: Quick fix for "the dreaded org.hibernate.LazyInitializationException" with WicketTester

2010-02-16 Thread Leon Nieuwoudt
Just an update, the quick hack failed completely when testing on an XP system, but it worked perfectly on Ubuntu. Any links or example on getting Spring/Hibernate/WicketTester/JUnit4 to work will be appreciated. "lmgtfy" will also suffice ;) On Tue, Feb 16, 2010 at 9:57 AM, Leon Nieuwoudt wrote:

Re: Quick fix for "the dreaded org.hibernate.LazyInitializationException" with WicketTester

2010-02-16 Thread Leon Nieuwoudt
Hi Igor Glad to hear there's another way. I'm already using the Spring JUnit runner, like this: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration public class UserTest extends . { @Test public void testCRUD() { // Code... } } This what I tried: * Adding @Tra

Re: Quick fix for "the dreaded org.hibernate.LazyInitializationException" with WicketTester

2010-02-16 Thread Igor Vaynberg
all you have to do is start a transaction before each unit test and roll it back after. spring has base unit tests and test runners that do this for you... -igor On Tue, Feb 16, 2010 at 12:13 AM, Leon Nieuwoudt wrote: > Yes this works when running the program in the Application Server > environm

Re: Quick fix for "the dreaded org.hibernate.LazyInitializationException" with WicketTester

2010-02-16 Thread Leon Nieuwoudt
Yes this works when running the program in the Application Server environment. For JUnit testing (outside of the AS), I ran into this problem. Is there maybe a better way to maybe wrap the OSIV Filter around Unit Tests? On Tue, Feb 16, 2010 at 9:07 AM, Wilhelmsen Tor Iver wrote: > > I thought t

SV: Quick fix for "the dreaded org.hibernate.LazyInitializationException" with WicketTester

2010-02-16 Thread Wilhelmsen Tor Iver
> After about 5 minutes of "omfg not that error again", I think I found a > quick hack to avoid org.hibernate.LazyInitializationException with > WicketTester. I've checked everywhere on the lists but didn't find a > similar > solution, so apologies if someone else already posted this. There may > a

Quick fix for "the dreaded org.hibernate.LazyInitializationException" with WicketTester

2010-02-15 Thread Leon Nieuwoudt
Hi all, After about 5 minutes of "omfg not that error again", I think I found a quick hack to avoid org.hibernate.LazyInitializationException with WicketTester. I've checked everywhere on the lists but didn't find a similar solution, so apologies if someone else already posted this. There may also