IBM Support

Call to servlet API of the component test servlet results in a NullPointerException

Troubleshooting


Problem

A component test project can be deployed to IBM WebSphere Process Server, and can be invoked through a web service interface (see http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp?topi…) . Often a call to the servlet API of the component test servlet results in a NullPointerException.

Symptom

This sample shows a SCA module 'simpleProject' and a test module 'simpleTest':



After the test module was deployed to WebSphere Process Server you can try to access the test project from a web browser by calling "http://127.0.0.1:9080/simpleTestWeb/TestServlet" you may get the exception below in the console view:

[6/14/10 11:53:22:735 CEST] 000000d2 E UOW=null source=com.ibm.ws.webcontainer.webapp.WebApp org=IBM prod=WebSphere component=Application Server thread=[WebContainer : 5]
[Servlet Error]-[TestServlet]: com.ibm.wbit.comptest.common.tc.utils.TestRuntimeException
at com.ibm.wbit.comptest.ct.runtime.runner.CTJUnitRunner.loadTestScope(Unknown Source)
at com.ibm.wbit.comptest.ct.runtime.runner.CTJUnitRunner.initialize(Unknown Source)
at com.ibm.wbit.comptest.ct.runtime.runner.CTJUnitRunner.test(Unknown Source)
at com.ibm.wbit.comptest.ct.servlet.TestServlet.invokeTestBean(Unknown Source)
at com.ibm.wbit.comptest.ct.servlet.TestServlet.doPost(Unknown Source)
at com.ibm.wbit.comptest.ct.servlet.TestServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1096)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:570)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.lang.NullPointerException
... 28 more

Cause

When a test suite has a lower case name, and an EAR is exported, you will hit this problem. The reason this happens is because we generate a corresponding Java class whose first letter is uppercase, but we don't make the test suite upper case.

Resolving The Problem

If you create a name for a test suite avoid to use names starting with a lower case. If the problem already exist, rename the existing test suite ( Refactor > Rename ).

This issue will be fixed with APAR JR37083.

[{"Product":{"code":"SSQQFK","label":"WebSphere Integration Developer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Test and deployment tools","Platform":[{"code":"PF033","label":"Windows"}],"Version":"6.2.0.3;6.2.0.2;6.2.0.1;6.2;6.1.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSQQFK","label":"WebSphere Integration Developer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Test and deployment tools","Platform":[{"code":"PF033","label":"Windows"}],"Version":"6.2.0.3;6.2.0.2;6.2.0.1;6.2;6.1.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

More support for:
WebSphere Integration Developer

Software version:
6.2.0.3, 6.2.0.2, 6.2.0.1, 6.2, 6.1.2

Operating system(s):
Windows

Document number:
139487

Modified date:
15 June 2018

UID

swg21439942

Manage My Notification Subscriptions