Hi, I was trying to use PageTester, I got this problem:
the TestServiceImpl is a service injected in the test page, it will be called from there, but the ApplicationGlobals in the service does not work under PageTester, works in a normal web app, maybe I have to mock an ApplicationGlobals? then, how to do that? any idea? thanks. A.C. public class TestServiceImpl implements TestService { final private ApplicationGlobals globals; public TestServiceImpl(ApplicationGlobals globals) { this.globals = globals; String temp = globals.getServletContext().getServerInfo(); // this line cause errors below } public void hello() { System.out.println("hello"); } } [ERROR] TestService Construction of service TestService failed: Error invoking constructor org.bfe.istudio.t5.TestServiceImpl(ApplicationGlobals) (at TestServiceImpl.java:14) (for service 'TestService'): java.lang.NullPointerException java.lang.RuntimeException: Error invoking constructor org.sample.t5.TestServiceImpl(ApplicationGlobals) (at TestServiceImpl.java:14) (for service 'TestService'): java.lang.NullPointerException at org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62) -- View this message in context: http://www.nabble.com/T5-PageTester-and-ApplicationGlobals-tp15652400p15652400.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]