Connecting to Database URL = jdbc:postgresql:template1 Exception caught. java.lang.IllegalArgumentException: Argument # > Arg length java.lang.IllegalArgumentException: Argument # > Arg length at java.text.MessageFormat.format(MessageFormat.java) at java.text.MessageFormat.format(MessageFormat.java) at java.text.MessageFormat.format(MessageFormat.java) at postgresql.util.PSQLException.translate(PSQLException.java:83) at postgresql.util.PSQLException.<init>(PSQLException.java:45) at postgresql.Driver.connect(Driver.java:108) at java.sql.DriverManager.getConnection(DriverManager.java:83) at java.sql.DriverManager.getConnection(DriverManager.java:126) at example.basic.<init>(basic.java:32) at example.basic.main(basic.java:171) [postgres@linux jdbc]$
DriverManager.initialize: jdbc.drivers = null JDBC DriverManager initialized registerDriver: driver[className=postgresql.Driver,context=null,postgresql.Driver@80aadf8] Connecting to Database URL = jdbc:postgresql:template1 DriverManager.getConnection("jdbc:postgresql:template1") trying driver[className=postgresql.Driver,context=null,postgresql.Driver@80aadf8] -- listing properties -- password=postgres Protocol=postgresql user=postgres PGDBNAME=template1 Using postgresql.jdbc1.Connection Exception caught. java.lang.NullPointerException: java.lang.NullPointerException: at java.io.Writer.write(Writer.java) at java.io.PrintStream.write(PrintStream.java) at java.io.PrintStream.print(PrintStream.java) at java.io.PrintStream.println(PrintStream.java) at java.lang.Throwable.printStackTrace(Throwable.java) at java.sql.SQLException.<init>(SQLException.java:102) at postgresql.util.PSQLException.<init>(PSQLException.java:42) at postgresql.Driver.connect(Driver.java:108) at java.sql.DriverManager.getConnection(DriverManager.java:83) at java.sql.DriverManager.getConnection(DriverManager.java:126) at example.basic.<init>(basic.java:32) at example.basic.main(basic.java:171) [postgres@linux jdbc]$