You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Victor Gonzalez <vg...@cyberworks.com.mx> on 2003/04/03 20:40:18 UTC

DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Services"..... Failured... Please, help me!

The message is...

java.sql.SQLException: Connection refused: connect
        at net.sourceforge.jtds.jdbc.TdsConnection.allocateTds(Unknown
Source)
        at net.sourceforge.jtds.jdbc.TdsConnection.<init>(Unknown
Source)
        at net.sourceforge.jtds.jdbc.Driver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at foo.Arteli.init(Arteli.java:25)
        at org.apache.jsp.Arteli_jsp._jspService(Arteli_jsp.java:52)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Somebody why??

The files is:
Empresa.java
public class Empresa {
  String foo = "Not Connected";
  int bar = -1;
  Connection conn;
  public void init() {
    try{
      conn = null;
      Class.forName("net.sourceforge.jtds.jdbc.Driver");
      Connection conn =
DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servic
es","sa","");
      Statement stmt = conn.createStatement();
      ResultSet rst = stmt.executeQuery("SELECT * FROM consecutivos");
      if(rst.next()){
        foo=rst.getString(1);
        bar=rst.getInt(2);
      }
      conn.close();
    }
    catch(Exception e){
      e.printStackTrace();
    }
  }
  public String getFoo() { return foo; }
  public int getBar() { return bar;}
}


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Services"..... Failured... Please, help me!

Posted by Kwok Peng Tuck <pe...@makmal.net>.
Check and see if the password and username is correct for the database 
you setup.

Victor Gonzalez wrote:

>The message is...
>
>java.sql.SQLException: Connection refused: connect
>        at net.sourceforge.jtds.jdbc.TdsConnection.allocateTds(Unknown
>Source)
>        at net.sourceforge.jtds.jdbc.TdsConnection.<init>(Unknown
>Source)
>        at net.sourceforge.jtds.jdbc.Driver.connect(Unknown Source)
>        at java.sql.DriverManager.getConnection(DriverManager.java:512)
>        at java.sql.DriverManager.getConnection(DriverManager.java:171)
>        at foo.Arteli.init(Arteli.java:25)
>        at org.apache.jsp.Arteli_jsp._jspService(Arteli_jsp.java:52)
>        at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
>Somebody why??
>
>The files is:
>Empresa.java
>public class Empresa {
>  String foo = "Not Connected";
>  int bar = -1;
>  Connection conn;
>  public void init() {
>    try{
>      conn = null;
>      Class.forName("net.sourceforge.jtds.jdbc.Driver");
>      Connection conn =
>DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servic
>es","sa","");
>      Statement stmt = conn.createStatement();
>      ResultSet rst = stmt.executeQuery("SELECT * FROM consecutivos");
>      if(rst.next()){
>        foo=rst.getString(1);
>        bar=rst.getInt(2);
>      }
>      conn.close();
>    }
>    catch(Exception e){
>      e.printStackTrace();
>    }
>  }
>  public String getFoo() { return foo; }
>  public int getBar() { return bar;}
>}
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


org/apache/jk/common/ChannelSocket.processConnection INFO: connection timeout rached.

Posted by Victor Gonzalez <vg...@cyberworks.com.mx>.
Hi guys,
  Well, I will go to here point (alone, culeros!) but, I don't know
which parameter respect the timeout is necessary modify, if anyone is
very gentle to tell me, I will be very thankful, and I promise a cool
bear.

Regards,

I have...

W2k
Tomcat 4.1.18
IIS 5.0
SQL Server
Tomcat - SQL Server with jtds0.5.1
Tomcat - IIS with isapi_redirect.dll


Victor Gonzalez
***************
PD. The info message is only the message subject.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servi ces"..... Failured... Please, help me!

Posted by ba...@go.com.
Are you providing a user name and password?
I am not familiar with this driver, but with the IBM DB2 driver a property 
of prompt=false is also needed.


At 12:40 PM 4/3/2003 -0600, Victor Gonzalez wrote:
>The message is...
>
>java.sql.SQLException: Connection refused: connect
>         at net.sourceforge.jtds.jdbc.TdsConnection.allocateTds(Unknown
>Source)
>         at net.sourceforge.jtds.jdbc.TdsConnection.<init>(Unknown
>Source)
>         at net.sourceforge.jtds.jdbc.Driver.connect(Unknown Source)
>         at java.sql.DriverManager.getConnection(DriverManager.java:512)
>         at java.sql.DriverManager.getConnection(DriverManager.java:171)
>         at foo.Arteli.init(Arteli.java:25)
>         at org.apache.jsp.Arteli_jsp._jspService(Arteli_jsp.java:52)
>         at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
>Somebody why??
>
>The files is:
>Empresa.java
>public class Empresa {
>   String foo = "Not Connected";
>   int bar = -1;
>   Connection conn;
>   public void init() {
>     try{
>       conn = null;
>       Class.forName("net.sourceforge.jtds.jdbc.Driver");
>       Connection conn =
>DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1443/Servic
>es","sa","");
>       Statement stmt = conn.createStatement();
>       ResultSet rst = stmt.executeQuery("SELECT * FROM consecutivos");
>       if(rst.next()){
>         foo=rst.getString(1);
>         bar=rst.getInt(2);
>       }
>       conn.close();
>     }
>     catch(Exception e){
>       e.printStackTrace();
>     }
>   }
>   public String getFoo() { return foo; }
>   public int getBar() { return bar;}
>}


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org