Solved

Null pointer exception connecting to DB

Posted on 2011-09-12
2
261 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

930 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

14 Experts available now in Live!

Get 1:1 Help Now