jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Kreutzer <g.kreut...@kreutzersoft.de>
Subject NPE at Getting Started tutorial
Date Sat, 31 Aug 2002 08:58:29 GMT
Hi,

I'm new to Cactus, so I'm trying the "20 minutes tutorial" linked at the 
Getting Started documentation.

I use J2SDK 1.4.0 and tomcat 4.0.4 on Win2K prof. SP3.

Running the test (tutorial step 5) fails with a NPE (same as in thread 
"help with Tomcat howto" at TestSampleServlet #beginSaveToSessionOK() 
(see the following trace). Deleting the addParameter() statement brings 
the same result.

What's going wrong? Can anybody help?

thanks
Gerhard

Here is the log4j trace from cactus-client.log:

10:06:35,325 [HttpProcessor[8080][4]] DEBUG runner.ServletTestRunner 
     - <doGet([org.apache.catalina.connector.HttpRequestFacade@e49dcd], 
[org.apache.catalina.connector.HttpResponseFacade@343ed0])
10:06:35,335 [HttpProcessor[8080][4]] DEBUG runner.ServletTestRunner 
     - <run([TestSampleServlet], [null])
10:06:35,355 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - <setXslFileName([null])
10:06:35,355 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - >setXslFileName
10:06:35,355 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - <setSuiteClassName([TestSampleServlet])
10:06:35,355 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - >setSuiteClassName
10:06:35,375 [HttpProcessor[8080][4]] DEBUG runner.WebappTestSuiteLoader 
    - <load([TestSampleServlet])
10:06:35,385 [HttpProcessor[8080][4]] DEBUG util.ClassLoaderUtils 
     - <loadClass([TestSampleServlet], [class 
org.apache.cactus.server.runner.WebappTestSuiteLoader])
10:06:35,395 [HttpProcessor[8080][4]] DEBUG util.ClassLoaderUtils 
     - <loadClassFromWebappClassLoader([TestSampleServlet], [class 
org.apache.cactus.server.runner.WebappTestSuiteLoader])
10:06:35,395 [HttpProcessor[8080][4]] DEBUG util.ClassLoaderUtils 
     - <loadClassFromContextClassLoader([TestSampleServlet])
10:06:35,435 [HttpProcessor[8080][4]] DEBUG util.ClassLoaderUtils 
     - >loadClassFromContextClassLoader = [class TestSampleServlet]
10:06:35,435 [HttpProcessor[8080][4]] DEBUG util.ClassLoaderUtils 
     - >loadClass = [class TestSampleServlet]
10:06:35,435 [HttpProcessor[8080][4]] DEBUG runner.WebappTestSuiteLoader 
    - >load = [class TestSampleServlet]
10:06:35,475 [HttpProcessor[8080][4]] DEBUG util.JUnitVersionHelper 
     - <getTestCaseName([testSaveToSessionOK(TestSampleServlet)])
10:06:35,475 [HttpProcessor[8080][4]] DEBUG util.JUnitVersionHelper 
     - >getTestCaseName = [testSaveToSessionOK]
10:06:35,485 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - <startTest([testSaveToSessionOK(TestSampleServlet)])
10:06:35,485 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - >startTest
10:06:35,495 [HttpProcessor[8080][4]] DEBUG TestSampleServlet 
     - ------------- Test: testSaveToSessionOK
10:06:35,505 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - <addParameter([testparam], [it works!])
10:06:35,505 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - <addParameter([testparam], [it works!], [GET])
10:06:35,505 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - >addParameter
10:06:35,505 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - >addParameter
10:06:35,505 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - <addParameter([Cactus_TestClass], [TestSampleServlet], [GET])
10:06:35,515 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - >addParameter
10:06:35,515 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - <addParameter([Cactus_TestMethod], [testSaveToSessionOK], [GET])
10:06:35,525 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - >addParameter
10:06:35,525 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - <addParameter([Cactus_AutomaticSession], [true], [GET])
10:06:35,525 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - >addParameter
10:06:35,525 [HttpProcessor[8080][4]] DEBUG client.ServletHttpClient 
     - <doTest([simulation URL = [null], automatic session = [true], 
cookies = [], headers = [], GET parameters = [[[Cactus_TestMethod] = 
[[testSaveToSessionOK]]][[Cactus_TestClass] = 
[[TestSampleServlet]]][[testparam] = [[it 
works!]]][[Cactus_AutomaticSession] = [[true]]]], POST parameters = []])
10:06:35,535 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - <addParameter([Cactus_Service], [CALL_TEST], [GET])
10:06:35,535 [HttpProcessor[8080][4]] DEBUG cactus.WebRequest 
     - >addParameter
10:06:35,555 [HttpProcessor[8080][4]] DEBUG TestSampleServlet 
     - Exception in test
java.lang.NullPointerException
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:659)
	at 
org.apache.cactus.util.ClassLoaderUtils.loadPropertyResourceBundle(ClassLoaderUtils.java;org/apache/cactus/util/log/LogAspect.java(1k):153)
	at org.apache.cactus.util.Configuration.initialize(Configuration.java:140)
	at 
org.apache.cactus.util.ServletConfiguration.getServletRedirectorURL(ServletConfiguration.java:86)
	at 
org.apache.cactus.client.ServletHttpClient.getRedirectorURL(ServletHttpClient.java:87)
	at 
org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.java(1k):184)
	at 
org.apache.cactus.client.AbstractHttpClient.dispatch2_doTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.java(1k):109)
	at 
org.apache.cactus.client.AbstractHttpClient.around2_doTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.java(1k):1218)
	at 
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.java;org/apache/cactus/util/log/LogAspect.java(1k):104)
	at 
org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase.java:260)
	at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
	at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:195)
	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:131)
	at junit.framework.TestSuite.runTest(TestSuite.java:173)
	at junit.framework.TestSuite.run(TestSuite.java:168)
	at 
org.apache.cactus.server.runner.ServletTestRunner.dispatch92_run(ServletTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):161)
	at 
org.apache.cactus.server.runner.ServletTestRunner.around92_run(ServletTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):1218)
	at 
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):137)
	at 
org.apache.cactus.server.runner.ServletTestRunner.dispatch91_doGet(ServletTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):121)
	at 
org.apache.cactus.server.runner.ServletTestRunner.around91_doGet(ServletTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):1149)
	at 
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.java;org/apache/cactus/util/log/LogAspect.java(1k):101)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
	at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
	at java.lang.Thread.run(Thread.java:536)
10:06:35,585 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - <addError([testSaveToSessionOK(TestSampleServlet)], 
[java.lang.NullPointerException])
10:06:35,595 [HttpProcessor[8080][4]] DEBUG runner.XMLFormatter 
     - <replace([null], [&], [&amp;])


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message