[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] HI ALL Error establishing socket PROBLEM!



On 6 Aug 2002 at 10:32, Miguel Carmona wrote:

<snip>

> BUT WHEN I RUN A SERVLET THIS DONT WORKS AND RETURN THIS: 
> 
> 'java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket'
> 

I had a similar problem on a Raq4i.  I think you need to modify your 
Tomcat policy document to allow the servlet to create sockets.

On the Raq4i this policy document is re-written every time the web 
server is started by a custom Cobalt perl script.   In my set up, it 
is here:

/usr/java/jakarta-tomcat/bin/cobalt_config.pl

Find the lines which start:

      print NEW_POLICY "  permission ...

(Round about line 84 in my config.)

Add another line like this (may wrap):

      print NEW_POLICY "  permission java.net.SocketPermission 
\"<host>:<port>\", \"listen,connect,resolve\";\n";

Replace <host> and <port> with the server you want to connect to.

I am not a tomcat guru so maybe someone else can help with syntax 
here ?


Regards

Ian