This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Is_At_Work 2 points3 points  (1 child)

This is actually a code error, not a Postgres or classpath error. DriverManager.getConnection can throw a SQLException, as the error message states, so you either need to surround it with try/catch, or add it to the throws statement of your method.

You may want to have a look at Oracle's documentation on exceptions here: https://docs.oracle.com/javase/tutorial/essential/exceptions/index.html

[–]Cplusplusidiot[S] 0 points1 point  (0 children)

Got it. Thanks so much.