[ https://issues.apache.org/jira/browse/DRILL-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Altekruse resolved DRILL-4128. ------------------------------------ Resolution: Fixed Assignee: Jason Altekruse Fixed in 1b96174b1e5bafb13a873dd79f03467802d7c929 > null pointer at > org.apache.drill.exec.vector.accessor.AbstractSqlAccessor.getString(AbstractSqlAccessor.java:101) > ----------------------------------------------------------------------------------------------------------------- > > Key: DRILL-4128 > URL: https://issues.apache.org/jira/browse/DRILL-4128 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC > Affects Versions: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0 > Reporter: Devender Yadav > Assignee: Jason Altekruse > Priority: Blocker > Fix For: 1.5.0 > > > While fetching data from ResultSet in JDBC. I got the null pointer. Details - > java.lang.NullPointerException > at > org.apache.drill.exec.vector.accessor.AbstractSqlAccessor.getString(AbstractSqlAccessor.java:101) > at > org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getString(BoundCheckingAccessor.java:124) > at > org.apache.drill.jdbc.impl.TypeConvertingSqlAccessor.getString(TypeConvertingSqlAccessor.java:649) > at > org.apache.drill.jdbc.impl.AvaticaDrillSqlAccessor.getString(AvaticaDrillSqlAccessor.java:95) > at > net.hydromatic.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:205) > at > org.apache.drill.jdbc.impl.DrillResultSetImpl.getString(DrillResultSetImpl.java:182) > Below mentioned method is throwing null pointer becaue getObject(rowOffset) > returns null for null values & null.toString() is throwing null pointer. > @Override > public String getString(int rowOffset) throws InvalidAccessException{ > return getObject(rowOffset).toString(); > } > It should be like: > @Override > public String getString(int rowOffset) throws InvalidAccessException{ > return getObject(rowOffset)==null? null:getObject(rowOffset).toString(); > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)