Thanks. I put in the wrong port number. now the problem is gone. Ted
Sent from my Motorola ATRIX™ 4G on AT&T -----Original message----- From: "Okken,Brett" <bok...@cerner.com> To: "java-user@axis.apache.org" <java-user@axis.apache.org> Sent: Thu, Nov 3, 2011 23:04:53 GMT+00:00 Subject: RE: [Axis2] How to connect MySQL with the standalone version Your connection is being refused. This either means your connection configuration (i.e. jdbc url) is wrong or the database listener is refusing connections. The latter can be cause by security settings. This is not an axis problem, however. Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) Brett Okken | MMF Archive | Lead Architect | 816.201.6112 | www.cerner.com<http://www.cerner.com> | bok...@cerner.com<mailto:bok...@cerner.com> From: Ted Zeng [mailto:z...@adobe.com] Sent: Thursday, November 03, 2011 6:00 PM To: java-user@axis.apache.org Subject: [Axis2] How to connect MySQL with the standalone version I just installed the Axis2 and use it without problem. Then I follow the article Exposing a Database as a Web Service by Deepal Jayasinghe When I drop a web service similar to the sample, Axis2 complaints it could not find mysql connector. So I put a copy of the latest MySql connector jar into the Axis2/lib folder. Then I got a communication error as the following. I did a search on the net and find anything related to setting up MySQL is about Tomcat, etc. not the standalone version. I thought this should be a simple problem. But I could not find the answer from the Axis2 web. I hope someone here could help me out. Thanks, -Ted Zeng Adobe Systems Inc. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2332) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2369) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:185) at db.DBServiceLifeCycle.startUp(DBServiceLifeCycle.java:19) at org.apache.axis2.deployment.ServiceBuilder.startupServiceLifecycle(ServiceBuilder.java:934) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:436) at