When setting the properties for an AS400JDBCDataSource, the password in the properties object is not being used.
The exception looks like the following.
java.lang.NullPointerException: password
at com.ibm.as400.access.AS400.checkPasswordNullAndLength(AS400.java:4860)
at com.ibm.as400.access.AS400.setPassword(AS400.java:4267)
at com.ibm.as400.access.AS400JDBCDataSource.setPassword(AS400JDBCDataSource.java:3594)
at com.ibm.as400.access.AS400JDBCDataSource.setProperties(AS400JDBCDataSource.java:3836)
The problem can be created by using the following.
When setting the properties for an AS400JDBCDataSource, the password in the properties object is not being used.
The exception looks like the following.
java.lang.NullPointerException: password at com.ibm.as400.access.AS400.checkPasswordNullAndLength(AS400.java:4860) at com.ibm.as400.access.AS400.setPassword(AS400.java:4267) at com.ibm.as400.access.AS400JDBCDataSource.setPassword(AS400JDBCDataSource.java:3594) at com.ibm.as400.access.AS400JDBCDataSource.setProperties(AS400JDBCDataSource.java:3836)
The problem can be created by using the following.
java -jar jt400.jar jdbc:as400:somehost userid password !PRINTSTACKTRACE true !setnewvar properties=java.util.Properties() !setnewvar dataSource = com.ibm.as400.access.AS400JDBCConnectionPoolDataSource() !callmethod properties.put("user", userid) !callmethod properties.put("password", password) !callmethod dataSource.setProperties(properties)