WebSphere Adapter for JDBC: SetObjectKeys NullPointer Exception
We had a WebSphere Adapter for JDBC export in our module, and it was throwing the following exception:
[5/27/08 17:55:52:315 EDT] 0000006b NUXInResource I PollEventManagerWorker run()
CWYBS0011I: Polling has started. UserAction=No action is required.
[5/27/08 17:55:53:356 EDT] 0000006d NUXInResource E com.ibm.j2ca.extension.eventmanagement.internal.EventSender
getObjectForEvent(Event) EventStore impl
(com.ibm.j2ca.jdbc.inbound.JDBCEventStoreWithXid@6eec3b01)
threw an unexpected and unchecked exception
javax.resource.ResourceException: EventStore impl
(com.ibm.j2ca.jdbc.inbound.JDBCEventStoreWithXid@6eec3b01) threw an
unexpected and unchecked exception
at
com.ibm.j2ca.extension.eventmanagement.internal.EventManager.getObjectForEvent(EventManager.java:658)
at
com.ibm.j2ca.extension.eventmanagement.internal.EventSender.getRecordForEvent(EventSender.java:365)
at
com.ibm.j2ca.extension.eventmanagement.internal.EventSender.doSendEvent(EventSender.java:237)
at
com.ibm.j2ca.extension.eventmanagement.internal.EventSender.sendEvent(EventSender.java:158)
at
com.ibm.j2ca.extension.eventmanagement.internal.EventListSender.sendEvents(EventListSender.java:113)
at
com.ibm.j2ca.extension.eventmanagement.internal.EventListSender.run(EventListSender.java:90)
at
com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:394)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)
Caused by: java.lang.NullPointerException
at
com.ibm.j2ca.jdbc.inbound.JDBCEventStoreWithXid.setObjectKeys(JDBCEventStoreWithXid.java:1703)
at
com.ibm.j2ca.jdbc.inbound.JDBCEventStoreWithXid.getRecordForEvent(JDBCEventStoreWithXid.java:1449)
at
com.ibm.j2ca.extension.eventmanagement.internal.EventManager.getRecordForEvent(EventManager.java:680)
at
com.ibm.j2ca.extension.eventmanagement.internal.EventManager.getObjectForEvent(EventManager.java:649)
... 7 more
What this exception is saying is that in the process of trying to get an ‘Object’ for the given event (the object is a record in a table for the jdbc adapter) it could not find the primary key.
The solution was to re-generate the XSDs for the table using Enterprise Service Discovery and set the primary key attribute. You then will have to uninstall the current ‘bad’ adapter instance from your server and restart your server. Install the new fixed adapter module and everything will work.
For more information, you can reference this thread from DeveloperWorks.
Related Posts
- WebSphere Adapter for JDBC Export - ‘InvalidVerbException’
- WebSphere Adapter for JDBC Export and SQL Server 2000: Table Locking while Polling
- JDBC Adapter Export with events that comprise multiple rows
- WebSphere Adapter for JDBC: Superfluous RecordNotFound Exceptions
- UPDATE: WebSphere Adapter for JDBC: Superfluous RecordNotFound Exceptions
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply