Problem with JDBC socket, i would greatly appreciate some advice =)

Discussion in 'Java' started by Tom, Aug 13, 2003.

  1. Tom

    Tom Guest

    Hi everyone,
    Okay im a student so dont laugh at me =)
    I have this project going where im trying to connect to my sql server
    on my local computer.
    I get this error, is this a code problem or is this something that
    needs
    to be changed possibly in my enviormental variables?
    Thanks for the help guys, the error i have is below.



    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
    JDBC]Error establishing socket.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
    Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
    Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
    Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
    Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
    Source)
    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
    Source)
    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:172)
    at BookProject.CloudscapeDataAccess.connect(CloudscapeDataAccess.java:134)
    at BookProject.CloudscapeDataAccess.<init>(CloudscapeDataAccess.java:44)
    at BookProject.AddressBook.<init>(AddressBook.java:35)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:232)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:582)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:511)
    at sun.applet.AppletPanel.run(AppletPanel.java:289)
    at java.lang.Thread.run(Thread.java:479)
    java.security.AccessControlException: access denied
    (java.lang.RuntimePermission exitVM)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:267)
    at java.security.AccessController.checkPermission(AccessController.java:394)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:540)
    at java.lang.SecurityManager.checkExit(SecurityManager.java:760)
    at java.lang.Runtime.exit(Runtime.java:86)
    at java.lang.System.exit(System.java:696)
    at BookProject.AddressBook.<init>(AddressBook.java:43)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:232)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:582)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:511)
    at sun.applet.AppletPanel.run(AppletPanel.java:289)
    at java.lang.Thread.run(Thread.java:479)
     
    Tom, Aug 13, 2003
    #1
    1. Advertisements

  2. Hi,

    I am not sure, but it seems as if there is no SQL Server running on port
    1433 on your machine.

    For more advice post some of your code.

    Frank
     
    Frank Stephan, Aug 13, 2003
    #2
    1. Advertisements

  3. Tom

    Roedy Green Guest

    I'm not familiar with SQL Server. But in Sybase, it comes with a
    utility that lets you talk to the SQL server via a command line. You
    can enter SQL queries and receive results. If there is such a beast
    with SQL server, try it out. Make sure you your database is alive and
    kicking before you try to hook into it with Java.


    There may something you have to do in the control panel to make the
    database visible. You may need an ODBC-JDBC connection.
     
    Roedy Green, Aug 13, 2003
    #3
  4. Tom

    Tom Guest

    OKay, Thanks ill give it a try.
    Thanks for your time and help.
    Ill put my code up next time as well =)



     
    Tom, Aug 15, 2003
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.