General error: "java.lang.NullPointerException" while executing update statement on H2 table

418 views
Skip to first unread message

Manik Dhawan

unread,
Dec 21, 2012, 2:59:00 AM12/21/12
to h2-da...@googlegroups.com
Hi,

I am getting the below error while trying to update one our tables in H2 Database. We are using H2 version : 1.3.161.
The problem comes often and is not reproducible.

 Error while executing query 'update LocatorForward set MACAddress='e8e732:194828',SwitchIPAddress='10.255.221.152',LinkCount='0',linkIpAddr='',TimeStmp='2012-12-19 21:01:39.852',IfIndex='0',Slot='1',Port='1001',VlanID='221',IfSpeed='-1',IfAdminStatus='-1',PortDuplexMode='-1',userid=NULL,domain='0',disposition='1',unp='',classsource='0',serviceId='0',isid='0',Chassis='1' where MACAddress='e8e732:194828' and SwitchIPAddress='10.255.221.152' and VlanID='221''.  General error: "java.lang.NullPointerException" [50000-161].

org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-161]        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)         at org.h2.message.DbException.get(DbException.java:158)              at org.h2.message.DbException.convert(DbException.java:281)     at org.h2.message.DbException.toSQLException(DbException.java:254)    at org.h2.message.TraceObject.logAndConvert(TraceObject.java:368)        at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:154)   at



The same statement runs perfectly fine from DBVisualizer console.

Can anyone help please.

-Manik



Noel Grandin

unread,
Jan 2, 2013, 9:42:24 AM1/2/13
to h2-da...@googlegroups.com, Manik Dhawan
You've removed part of the stacktrace, so I can't tell you what is wrong.

Manik Dhawan

unread,
Jan 2, 2013, 8:39:36 PM1/2/13
to h2-da...@googlegroups.com, Manik Dhawan
Here you go

19 Dec 2012 21:01:40 ERROR : [In forward, switch 10.255.221.152]:  Error while executing query 'update LocatorForward set MACAddress='e8e732:194828',SwitchIPAddress='10.255.221.152',LinkCount='0',linkIpAddr='',TimeStmp='2012-12-19 21:01:39.852',IfIndex='0',Slot='1',Port='1001',VlanID='221',IfSpeed='-1',IfAdminStatus='-1',PortDuplexMode='-1',userid=NULL,domain='0',disposition='1',unp='',classsource='0',serviceId='0',isid='0',Chassis='1' where MACAddress='e8e732:194828' and SwitchIPAddress='10.255.221.152' and VlanID='221''.  General error: "java.lang.NullPointerException" [50000-161].

org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-161]        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)         at 

org.h2.message.DbException.get(DbException.java:158)              at 

org.h2.message.DbException.convert(DbException.java:281)     at 

org.h2.message.DbException.toSQLException(DbException.java:254)    at 

org.h2.message.TraceObject.logAndConvert(TraceObject.java:368)        at 

org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:154)   at 

com.ov1.services.shared.XYDatabaseConnection.executeQuery(Unknown Source)          at com.ov1.services.shared.XYDatabaseConnection.xySQLProcessQuery(Unknown Source)              at com.ov1.services.shared.XYDatabaseConnection.processQueryAndRelease(Unknown Source)  at com.ov1.services.shared.XYDatabaseConnection.modValue(Unknown Source)  at 

com.ov1.locator.server.LocatorDBServer.saveForwardCollection(Unknown Source)         at com.ov1.locator.server.LocatorDBServer.saveForwardCollectionUpdateTimeStamp(Unknown Source)   at com.ov1.locator.server.NetForwardDiscoveryUpdater.getAosTable(Unknown Source)   at 

om.ov1.locator.server.NetForwardDiscoveryUpdater.getAosTable(Unknown Source)   at 

com.ov1.locator.server.NetForwardDiscoveryUpdater.getTable(Unknown Source)           at com.ov1.locator.server.NetForwardDiscoveryUpdater.updateCachedInfo(Unknown Source)      at 

com.ov1.services.server.DiscoveryList2.updateCachedInfo(Unknown Source)     at 

com.ov1.services.server.DiscoveryList2.privateUpdate(Unknown Source)             at com.ov1.services.server.DiscoveryList2$PollSwitchesTaskPerformer.performTask(Unknown Source)       at 

com.ov1.util.shared.TaskInfo.performTask(Unknown Source)     at 

com.ov1.util.shared.TaskQueue$TaskQueuePerformer.performTask(Unknown Source) at 

com.ov1.util.shared.TaskInfo.performTask(Unknown Source)     at 

com.ov1.util.shared.ThreadPoolWorkThread.run(Unknown Source)

Caused by: java.lang.NullPointerException   at org.h2.jdbc.JdbcStatement.setExecutingStatement(JdbcStatement.java:971)    at 

org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:167)   at 

org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)

Noel Grandin

unread,
Jan 3, 2013, 1:36:00 AM1/3/13
to h2-da...@googlegroups.com, Manik Dhawan
This bug was fixed about 8 versions ago.

Manik Dhawan

unread,
Jan 4, 2013, 8:23:21 AM1/4/13
to h2-da...@googlegroups.com, Manik Dhawan
Thanks Noel..will try out 1.3.169.
Reply all
Reply to author
Forward
0 new messages