[jboss-user] [Installation, Configuration & Deployment] - mysql connection refused

rgjawanda do-not-reply at jboss.com
Sat Jan 6 11:32:29 EST 2007


I have jboss 4.0.2 running on my ubuntu linux server.

I have 5.0.1 mysql and the 3.0.1 mysql-connector

My datasource gets registered ad MySqlDSL
and in the jmx console it says bind name

java:MySqlDSL

So far so good.

I my war application (i connect using ) this

   Statement stmt =null ;
    ResultSet rs = null;
    boolean test = false ;

    try {
      InitialContext ctx = new InitialContext();
      DataSource ds = (DataSource)ctx.lookup("java:/MySqlDSL");
      con = ds.getConnection();
      con.setAutoCommit(false);
      con.setTransactionIsolation(con.TRANSACTION_SERIALIZABLE) ;
	  
      stmt = con.createStatement();
      StringBuffer sb = new StringBuffer() ;
	
      sb.setLength(0) ;


Jboss throws and exception

JbossManagedConnectionPool throwable while attempting to get a new connection: null

communications lik failure du to underlying exception
java.net.ConnectException Connection refused

my connection-url string is

<connection-url>jdbc:mysql://localhost:3305/tracker
my username and password are correct.

I try this on the command line and I can login.

Any idea?

Thanks a million if you answer.
Ron



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998558#3998558

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998558



More information about the jboss-user mailing list