AppD Archive

Uncaught service() exception thrown by servlet Login: java.lang.ExceptionInInitializerError

CommunityUser
Splunk Employee
Splunk Employee

I upgraded WAS sever from v6.1 to V8.5 ,and our application met below error. I am trying to reslove it from last 2 weeks . Please help. All jars are present in the EAR.

If i try to print in the Log class file it shows the config resource file location of Log-4j xml file is not getting the resource file giving null value cuasing Null pointer exception.

------------
private static LogFactory factory;

static {
// Load the configuration information
String resource = "/log4j-cfg.xml"; //expected config file name
System.out.println("inside log class----------");
URL configFileResource = Log.class.getResource(resource);--------> returns NULL
System.out.println("configFileResource ----------"+configFileResource);------->prints null
DOMConfigurator.configure(configFileResource);----------> Throws Null Pointer Exception
System.out.println("after  DOMConfigurator.configure----------");

Server Logs
 \\[10/11/13 7:10:50:814 CDT] 000000b5 SystemOut     O inside log class
[10/11/13 7:10:50:817 CDT] 000000b5 SystemOut     O configFileResource ----------null
[10/11/13 7:10:50:821 CDT] 000000b5 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet Login: java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:250)
at com.mmm.jaf.dal.FrameworkConfigFactory.newInstance(FrameworkConfigFactory.java:202)
at com.mmm.jaf.bol.BusinessObject.<init>(BusinessObject.java:101)
at com.mmm.fass.FASSBusinessObject.<init>(FASSBusinessObject.java:58)
at com.mmm.fass.web.Login.doLoginAction(Login.java:62)
at com.mmm.fass.web.Login.doGet(Login.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3703)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:522)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:311)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:87)
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:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)
Caused by: java.lang.NullPointerException
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:697)
at com.mmm.jaf.utility.Log.<clinit>(Log.java:78)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:228)

 

Tags (1)
0 Karma

Arun_Dasetty
Super Champion

Hi Sonali,

Regarding the error this error seems to due to classpath and  jvm path not properly , refer some realted links:

http://www-01.ibm.com/support/docview.wss?uid=swg1PM27213
https://www.ibm.com/developerworks/community/forums/html/topic?id=d5945014-62e5-494b-a1e5-ab191b2a6e...

http://stackoverflow.com/questions/12603564/error-while-initializing-metro-webservice-client

We would like to inform that this forum meant to address the issues specific to appdynamics lite agent.

From the provided error stack trace it seems the error raised is not due to appdynamics lite agent configured, let us know if any disconnect.

We request you revert back to us if the issue raised due to configuring lite agent on the server and also we see lite agent does not officialy support ibm was 8.5 version

Thanks,

Arun

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...