pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Chris Baty <batymohn@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC driver works in  ccommand line, not in Tomcat5
Date: Wed, 5 Sep 2007 04:18:30 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0709050411170.27116@leary.csoft.net> (raw)
In-Reply-To: <Pine.BSO.4.64.0709050308480.7645@leary.csoft.net>
References: <4140.98645.qm@web81605.mail.mud.yahoo.com>
	<Pine.BSO.4.64.0709050308480.7645@leary.csoft.net>



On Wed, 5 Sep 2007, Kris Jurka wrote:

> This is probably caused by a permission denied error because you are running 
> tomcat with a security policy that does not let you connect to outside 
> resources (such as a database).
>
> We should probably do a better job of catching and reporting this error with 
> a helpful suggestion instead of the obscure message and request for a report 
> above.
>

Turns out this is pretty easy to do, I'm just not sure what the best text 
to report to the user is, so far I have:

     Your security policy has prevented the connection from being
     attempted.  You must grant the connect java.net.SocketPermission
     to the database server host and port that you wish to connect to.

It's a little awkward because it tries to tell you what you need to do, 
but since there are a number of ways to define a policy for different app 
servers and configurations, there's no way to be specific enough to 
solve the problem right here.  Anyone have a better suggestions?

Kris Jurka



view thread (6+ messages)  latest in thread

Message-ID: <Pine.BSO.4.64.0709050411170.27116@leary.csoft.net>
Permalink:  ../Pine.BSO.4.64.0709050411170.27116@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.64.0709050411170.27116@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, batymohn@yahoo.com
  Subject: Re: JDBC driver works in  ccommand line, not in Tomcat5
  In-Reply-To: <Pine.BSO.4.64.0709050411170.27116@leary.csoft.net>
  References: <4140.98645.qm@web81605.mail.mud.yahoo.com> <Pine.BSO.4.64.0709050308480.7645@leary.csoft.net> <Pine.BSO.4.64.0709050411170.27116@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox