Forums Register Login

Exception coming while connecting to database

+Pie Number of slices to send: Send
for the following code

i 'm getting following ouput
"Connection Pooling Example.
A general Exception has occured!null "

why the above exception is coming?

+Pie Number of slices to send: Send
Could be the problem of extracting the parameters from the request. what printStackTrace() is printed? Try to print "e" as it is when e.getMessage() is null. Debug would be the best option to find the exact problem you encountered.
+Pie Number of slices to send: Send
Check the stack trace.

Regards
Santhosh
+Pie Number of slices to send: Send
The very first chance of getting the null value is at the following location in your code



If the request does not contain the parameter P_ID, then the above code will throw a NPE.
Also why are you calling toString() on a string ??
Does not make sense.
+Pie Number of slices to send: Send
The following sql seems to be incorrect. Do you want to do update or insert?

This tiny ad is guaranteed to be gluten free.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1303 times.
Similar Threads
cannot find symbol
SQLException
Data source name not found and no default driver specified
Exception in thread "main" java.lang.NoClassDefFoundError:
else loop not working
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:05:47.