2 Replies Latest reply on Mar 14, 2008 1:52 PM by macnimation2

    Cannot connect to Database

    macnimation2
      Hi,

      I'm trying to create a PHP Project using Flex 3.0

      I'm using the same settings as I do for Dreamweaver PHP projects and no issues.

      The Web server though is on a different Windows 2003 SP2 machine, but it is next to me.

      I created a New Project and Chose PHP as the Application Server Type, I clicked Next.

      Server Locations: Web Root is the explicit path to the Project folder on the Webserver, as I have mapped a Drive to it.

      Root URL is correct: I validate the Configuration and it comes back as " The web root folder and root URL are valid."

      I Chose next and the Project is created amd I then click Finish. The project Loads with no errors or issues.

      In the Flex Project, I go to Data/Create Application from Database

      I add a Connection Name:

      I choose Host URL: localhost
      Database Name: DBName on MYSQL server
      Username and Password are correct.

      I test the connection and I get the error: Unable to connect to Database

      The following is the Error log:

      com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

      ** BEGIN NESTED EXCEPTION **

      java.net.SocketException
      MESSAGE: java.net.ConnectException: Connection refused: connect

      STACKTRACE:

      java.net.SocketException: java.net.ConnectException: Connection refused: connect

      at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)

      at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)

      at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)

      at com.mysql.jdbc.Connection.<init>(Connection.java:1485)

      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)

      at org.eclipse.datatools.connectivity.db.generic.JDBCConnection.createConnection(JDBCConnect ion.java:87)

      at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverCo nnectionBase.java:104)

      at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53 )

      at org.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory.createConnection(JDBC ConnectionFactory.java:52)

      at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(Co nnectionFactoryProvider.java:77)

      at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(Connection Profile.java:354)

      at com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnectionSimple(BaseCo nnectionProfilePage.java:70)

      at com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnection(BaseConnecti onProfilePage.java:51)

      at org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage$1.widgetSelect ed(ConnectionProfileDetailsPage.java:85)

      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)

      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)

      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)

      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)

      at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)

      at org.eclipse.jface.window.Window.open(Window.java:796)

      at com.adobe.flexbuilder.dbwizard.ui.DbWizard$8.widgetSelected(DbWizard.java:598)

      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)

      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)

      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)

      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)

      at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)

      at org.eclipse.jface.window.Window.open(Window.java:796)

      at com.adobe.flexbuilder.dbwizard.actions.DBWizardAction.run(DBWizardAction.java:69)

      at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)

      at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)

      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:546)

      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)

      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java :402)

      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)

      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)

      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)

      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)

      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)

      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)

      at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)

      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)

      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)

      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

      at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java :112)

      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:106)

      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:76)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)

      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)

      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)

      at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

      at org.eclipse.equinox.launcher.Main.main(Main.java:1148)


      Any help here would be grateful.

      cheers