Topic
  • 7 replies
  • Latest Post - ‏2012-09-08T10:48:21Z by SystemAdmin
SystemAdmin
SystemAdmin
2233 Posts

Pinned topic Database Pool Connection Error

‏2007-12-27T01:39:13Z |
A error 1 occured when testing database pool connection. I'm using this tutorial to get started: http://www.ibm.com/developerworks/edu/j-dw-java-kickstart-i.html

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

Message was edited by: baratrion
Updated on 2012-09-08T10:48:21Z at 2012-09-08T10:48:21Z by SystemAdmin
  • Ashish_Jain
    Ashish_Jain
    274 Posts

    Re: Database Pool Connection Error

    ‏2008-01-02T08:46:04Z  
    Try using the following link for configuring WAS CE with DB2 express.
    http://www-1.ibm.com/support/docview.wss?rs=2359&uid=swg27010113
  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: Database Pool Connection Error

    ‏2008-06-22T20:57:17Z  
    Try using the following link for configuring WAS CE with DB2 express.
    http://www-1.ibm.com/support/docview.wss?rs=2359&uid=swg27010113
    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".

    Best regards
    Janeks
  • Ashish_Jain
    Ashish_Jain
    274 Posts

    Re: Database Pool Connection Error

    ‏2008-06-23T03:19:58Z  
    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".

    Best regards
    Janeks
    Try using the following
    http://www-1.ibm.com/support/docview.wss?rs=2359&uid=swg27010113
  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: Database Pool Connection Error

    ‏2008-07-30T16:25:24Z  
    These 2 links just go round on each other !!!! wots the pointof that ????

    I am having the same trouble using the jcc driver on windows. Any resolution to this please
  • Kevan
    Kevan
    121 Posts

    Re: Database Pool Connection Error

    ‏2008-07-30T21:59:53Z  
    These 2 links just go round on each other !!!! wots the pointof that ????

    I am having the same trouble using the jcc driver on windows. Any resolution to this please
    Hmm. The display text of the URL doesn't matching the actual destination. Not sure if it's a posting error or a forum processing error. Try cutting and pasting the text into your browser -- http://www-1.ibm.com/support/docview.wss?rs=2359&uid=swg27010113

    That said, not sure if the above will actually help fix your problem. I haven't stepped through the tutorial.

    --kevan
  • Guillermo
    Guillermo
    13 Posts

    Re: Database Pool Connection Error

    ‏2008-08-06T20:18:53Z  
    • Kevan
    • ‏2008-07-30T21:59:53Z
    Hmm. The display text of the URL doesn't matching the actual destination. Not sure if it's a posting error or a forum processing error. Try cutting and pasting the text into your browser -- http://www-1.ibm.com/support/docview.wss?rs=2359&uid=swg27010113

    That said, not sure if the above will actually help fix your problem. I haven't stepped through the tutorial.

    --kevan
    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.

    Hopefully you will get along with these tips. Regards, Guillermo
  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: Database Pool Connection Error

    ‏2012-09-08T10:48:21Z  
    • Guillermo
    • ‏2008-08-06T20:18:53Z
    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.

    Hopefully you will get along with these tips. Regards, Guillermo
    Thank you Guillermo, that helped me to trouble shoot.

    Also did "ipconfig -all" from server to identify the exact Host Name:

    C:\Users\itprototype>ipconfig -all

    Windows IP Configuration

    Host Name . . . . . . . . . . . . : xxxxxxx
    Primary Dns Suffix . . . . . . . :