Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trouble with applet connecting through SQL Server - Please help!

0 views
Skip to first unread message

Andrea Maschio

unread,
Feb 17, 2004, 5:59:25 AM2/17/04
to
I made an applet that connects through jdbc to a sql server. What's
strange, is that applet connects fine when runs through Jbuilder
Applet Viewer. But when it runs from Internet Explorer, Java Console
displays this message:

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(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at graficojava.DB.connect(DB.java:38)

at graficojava.Graf.jbInit(Graf.java:359)

at graficojava.Graf.init(Graf.java:232)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

THe applet is runned on the SAME machine, anyway. I disabled proxy in
internet explorer.

May someone give me some hint?

Thanks

Andrea Maschio

Erwin Moller

unread,
Feb 19, 2004, 9:47:38 AM2/19/04
to
Hi Andrea,

Not sure, but did you give the applet permission to communicate with that
specific server (localhost in this case) on that specific port?

Applets are intentionally very crippled when it comes to opening ports, file
IO, etc.

You might want to sign your applet or use webstart (or maybe policytool,
allthough I am unsure that works for IE.).

Good luck and regards,
Erwin Moller

Dave

unread,
Feb 19, 2004, 12:42:44 PM2/19/04
to
The applet probably can't communicate with the database for security
restrictions. The applet can only communicate with the server it is
hosted on.

With applets, you have to remember that if you are running from
http://someserver... you can only access resources on "someserver", you
cannot access resources on localhost. Even if "someserver" and
localhost are the same physical box.

Dave.

0 new messages