[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Database Connection Problem

badhikary81 do-not-reply at jboss.com
Mon May 19 06:24:02 EDT 2008


"PeterJ" wrote : Please post the following items:
  | 
  | The *-ds.xml file for you datasource.
  | The stack trace for the excpetion you are getting.The code used to access the database.
  | 

Thanks for reply.
Here is the main problem that I am not able to connect remote server database which is created by Mysql.that's why I am not able to create CMP Entity Bean for Database.

When I trying to connect remote server database using Netbean IDE. THEN  connection is faild.I am using Host name: IP Address Or 192.168.1.101 and 
Port:3306 ,DB:Remote server Database. UserName and Password of remote server mysql database.

When I used Host Name:192.168.1.101 then following Stacktrace Exception arise
      java.net.ConnectException: Connection time out:connect
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:519)
at  java.net.Socket.connect(Socket.java:469)
at  java.net.Socket.(Socket.java:366)
at  java.net.Socket.(Socket.java:209)
at com.mysql.jdbc.StandardSocketFactory.Connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
at com.mysql.jdbc.Connection.(Connectio.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.Connect(NonRegisteringDriver.java:285)
at org.netbeans.modules.db.explorer.DbDriverManager.getConnection(DbDriverManager.java:122)
org.netbeans.modules.db.explorer..DatabaseConnection s2.run(DatabaseConnection.java:533)
at org.openide.util.RequestPeocessorS Task.run(RequestProcessor.java:561)

when I used HostName:IP Address then following exception arise
 Unable to add COnnection:
jdbc:mysql://IP Address:3306/db:name using mysql.jdbc.Driver(Access denied for us
er 'cityslikkers'@'122.167.240.76'(using password:YES))


Please help me how to solve this problem.I need your help sir.
thanks and regards
raj

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

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



More information about the jboss-user mailing list