| Author |
Connection to an Oracle database fails
|
Peter Hammar
Ranch Hand
Joined: Mar 01, 2010
Posts: 34
|
|
This is in my properties file:
I only get my Something is wrong message. Do I need anything more then the above?
Regards
H
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Why don't you print the exception message? "Something is wrong" does not give us a lot of info.
You don't show us where and how you create the connection.
|
OCUP UML fundamental
ITIL foundation
|
 |
Peter Hammar
Ranch Hand
Joined: Mar 01, 2010
Posts: 34
|
|
I get this from printstacktrace:
The connection?
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
The exception tells you at what line of the code the error is.
Note: it is a general Java issue (a null pointer exception), not a database issue.
|
 |
Peter Hammar
Ranch Hand
Joined: Mar 01, 2010
Posts: 34
|
|
The application runs fine if I run it in offline mode; no database connection. The errors are thrown when trying to connect to the database.
Line of code that it don't like when in online mode:
= at pall.PaLLmeny.<init>(PaLLmeny.java:80)
Thoughts?
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Peter Hammar wrote:...
Thoughts?
Some variable is null, and something in your code does not like that that variable is null.
|
 |
Karthik Jayachandran
Ranch Hand
Joined: Feb 18, 2009
Posts: 36
|
|
|
If you are using an IDE like Eclipse, use the debugger. You will know where the exception is throwing.
|
 |
 |
|
|
subject: Connection to an Oracle database fails
|
|
|