Jump to content

jmtulli

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by jmtulli

  1. Sure I can!

    The problem was not in the connection itself, but how I was connecting.

    • Before, I was trying to get the connection in the static initialization block, and then trying to perform a query on the DB. But this wasn't working, and when I try the query I got nullpointer exception, bc the connection was null.
    • Now I just created an method to connect, and I call it before perform the query, checking previously that the connection is not null.

     

    Actually I don't really know why this happened, bc using the former way in my localhost (but connecting to remote DB) it worked...

  2. Remote mysql is already set up. The problem is probably on the end of whatever that thing is that is trying to connect to the database. What is the exact error?

    Hi. I don't know the exact error. This is what I got:

    Type Exception Report
    
    Description The server encountered an unexpected condition that prevented it from fulfilling the request.
    
    Exception
    
    java.lang.NullPointerException
    	tulli.jm.dao.UserDAO.findByName(UserDAO.java:20)
    	tulli.jm.servlets.LoginServlet.doPost(LoginServlet.java:21)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Note The full stack trace of the root cause is available in the server logs.
    

    My question is: how can I see the server logs to track the root cause?

     

    Thanks for your help!

×
×
  • Create New...