Solved

Null pointer exception connecting to DB

Posted on 2011-09-12
2
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb mdb examples 1 39
MySqli Real Escape String and SQL Injection 1 83
MySQL stored procedure returning null values 4 37
Add a date range function to PDF Generation 9 41
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

738 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