在Spring Security的java.util.Properties $ LineReader.readLine(Properties.java:418)上获取问题java.lang.NullPointerException

时间:2018-12-20 13:15:57

标签: java spring spring-security

我检查了很多与此相关的东西,但对我来说却无济于事。

SqlRowSet userTypesqlRowSet = jdbcTemplate.queryForRowSet(USER_TYPE_QUERY, parameters);

对于这一行,我得到了错误。

所有事物都在另一个系统上运行。

我已经检查了所有库。

我验证了所有属性。

在下面的错误日志中查找问题。

17:57:33,070 ERROR [stderr] (http-localhost-127.0.0.1-18080-1) java.lang.NullPointerException
17:57:33,070 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at java.util.Properties$LineReader.readLine(Properties.java:418)
17:57:33,070 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at java.util.Properties.load0(Properties.java:337)
17:57:33,086 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at java.util.Properties.load(Properties.java:325)
17:57:33,086 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:111)
17:57:33,086 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at com.sun.rowset.JdbcRowSetResourceBundle.<init>(Unknown Source)
17:57:33,086 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(Unknown Source)
17:57:33,102 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at com.sun.rowset.CachedRowSetImpl.<init>(Unknown Source)
17:57:33,102 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.newCachedRowSet(SqlRowSetResultSetExtractor.java:78)
17:57:33,102 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.createSqlRowSet(SqlRowSetResultSetExtractor.java:62)
17:57:33,117 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.extractData(SqlRowSetResultSetExtractor.java:46)
...

17:57:33,336 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
17:57:33,351 ERROR [stderr] (http-localhost-127.0.0.1-18080-1)  at java.lang.Thread.run(Thread.java:662)
17:57:33,351 ERROR [stderr] (http-localhost-127.0.0.1-18080-1) org.springframework.security.authentication.AuthenticationServiceException: Error in loading user ,Please contact system Admin

1 个答案:

答案 0 :(得分:1)

我在项目中使用了com.sun.rowset.jar文件。

此jar默认适用于美国英语位置和语言。

所以我为我的系统更新了上面的内容。

现在它可以正常工作了。