Re: JDBC driver works in ccommand line, not in Tomcat5

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: JDBC driver works in ccommand line, not in Tomcat5
Дата
Msg-id Pine.BSO.4.64.0709050411170.27116@leary.csoft.net
обсуждение исходный текст
Ответ на Re: JDBC driver works in ccommand line, not in Tomcat5  (Kris Jurka <books@ejurka.com>)
Ответы Re: JDBC driver works in ccommand line, not in Tomcat5  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc

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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: JDBC driver works in ccommand line, not in Tomcat5
Следующее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: [JDBC] Questión of JDBC