Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 591
  • Last Modified:

Database connection error in Flex 3

I am using flex 3 to connect to a sql 2005 database. And when I try and create application from a database. When I define the database connection enter the server name, database name, uid, pwd. I keep getting an error and it will not connect to the database. I know the server name is correct as well as the database name uid and pwd. I am new to flex 3. Any help you can give me would be great. I have enclosed the error in the code section below.
java.sql.SQLException: Network error IOException: Could not create socket
	at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:372)
	at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
	at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
	at org.eclipse.datatools.connectivity.db.generic.JDBCConnection.createConnection(JDBCConnection.java:87)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)
	at org.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory.createConnection(JDBCConnectionFactory.java:52)
	at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:77)
	at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:354)
	at com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnectionSimple(BaseConnectionProfilePage.java:70)
	at com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnection(BaseConnectionProfilePage.java:51)
	at org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage$1.widgetSelected(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(ActionContributionItem.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(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java: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)
Caused by: java.io.IOException: Could not create socket
	at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:303)
	at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:250)
	at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:297)
	... 57 more
Caused by: java.lang.IllegalArgumentException: protocol = socket host = null
	at sun.net.spi.DefaultProxySelector.select(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	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 net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:289)
	... 59 more

Open in new window

0
woodje
Asked:
woodje
  • 4
  • 4
1 Solution
 
Jones911Commented:
Are you using java to connect ?
0
 
woodjeAuthor Commented:
no a httpservice
0
 
woodjeAuthor Commented:
and VB
0
Big Data Means Big Business

In data-dependent industries like IT, finance, and healthcare, there’s a growing demand for qualified analysts to fill leadership roles. WGU’s MS in Data Analytics has IT certifications from Oracle and SAS built into its curriculum at a flat fee that could save you money.

 
Jones911Commented:
What is the server side language you are using.
0
 
woodjeAuthor Commented:
I am not sure if I am understanding. I am running this local with IIS 6.0 with .net 3.5
0
 
Jones911Commented:
But somehow you need to post data do an asp page of some sort.  Flex cant talk directly to SQL Server
0
 
woodjeAuthor Commented:
Using flex I just connected to the databse in the database explorer and then right clicked on the table and selected create application from database. This created a series of html, javascript, vb, and asmx files.
0
 
Jones911Commented:
Hmm OK.  It's not really magic like that and you do mention VB and asmx so I'm guessing asp which I don't know much about so I will have to drop out here.
0

Featured Post

Prepare for an Exciting Career in Cybersecurity

Help prevent cyber-threats and provide solutions to safeguard our global digital economy. Earn your MS in Cybersecurity. WGU’s MSCSIA degree program curriculum features two internationally recognized certifications from the EC-Council at no additional time or cost.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now