Issue 16110

Fix clb mybatis multimedia mapper NPE

16110
Reporter: mdoering
Type: Bug
Summary: Fix clb mybatis multimedia mapper NPE
Priority: Critical
Resolution: Fixed
Status: Closed
Created: 2014-07-11 17:47:12.504
Updated: 2015-12-14 19:00:49.358
Resolved: 2015-12-14 19:00:49.339
        
Description: Seeing this in clb-ws logs:


ERROR [2014-07-11 17:14:37,863+0200] [http-bio-8080-exec-656] org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/b_checklistbank-ws].[default]: Servlet.service() for servlet [default] in context with path [/b_checklistbank-ws] threw exception
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.NullPointerException
### The error may exist in org/gbif/checklistbank/service/mybatis/MultimediaMapper.xml
### The error may involve org.gbif.checklistbank.service.mybatis.MultimediaMapper.listByNubUsage-Inline
### The error occurred while setting parameters
### SQL: SELECT i.usage_fk,      i.id, i.url, i.link, i.title, i.description, i.license, i.creator, i.created, i.publisher      FROM      image i       JOIN nub_rel rel ON i.usage_fk=rel.usage_fk       WHERE rel.nub_fk=?     ORDER BY i.rating, i.id      LIMIT ? OFFSET ?
### Cause: java.lang.NullPointerException
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) ~[mybatis-3.2.3.jar:3.2.3]
]]>