Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7682971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:41:23+00:00 2026-05-31T18:41:23+00:00

I am trying to run a web application that gets a specific length of

  • 0

I am trying to run a web application that gets a specific length of numbers from a user and checks that against a database (so if the user made a typo, it will makes suggestions as to what key the user actually meant). The problem I am running into is the application won’t connect to the database, I get this error:


java.lang.NullPointerException
at Validator.Validate.checkIDs(Validate.java:410)
at Validator.Validate.getAllValidIds(Validate.java:203)
at Python.WebServlet.processRequest(WebServlet.java:70)
at Python.WebServlet.doPost(WebServlet.java:247)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)


Line 410 in Validator.Validate is:

Statement stmt = Conn.createStatement();

Where Conn is a java.sql.Connection variable

Line 203 is a call to the method that does the ^ statement


java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at Validator.Validate.dbConnect(Validate.java:394)
at Validator.Validate.getAllValidIds(Validate.java:193)
at Python.WebServlet.processRequest(WebServlet.java:70)
at Python.WebServlet.doPost(WebServlet.java:247)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)


This is the error I get on my server, if I run it on my local machine it works just fine (it validates the ID). What could be the problem here? Cannot it not locate the com.mysql.jdbc.Driver class? Is that class the issue?

Thanks for the advice/help in advance!

NOTE:

The Validator class is an external jar that is in my class path. It calls on another jar in its class path the contains the com.mysql.jdbc classes, as you can see in the following pictures

Libraries currently in my netbeans project


The BugValidator jar contains the mysql-connector jar which has the Drivers class

Contents of the BugValidator jar


Contents of mysql-connector-java-5.1.7-bin.jar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:41:24+00:00Added an answer on May 31, 2026 at 6:41 pm

    From this:

    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    

    It’s pretty clear that you don’t have the MySQL driver on your ClassPath. Somewhere in your project, you should have the jar that contains the MySQL driver. If you don’t, then you either need to download it to your lib directory, or set up a Maven dependency to it, depending on how your projects dependencies are being handled.

    EDIT: In response to your update. All your screenshot shows is that everything is set up fine for compilation within your IDE. But we still don’t know where you are running your application from that’s giving you this stack trace.

    Are you running your app from inside your IDE and getting the stack trace from the console? Are you running it after it’s been packaged and seeing the stack trace in some logs?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run a batch file, as another user, from my web app.
I am getting an error when trying to run my web application from IIS
I am trying to design an ASP.net based mobile web application that should run
I'm trying to run my web application on tomcat v6, I was testing it
I'm trying to run an ASP.NET MVC 2 web application under IIS on Windows
I am trying to build a web application that requires users to register themselves.
I am trying to run web application scripted in PHP on windows server 2008.
I am trying to run a .NET 4.0 Console application that references a sister
I am making a data intensive web application that I am trying to optimize.
I have a Web Application that I received from another developer, when I first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.