My desktop client communicates with the server through Hessian.
Clients call search API method to find member by passed string teamId
.
public Member findMemberByTeamId(FeedProvider provider, String teamId)
{
Objects.requireNonNull(provider, "Provider can't be a null");
Objects.requireNonNull(teamId, "Team id can't be a null");
long starttime = System.currentTimeMillis();
logger.debug("Started searching member: provider={}, teamId={}", provider, teamId);
return dao.findMemberByTeamId(provider, teamdId);
}
But I got exception:
[WEB-68] [Service] ERROR Error occurred while downloading member: provider = Hedgehog, teamId = null org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [SELECT * FROM TEAM WHERE ID = ?]; ORA-01722: invalid number ; nested exception is java.sql.SQLSyntaxErrorException:
Inside the logs I found following line:
[WEB-34] [Service] DEBUG Started searching member: provider=Hedgehog, teamId=null
If I connect to my server directly and call search API method with teamId = null
, I get the NPE:
Exception in thread "main" java.lang.NullPointerException: Team id can't be a null
at java.util.Objects.requireNonNull(Objects.java:228)