In your unit tests, you must call Boot.scala or alternatively, execute the set-up code in Boot.scala in order to set up the RDBMS connections, etc.
On Mon, Nov 9, 2009 at 5:37 PM, sunanda <sunanda.pa...@gmail.com> wrote: > > Hi, > I have set the unitils properties for h2 database. > I am getting the following error message for the unit test. > Can anyone tell me what am I missing? > Thanks. > Sunanda > > > java.lang.NullPointerException: Looking for Connection Identifier > ConnectionIdentifier(lift) but failed to find either a > JNDI data source with the name lift or a lift connection manager with > the correct name > at net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$7.apply(DB.scala: > 95) > at net.liftweb.mapper.DB$$anonfun$3$$anonfun$apply$7.apply(DB.scala: > 95) > at net.liftweb.util.EmptyBox.openOr(Box.scala:372) > at net.liftweb.mapper.DB$$anonfun$3.apply(DB.scala:95) > at net.liftweb.mapper.DB$$anonfun$3.apply(DB.scala:95) > at net.liftweb.util.EmptyBox.openOr(Box.scala:372) > at net.liftweb.mapper.DB$.newConnection(DB.scala:89) > at net.liftweb.mapper.DB$.getConnection(DB.scala:136) > at net.liftweb.mapper.DB$.use(DB.scala:303) > at net.liftweb.mapper.KeyedMetaMapper$class.findDb(MetaMapper.scala: > 1397) > at net.irisinteractive.brandnet.gridxml.model.GridConfig$.findDb > (GridConfig.scala:69) > at net.liftweb.mapper.KeyedMetaMapper$class.findDb(MetaMapper.scala: > 1393) > at net.irisinteractive.brandnet.gridxml.model.GridConfig$.findDb > (GridConfig.scala:69) > at net.liftweb.mapper.KeyedMetaMapper$class.find(MetaMapper.scala: > 1390) > at net.irisinteractive.brandnet.gridxml.model.GridConfig$.find > (GridConfig.scala:69) > at > > net.irisinteractive.brandnet.gridxml.snippet.GridConfigRegistry.getGridConfiguration > (GridConfigRegistry.scala:20) > at > > net.irisinteractive.brandnet.gridxml.test.GridXmlComputationService.getGridXml > (GridXmlComputationService.scala:28) > at net.irisinteractive.brandnet.gridxml.test.TestGridConfig.test1 > (TestGridConfig.java:35) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:66) > at org.junit.internal.runners.MethodRoadie.runTestMethod > (MethodRoadie.java:105) > at org.unitils.UnitilsJUnit4TestClassRunner > $TestListenerInvokingMethodRoadie.runTestMethod > (UnitilsJUnit4TestClassRunner.java:174) > at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java: > 86) > at > org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters > (MethodRoadie.java:94) > at org.unitils.UnitilsJUnit4TestClassRunner > $TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters > (UnitilsJUnit4TestClassRunner.java:156) > at > org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java: > 84) > at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49) > at org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod > (UnitilsJUnit4TestClassRunner.java:95) > at org.junit.internal.runners.JUnit4ClassRunner.runMethods > (JUnit4ClassRunner.java:59) > at org.unitils.UnitilsJUnit4TestClassRunner.access$000 > (UnitilsJUnit4TestClassRunner.java:44) > at org.unitils.UnitilsJUnit4TestClassRunner$1.run > (UnitilsJUnit4TestClassRunner.java:62) > at org.junit.internal.runners.ClassRoadie.runUnprotected > (ClassRoadie.java:34) > at org.junit.internal.runners.ClassRoadie.runProtected > (ClassRoadie.java:44) > at org.unitils.UnitilsJUnit4TestClassRunner.run > (UnitilsJUnit4TestClassRunner.java:68) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run > (JUnit4TestReference.java:46) > 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) > > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---