tomcat - Cannot connect Java to CONNX: java.sql.SQLException: Connection refused: connect -


i'm trying connect java based program running through tomcat connx database, i'm getting error in title. code have, identifying information removed:

  string driver = "com.connx.jdbc.tcjdbc.tcjdbcdriver";   string connectionstring = "jdbc:connx:dd=praxav11;gateway=<server name>";   string user = "<user>";   string pass = "<pass>";   class.forname(driver);    dbconnection = java.sql.drivermanager.getconnection(connectionstr, user, password); 

i've been using instructions from:

http://www.connx.com/products/connx/connx%2010%20userguide/connxcdd32a/opening_a_connection_jdbc_driver.htm

"praxav11" got dsnr tool, according cdd-dsn cdd want i'm pretty confident right.

for gateway i've tried both server name , server ip. username , password i'm quite confident correct , different error anyway guess.

does have ideas wrong or suggestions try? i'm drawing blank on , have tried brute forcing can't work.

the full error is:

com.$company.dbdatasetexception: java.sql.sqlexception: connection refused: connect @ com.$company.dbdatabase.setconnection(dbdatabase.java:43) @ em.cabbench.$client.erpinterface$client.connecttoconnx(erpinterface$client.java:137) @ em.cabbench.$client.erpinterface$client.geterprawmaterialprice(erpinterface$client.java:167) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ em.cabbench.requesttypes.call(requesttypes.java:1120) @ em.cabbench.cabbenchsrv.processrequest(cabbenchsrv.java:988) @ em.cabbench.cabbenchsrv.doget(cabbenchsrv.java:828) @ javax.servlet.http.httpservlet.service(httpservlet.java:617) @ javax.servlet.http.httpservlet.service(httpservlet.java:723) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:290) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:233) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:191) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:127) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:293) @ org.apache.coyote.http11.http11processor.process(http11processor.java:861) @ org.apache.coyote.http11.http11protocol$http11connectionhandler.process(http11protocol.java:620) @ org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:489) @ java.lang.thread.run(unknown source)  caused by: java.sql.sqlexception: connection refused: connect @ com.connx.jdbc.tcjdbc.tcjdbcdriver.connect(tcjdbcdriver.java:251) @ java.sql.drivermanager.getconnection(unknown source) @ java.sql.drivermanager.getconnection(unknown source) @ com.$company.dbdatabase.setconnection(dbdatabase.java:40) ... 23 more  couldn't connect connx java.lang.nullpointerexception @ com.$company.dbdatabase.closeconnection(dbdatabase.java:66) @ em.cabbench.$client.erpinterface$client.geterprawmaterialprice(erpinterface$client.java:171) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ em.cabbench.requesttypes.call(requesttypes.java:1120) @ em.cabbench.cabbenchsrv.processrequest(cabbenchsrv.java:988) @ em.cabbench.cabbenchsrv.doget(cabbenchsrv.java:828) @ javax.servlet.http.httpservlet.service(httpservlet.java:617) @ javax.servlet.http.httpservlet.service(httpservlet.java:723) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:290) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:233) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:191) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:127) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:293) @ org.apache.coyote.http11.http11processor.process(http11processor.java:861) @ org.apache.coyote.http11.http11protocol$http11connectionhandler.process(http11protocol.java:620) @ org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:489) @ java.lang.thread.run(unknown source) 

i hope database server accessible machine on running code....


Comments