• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Are arrays supported by DB2 Driver for WebSphere

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hi friends,

I want to pass an integer array to a DB2 Stored procedure in my web app deployed on websphere app server 7.01. I am using DB2 9.7. Please advise if there is a DB2 driver that supports arrays to be exchanged between the database and websphere. Following is the exception being thrown in the FFDC.



[2/2/12 12:15:29:005 GST] FFDC Exception:com.ibm.db2.jcc.b.eo SourceId:com.ibm.ws.rsadapter.jdbc.WSJccCallableStatement.pmiExecute ProbeId:669 Reporter:com.ibm.ws.rsadapter.jdbc.WSJccCallableStatement@766a766a
com.ibm.db2.jcc.b.eo: An unexpected token "[" was found following "User',1,1,1,0,1,0,1,". Expected tokens may include: "<space>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.53.95
at com.ibm.db2.jcc.b.bd.a(bd.java:676)
at com.ibm.db2.jcc.b.bd.a(bd.java:60)
at com.ibm.db2.jcc.b.bd.a(bd.java:127)
at com.ibm.db2.jcc.b.gm.c(gm.java:2484)
at com.ibm.db2.jcc.b.gm.d(gm.java:2461)
at com.ibm.db2.jcc.b.gm.a(gm.java:1962)
at com.ibm.db2.jcc.t4.db.g(db.java:138)
at com.ibm.db2.jcc.t4.db.d(db.java:74)
at com.ibm.db2.jcc.t4.t.d(t.java:63)
at com.ibm.db2.jcc.t4.sb.k(sb.java:176)
at com.ibm.db2.jcc.b.gm.cb(gm.java:1957)
at com.ibm.db2.jcc.b.hm.gc(hm.java:2573)
at com.ibm.db2.jcc.b.hm.e(hm.java:3257)
at com.ibm.db2.jcc.b.im.Ub(im.java:105)
at com.ibm.db2.jcc.b.im.execute(im.java:88)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:958)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:634)
at com.gbm.cms.server.dbHelper.saveUsersData(dbHelper.java:1980)
at com.gbm.cms.server.dbServices.dbAdminServiceImpl.UpdateUsers(dbAdminServiceImpl.java:304)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:207)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.gbm.cms.server.Loginfilter.doFilter(Loginfilter.java:56)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)

==> Performing default dump from com.ibm.ws.rsadapter.DiagnosticModuleForAdapter :Thu Feb 02 12:15:29 GST 2012
This is a FFDC log generated for the Default Resource Adapter from source:com.ibm.ws.rsadapter.jdbc.WSJccCallableStatement.pmiExecute
The exception caught:com.ibm.db2.jcc.b.eo: An unexpected token "[" was found following "User',1,1,1,0,1,0,1,". Expected tokens may include: "<space>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.53.95
SQL Error Code is -104 SQL State is :42601
Operating System:Windows Server 2008 6.1 build 7600 amd64
Classpath:C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01/properties;C:\Program Files\IBM\WebSphere\AppServer/properties;C:\Program Files\IBM\WebSphere\AppServer/lib/startup.jar;C:\Program Files\IBM\WebSphere\AppServer/lib/bootstrap.jar;C:\Program Files\IBM\WebSphere\AppServer/lib/jsf-nls.jar;C:\Program Files\IBM\WebSphere\AppServer/lib/lmproxy.jar;C:\Program Files\IBM\WebSphere\AppServer/lib/urlprotocols.jar;C:\Program Files\IBM\WebSphere\AppServer/deploytool/itp/batchboot.jar;C:\Program Files\IBM\WebSphere\AppServer/deploytool/itp/batch2.jar;C:\Program Files\IBM\WebSphere\AppServer/java/lib/tools.jar
Ext dirs:C:\Program Files\IBM\WebSphere\AppServer\java\jre\lib\ext
Chained exceptions:com.ibm.db2.jcc.b.eo: An unexpected token "[" was found following "User',1,1,1,0,1,0,1,". Expected tokens may include: "<space>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.53.95
 
Murad Iqbaal
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Found the answer here:

http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_r0052619.html

Arrays are only supported between DB2 and JDBC with IBM Data Server.

Hope this helps someone.
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic