Thanks for the reply, Dhanji, it's always a pleasure to hear the voice
from developer.
It looks like I'm one step to success, but always not an easy one.
I followed according to your advice and the test are all fine,
however, the console throws exception:
78546 WARN [main] org.hibernate.impl.SessionFactoryObjectFactory
- Could not unbind factory from JNDI
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext
(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx
(InitialContext.java:284)
at javax.naming.InitialContext.unbind(InitialContext.java:375)
at org.hibernate.impl.SessionFactoryObjectFactory.removeInstance
(SessionFactoryObjectFactory.java:139)
at org.hibernate.impl.SessionFactoryImpl.close
(SessionFactoryImpl.java:894)
at
com.wideplay.warp.persist.hibernate.HibernatePersistenceService.shutdown
(HibernatePersistenceService.java:52)
at com.novionic.delphIL.ext.JUnitWorkManager.endWork
(JUnitWorkManager.java:22)
at com.novionic.delphIL.service.ILGroupServiceTest.tearDown
(ILGroupServiceTest.java:32)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run
(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run
(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
(RemoteTestRunner.java:197)
Any particular reason for this error?
On Sep 28, 10:24 am, "Dhanji R. Prasanna" <
dha...@gmail.com> wrote:
> No you don't need to. The only change you need to make to your original
> config to make it work is inject WorkManager.class into JUnitWorkManager and
> beginWork()/endWork() in addition to start() and shutdown().
> Dhanji.
>