0

I am using tomcat run my vaadin web application It throws below errors

I am pretty new to tomcat and servlet.

Jun 24, 2016 1:33:11 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [MyUIServlet] in context with path [] threw exception [com.vaadin.server.ServiceException: java.lang.NullPointerException] with root cause
java.lang.NullPointerException

It seems like the servlet cannot get the query result. My jsp file is empty. What should I do?

Below is my web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="vaadin-examples" version="3.0"
         xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

    <servlet>
        <servlet-name>MyUIServlet</servlet-name>
        <servlet-class>com.jetbrains.MyUI$MyUIServlet</servlet-class>
        <init-param>
            <param-name>UI</param-name>
            <param-value>com.jetbrains.MyUI</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>MyUIServlet</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
</web-app>
Haifeng Zhang
  • 30,077
  • 19
  • 81
  • 125
  • Vaadin / JSP ? It's one othe the other. There must be some stacktrace on your tomcat server. When you have this, then show your code – André Schild Jun 24 '16 at 20:54
  • try to share your servlet and jsp code to see from where the NPE is coming – PacMan Jun 24 '16 at 20:58
  • THANKS A MILLION for your replies. I have found the issue. It is tomcat7 and mysql-connector-java compatible issue. I quoted the helped answer and post the link as an answer here. – Haifeng Zhang Jun 24 '16 at 21:09

1 Answers1

0

Check this link mysql issue

It is version compatible issue for mysql and tomcat 7

Community
  • 1
  • 1