1

I have an NPE on a Windows 2008 R2 vm guest that seems to be rather annoying and preventing people from using the vm. What's odd is that this wasn't occurring before until I migrated it from Hyper-V to VMware vSphere. It's supposed to load a webapp called 'license' from an MSSQL database called 'license' and apparently didn't function at first because Java was no longer present (had v1.6 and now v1.8). Nevertheless, I installed JRE 1.8.0.66 for use with Tomcat, set the environment variables in a command prompt and then manually started one of the many Apache versions on this host (I just took over this network). This seemed to resolve the issue for the staff and I never heard anything until after a maintenance window did a restart of the host and obviously I didn't make the environment variables persistent.

Now I get an NPE when accessing the host locally, with the following (I can also provide the SQL logs too - which BTW are telling me that a login failed for user 'sa' when I can log in either in mixed or SQL mode with sa just fine. What do you guys suggest I try here? (NPE below and I did look at line 43 of the offending java file listed which just has 'ResultSet rs =null;'

Thx, Brian

type Exception report

message java.lang.NullPointerException

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NullPointerException
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

java.lang.NullPointerException
    org.apache.jsp.licenseAdmin_jsp.displayLicenses(licenseAdmin_jsp.java:43)
    org.apache.jsp.licenseAdmin_jsp._jspService(licenseAdmin_jsp.java:325)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Brian
  • 11
  • 2
  • FYI - a user on Spiceworks posted that I should check line 43 but I guess he missed the last paragraph. So that means I looked at line 43 in the offending java JSP file and found that it's likely a null pointer because it can't connect to the SQL database (I speculate with the JDBC driver). This is most odd because I can connect to the database in SQL SSMS with the 'sa' account just fine. SQL logs indicate a failure of the user 'sa'. But why would this be if I can connect locally with that account to the database in SSMS, to my knowledge - nobody would have changed the JDBC driver either? – Brian Jan 28 '16 at 22:31
  • You would need to show the exceptions of the connection failure instead, if you want any chance to an answer. A very likely cause is that you still use the JDBC 4 driver instead of the JDBC 4.2 driver. IIRC, the SQL Server JDBC 4 driver throws an SQLException when run on Java 7 or higher. – Mark Rotteveel Jan 29 '16 at 07:34
  • I guess what I don't understand is that I installed the latest JRE weeks ago and the application ran file until just last Friday. No NPE's were generated at all with JRE7 so why would that be? – Brian Jan 29 '16 at 15:01
  • Find the root cause, the NPE is just a symptom. – Mark Rotteveel Jan 29 '16 at 16:28
  • Well I hope my reply will help someone who also has a messy DB host to connect to as well. This host had Exchange 2007, with SQL 2000, SQL 2008, SQL Compact and MySQL! It appears that one of the java devs found that the DB was actually using SQL 2000 and not SQL 2008 even though SMSS indicated that the instance was in 2008! The difficulty was the SQL ports are BOTH 1433 when netstat -abo or -ano whatever is used and to complicate matters - the log files were going into the 64-bit directory for SQL 2008! Ugh, I guess that's why the DB allowed JRE8 as the jDTS driver is 1.2.5 perhaps? – Brian Feb 01 '16 at 20:17

0 Answers0