0

Zats and JPA

asked 2014-01-23 15:19:53 +0800

InfoSec812 gravatar image InfoSec812
96

I am trying to place a database enable web application under test. I have used the ZatsEnvironment to set my own WEB-INF directory which should cause my initservlet to create a functional PersistenceUnit and store it in the runtime. When I try to start up the Zats environment, I can see from log output that the initservlet IS getting started, but none of the Hibnernate/JPA initialization appears to be happening! Normally, I would expect to see Hibernate debub message in the output showing that the in-memory test database has been created and I would also see SQL queries printed to the logs. I am seeing none of these things. Could someone speculate as to why? Here's the relevant log excerpts.

2014-01-23 10:05:51 DEBUG InitServlet:30 - ** Initializing servlet container. 2014-01-23 10:05:51 DEBUG InitServlet:33 - ** Persistence Unit should be configured. 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED InitServlet 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:174 - starting zkLoader 2014-01-23 10:05:51 DEBUG WebAppClassLoader:403 - loaded class org.zkoss.zk.ui.http.DHtmlLayoutServlet 2014-01-23 10:05:51 DEBUG WebAppClassLoader:433 - loaded class org.zkoss.zk.ui.http.DHtmlLayoutServlet from [email protected] 2014-01-23 10:05:51 DEBUG Holder:86 - Holding class org.zkoss.zk.ui.http.DHtmlLayoutServlet 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED zkLoader 2014-01-23 10:05:51 DEBUG WebAppContext:439 - postConfigure o.e.j.w.WebAppContext{/,[file:/C:/Users/joseph.phillips/AppData/Local/Temp/jetty.3684729078772868175.tmp.dir/webinf/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/]} with [email protected] 2014-01-23 10:05:51 DEBUG WebAppContext:439 - postConfigure o.e.j.w.WebAppContext{/,[file:/C:/Users/joseph.phillips/AppData/Local/Temp/jetty.3684729078772868175.tmp.dir/webinf/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/]} with [email protected] 2014-01-23 10:05:51 DEBUG WebAppContext:439 - postConfigure o.e.j.w.WebAppContext{/,[file:/C:/Users/joseph.phillips/AppData/Local/Temp/jetty.3684729078772868175.tmp.dir/webinf/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/]} with [email protected] 2014-01-23 10:05:51 DEBUG WebAppContext:439 - postConfigure o.e.j.w.WebAppContext{/,[file:/C:/Users/joseph.phillips/AppData/Local/Temp/jetty.3684729078772868175.tmp.dir/webinf/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/]} with [email protected] 2014-01-23 10:05:51 DEBUG WebAppContext:439 - postConfigure o.e.j.w.WebAppContext{/,[file:/C:/Users/joseph.phillips/AppData/Local/Temp/jetty.3684729078772868175.tmp.dir/webinf/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/]} with [email protected] 2014-01-23 10:05:51 DEBUG WebAppContext:439 - postConfigure o.e.j.w.WebAppContext{/,[file:/C:/Users/joseph.phillips/AppData/Local/Temp/jetty.3684729078772868175.tmp.dir/webinf/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/]} with [email protected] 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED o.e.j.w.WebAppContext{/,[file:/C:/Users/joseph.phillips/AppData/Local/Temp/jetty.3684729078772868175.tmp.dir/webinf/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/, file:/C:/RepositoriesOLD/stewardship/src/main/webapp/]} 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:174 - starting [email protected]469fea 2014-01-23 10:05:51 DEBUG AbstractHandler:52 - starting [email protected]469fea 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED [email protected]469fea 2014-01-23 10:05:51 DEBUG AbstractHandler:52 - starting [email protected] 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED [email protected] 2014-01-23 10:05:51 DEBUG AbstractHandler:52 - starting [email protected] 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:174 - starting qtp2069399799{8<=0<=0/254,-1} 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED qtp2069399799{8<=7<=8/254,0} 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:174 - starting [email protected]:0 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:174 - starting null/null 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED PooledBuffers [0/[email protected],0/[email protected],0/[email protected]]/PooledBuffers [0/[email protected],0/[email protected],0/[email protected]] 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:174 - starting org.eclipse.j[email protected]3e2b050f 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED org.eclipse.j[email protected]3e2b050f 2014-01-23 10:05:51 DEBUG nio:280 - Starting Thread[qtp2069399799-17 Selector1,5,main] on [email protected] 2014-01-23 10:05:51 DEBUG nio:280 - Starting Thread[qtp2069399799-12 Selector0,5,main] on [email protected] 2014-01-23 10:05:51 INFO AbstractConnector:333 - Started [email protected]:64124 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED [email protected]:64124 2014-01-23 10:05:51 DEBUG AbstractLifeCycle:167 - STARTED [email protected] FAILED: testUserLogin java.lang.NullPointerException at com.hps.enterprise.integration.stewardship.StateSingleton.getEntityManager(StateSingleton.java:68) at com.hps.enterprise.integration.stewardship.TestUserLogin.testUserLogin(TestUserLogin.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) at org.testng.TestNG.run(TestNG.java:1057) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-01-23 15:19:53 +0800

Seen: 7 times

Last updated: Jan 23 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More