As described in the tutorial, I added the JDBC driver JAR files from the DB2 Express-C 9.5 installation to the Application Server 2.0.0.1 repository. DB2 server was running successfully.

I'm using a Linux platform with Sun Java SDK 1.5.0.13.

Any ideas on this?

1: com.ibm.db2.jcc.b.gm: jcct4204311550http://3.50.152 Exception java.net.ConnectException: Error opening socket to server localhost/127.0.0.1 on port 50,000 with message: Connection refused. ERRORCODE=-4499, SQLSTATE=08001
at com.ibm.db2.jcc.b.wc.a(wc.java:283)
at com.ibm.db2.jcc.t4.xb.a(xb.java:354)
at com.ibm.db2.jcc.t4.xb.<init>(xb.java:73)
at com.ibm.db2.jcc.t4.a.w(a.java:260)
at com.ibm.db2.jcc.t4.b.a(b.java:1775)
at com.ibm.db2.jcc.b.eb.a(eb.java:452)
at com.ibm.db2.jcc.b.eb.<init>(eb.java:417)
at com.ibm.db2.jcc.t4.b.<init>(b.java:296)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:193)
at org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet.attemptConnect(DatabasePoolPortlet.java:886)
at org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet.processAction(DatabasePoolPortlet.java:347)
at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
at org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
at org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68)
at org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164)
at org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82)
at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
at org.apache.pluto.portalImpl.Servlet.doPost(Servlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:353)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at com.ibm.db2.jcc.t4.y.run(y.java:34)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.db2.jcc.t4.xb.a(xb.java:348)
... 44 more

Re: Database Pool Connection Error

I will be glad to se answer and solution too. I'm trying to connect to local DB2 database on my PC using com.ibm.db2.jcc.DB2Driver. Connection was refused. I configured method of connecting as "local".

Re: Database Pool Connection Error

Hi Kevan. It seems you have your URL misconfigured. In case it helps, DB2 URL is -> jdbc:db2://<hostname>:<port>/databaseName. The different parameters are:

hostname: the NetBios name for the computer, as defined in hosts file, in the case of Linux. If it's your PC, you may either use the loopback TCP/IP address (127.0.0.1) or the keyword "localhost"

port: the port where DB2 is listening to clients. Default is TCP port 50000; you may check where is your DB2 installation listening, issuing the DB2 command GET DBM CFG from a command line processor (CLP) or via the DB2 Configuration Assistant. In the first case, check the parameter SVCENAME. In case you want to change the port number, issue the DB2 command UPDATE DBM CFG USING SVCENAME svcnum, where svcnum is the desired port number.

databaseName: the name of the database you want to work with. If you don't know it, the DB2 Control Center is a good place to start.