I have a weird situation from my APP on JBoss. When I deploy my WAR onto JBoss, service availability tests will pass. But after it have went through some heavily throughput of requests, it will start to reply null pointer exceptions from my App's "return" point on some requests(~8% perhaps). Service would go back to normal if I restart the JBoss for a while until another heavily throughputs have come.
11:23:51,229 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/MyAPP].[Main]] JBWEB000236 NullPointerException
at com.Controller.Main.Signup (Main.java:211) [classes:]
...
After tracing the source code, that line number indicated to a return point at end of functiion
class Main extends BaseServlet{
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
String retMsg = "";
switch(req.getParameter("Method")){
case "signup":
retMsg = SignUp();
}
}
private String Signup(){
// do signup things
return ReturnCode.Success;// this is line 221 and where the exception is point to
}
}
ReturnCode class
class ReturnCode{
static final public String Success = "00";
// other return code defines below
}
Since the server log only indicate to here with error message [classes:], I don't know why but guess if it somehow have some error like lost the ReturnCode class definition from JVM heap or what. Can anyone tell me what is it happening on here?
Using JVM: 1.8_71