Solved

Null pointer exception connecting to DB

Posted on 2011-09-12
2
259 Views
Last Modified: 2012-05-12
We have server side Java code from a third party, and are trying to connect it to our database.  The third party provided a jar file for their proprietary database code, and we have included that within the project's build path.  The project compiles correctly, but at runtime we are getting a null pointerexception when trying to call any functions from within the jar file.  Is there something else that we should do so that the Java code can access the jar file?
0
Comment
Question by:anotherfn
2 Comments
 
LVL 12

Accepted Solution

by:
mwochnick earned 250 total points
ID: 36523099
there could be a lot of different problems - is their a config file that needs to be in the runtime classpath, are there missing configuration parameters that it needs, etc.  Its hard to tell without more info.  Please post the stack trace and any error messages, it would also be useful to know what the db is (vendor and version) and the third party jar (vendor and version)
0
 
LVL 5

Assisted Solution

by:DerZauberer
DerZauberer earned 250 total points
ID: 36523106
Is your app a web app running in a servlet container? Make sure to include the .jar file in your WEB-INF/lib folder and deploy with the application then.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now