Re: Issue with psql driver

2007-09-06 Thread David Smith
tandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.security.AccessControlException:
access denied (java.net.SocketPermission localhost
resolve)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at
java.security.AccessController.checkPermission(AccessController.java:401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at
java.lang.SecurityManager.checkConnect(SecurityManager.java:1023)
at
java.net.InetAddress.getAllByName0(InetAddress.java:1000)
at
java.net.InetAddress.getAllByName0(InetAddress.java:981)
at
java.net.InetAddress.getAllByName(InetAddress.java:975)
at
java.net.InetAddress.getByName(InetAddress.java:889)
at
java.net.InetSocketAddress.(InetSocketAddress.java:114)
at java.net.Socket.(Socket.java:124)
at
org.postgresql.core.PGStream.(PGStream.java:59)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at
org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
at
org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:30)
at
org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:24)
at
org.postgresql.Driver.makeConnection(Driver.java:382)
at org.postgresql.Driver.connect(Driver.java:260)
... 45 more

Thanks.
Chris
--- Chris Baty <[EMAIL PROTECTED]> wrote:

  

Hi David,
The only trace  that I can find is the Catalina log:

Error occurred: org.postgresql.util.PSQLException:
Something unusual 
has occured to cause the driver to fail. Please
report this exception. 


This comes right from my catch routine  and is  what
I would expect.

Thanks.
Chris


- Original Message 
From: David Smith <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Wednesday, September 5, 2007 10:58:19 AM
Subject: Re: Issue with psql driver


Can you post the complete stack trace of your error?
 That would be 
extremely helpful in diagnosing the problem.


---David


Chris Baty wrote:


Hi Guys, 
I'm trying to access psql from Tomcat5.  I have the
  
correct driver 

because my command-lind test program  works fine. 
  
So I copied the 


driver into /usr/share/tomcat5/common/lib, like the
  
documentation 

says.  Then I kept getting 



Error occurred: org.postgresql.util.PSQLException:
  
Something unusual 


has occured to cause the driver to fail. Please
  
report this exception. 


I  was told I had a security problem so  I added a
  
file called 

chapter1.policy to  /etc/policy.d: 
// These permissions apply to the chapter1 web
  
application 


grant codeBase
  
"file:${catalina.home}/webapps/chapter1/WEB-INF/ 

classes/-" { 
 permission java.security.AllPermission; 

}; 



grant codeBase
  
"file:${catalina.home}/webapps/chapter1/WEB-INF/ 

lib/-" { 
 permission java.security.AllPermission; 

}; 



// 
// The permission granted to your JDBC driver 
grant codeBase
  
"file:${catalina.home}/common/lib/postgresql- 

jdbc3-8.1.jar" { 
 permission java.net.SocketPermission
  
"localhost:5432", 

"connect"; 

}; 



I still get the same PSQLException 
Could anyone send me an example of a security
  
policy that works?  I 


don't understand because 03Catalina.policy
  
contains: 


// These permissions apply to the servlet API
  
classes 


// and those that are shared across all class
  
loaders 

// located in the "common" directory 
grant codeBase "file:${catalina.home}/common/-" { 
 permission java.security.AllPermission; 

}; 



Thanks.


  
  


Re: Issue with psql driver

2007-09-06 Thread Chris Baty
   at
java.net.InetAddress.getByName(InetAddress.java:889)
at
java.net.InetSocketAddress.(InetSocketAddress.java:114)
at java.net.Socket.(Socket.java:124)
at
org.postgresql.core.PGStream.(PGStream.java:59)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at
org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
at
org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:30)
at
org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:24)
at
org.postgresql.Driver.makeConnection(Driver.java:382)
at org.postgresql.Driver.connect(Driver.java:260)
... 45 more

Thanks.
Chris
--- Chris Baty <[EMAIL PROTECTED]> wrote:

> Hi David,
> The only trace  that I can find is the Catalina log:
> 
> Error occurred: org.postgresql.util.PSQLException:
> Something unusual 
> has occured to cause the driver to fail. Please
> report this exception. 
> 
> This comes right from my catch routine  and is  what
> I would expect.
> 
> Thanks.
> Chris
> 
> 
> - Original Message 
> From: David Smith <[EMAIL PROTECTED]>
> To: Tomcat Users List 
> Sent: Wednesday, September 5, 2007 10:58:19 AM
> Subject: Re: Issue with psql driver
> 
> 
> Can you post the complete stack trace of your error?
>  That would be 
> extremely helpful in diagnosing the problem.
> 
> ---David
> 
> 
> Chris Baty wrote:
> 
> >Hi Guys, 
> >I'm trying to access psql from Tomcat5.  I have the
> correct driver 
> >because my command-lind test program  works fine. 
> So I copied the 
> >driver into /usr/share/tomcat5/common/lib, like the
> documentation 
> >says.  Then I kept getting 
> >
> >
> >Error occurred: org.postgresql.util.PSQLException:
> Something unusual 
> >has occured to cause the driver to fail. Please
> report this exception. 
> >
> >I  was told I had a security problem so  I added a
> file called 
> >chapter1.policy to  /etc/policy.d: 
> >// These permissions apply to the chapter1 web
> application 
> >grant codeBase
> "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
> >classes/-" { 
> >  permission java.security.AllPermission; 
> >
> >}; 
> >
> >
> >grant codeBase
> "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
> >lib/-" { 
> >  permission java.security.AllPermission; 
> >
> >}; 
> >
> >
> >// 
> >// The permission granted to your JDBC driver 
> >grant codeBase
> "file:${catalina.home}/common/lib/postgresql- 
> >jdbc3-8.1.jar" { 
> >  permission java.net.SocketPermission
> "localhost:5432", 
> >"connect"; 
> >
> >}; 
> >
> >
> >I still get the same PSQLException 
> >Could anyone send me an example of a security
> policy that works?  I 
> >don't understand because 03Catalina.policy
> contains: 
> >
> >// These permissions apply to the servlet API
> classes 
> >// and those that are shared across all class
> loaders 
> >// located in the "common" directory 
> >grant codeBase "file:${catalina.home}/common/-" { 
> >  permission java.security.AllPermission; 
> >
> >}; 
> >
> >
> >Thanks.
> >
> >
> >   
>
>
> >Boardwalk for $500? In 2007? Ha! Play Monopoly Here
> and Now (it's updated for today's economy) at Yahoo!
> Games.
>
>http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>  
> >  
> >
> 
> 
>
-
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
>

> Looking for a deal? Find great prices on flights and
> hotels with Yahoo! FareChase.
> http://farechase.yahoo.com/




  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue with psql driver

2007-09-05 Thread Dan Armbrust
Pease add a ex.printStackTrace() call to your exception catch block,
and then post the results.  That will give more information as to what
went wrong.

You may need to take this question to the postgres mailing lists.

Dan

On 9/5/07, Chris Baty <[EMAIL PROTECTED]> wrote:
> I'm not sure.  The code looks like:
> try {
>   con =
> DriverManager.getConnection("jdbc:postgresql:test","batymohn","bcl122");
>   out.println("Conection made");
> } catch (Exception ex) {
>   System.out.println("Error occurred: " + ex);
>   out.println("NO Connection made");
> }
> When it throws this exception  it comes out in
> /var/tomcatt5/Catalina.date.log
> Chris
>
> --- David Smith <[EMAIL PROTECTED]> wrote:
>
> > How do you log the event?  Most logging frameworks
> > support log.error(
> > String message, Exception e ), which would provide
> > the complete stack
> > and root cause in the log file.
> >
> > --David
> >
> > Chris Baty wrote:
> >
> > >Hi David,
> > >The only trace  that I can find is the Catalina
> > log:
> > >
> > >Error occurred: org.postgresql.util.PSQLException:
> > Something unusual
> > >has occured to cause the driver to fail. Please
> > report this exception.
> > >
> > >This comes right from my catch routine  and is
> > what I would expect.
> > >
> > >Thanks.
> > >Chris
> > >
> > >
> > >- Original Message 
> > >From: David Smith <[EMAIL PROTECTED]>
> > >To: Tomcat Users List 
> > >Sent: Wednesday, September 5, 2007 10:58:19 AM
> > >Subject: Re: Issue with psql driver
> > >
> > >
> > >Can you post the complete stack trace of your
> > error?  That would be
> > >extremely helpful in diagnosing the problem.
> > >
> > >---David
> > >
> > >
> > >Chris Baty wrote:
> > >
> > >
> > >
> > >>Hi Guys,
> > >>I'm trying to access psql from Tomcat5.  I have
> > the correct driver
> > >>because my command-lind test program  works fine.
> > So I copied the
> > >>driver into /usr/share/tomcat5/common/lib, like
> > the documentation
> > >>says.  Then I kept getting
> > >>
> > >>
> > >>Error occurred: org.postgresql.util.PSQLException:
> > Something unusual
> > >>has occured to cause the driver to fail. Please
> > report this exception.
> > >>
> > >>I  was told I had a security problem so  I added a
> > file called
> > >>chapter1.policy to  /etc/policy.d:
> > >>// These permissions apply to the chapter1 web
> > application
> > >>grant codeBase
> > "file:${catalina.home}/webapps/chapter1/WEB-INF/
> > >>classes/-" {
> > >> permission java.security.AllPermission;
> > >>
> > >>};
> > >>
> > >>
> > >>grant codeBase
> > "file:${catalina.home}/webapps/chapter1/WEB-INF/
> > >>lib/-" {
> > >> permission java.security.AllPermission;
> > >>
> > >>};
> > >>
> > >>
> > >>//
> > >>// The permission granted to your JDBC driver
> > >>grant codeBase
> > "file:${catalina.home}/common/lib/postgresql-
> > >>jdbc3-8.1.jar" {
> > >> permission java.net.SocketPermission
> > "localhost:5432",
> > >>"connect";
> > >>
> > >>};
> > >>
> > >>
> > >>I still get the same PSQLException
> > >>Could anyone send me an example of a security
> > policy that works?  I
> > >>don't understand because 03Catalina.policy
> > contains:
> > >>
> > >>// These permissions apply to the servlet API
> > classes
> > >>// and those that are shared across all class
> > loaders
> > >>// located in the "common" directory
> > >>grant codeBase "file:${catalina.home}/common/-" {
> > >> permission java.security.AllPermission;
> > >>
> > >>};
> > >>
> > >>
> > >>Thanks.
> > >>
> > >>
> > >>
> >
> >>
> > >>Boardwalk for $500? In 2007? Ha! Play Monopoly
> > Here and Now (it's

RE: Issue with psql driver

2007-09-05 Thread Peter Crowther
> From: Chris Baty [mailto:[EMAIL PROTECTED] 
>   System.out.println("Error occurred: " + ex);

Chris, you might want to learn how to use any of the Java logging
frameworks - as I eventually realised, they make your life a lot easier
once you get your head round them.  In the meantime, at least also
printing the exception's stack trace would give more information.
Printing the exception only prints its class and message, which is
rarely enough to get anything useful.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue with psql driver

2007-09-05 Thread Chris Baty
I'm not sure.  The code looks like:
try {
  con =
DriverManager.getConnection("jdbc:postgresql:test","batymohn","bcl122");
  out.println("Conection made");
} catch (Exception ex) {
  System.out.println("Error occurred: " + ex);
  out.println("NO Connection made");
}
When it throws this exception  it comes out in
/var/tomcatt5/Catalina.date.log
Chris

--- David Smith <[EMAIL PROTECTED]> wrote:

> How do you log the event?  Most logging frameworks
> support log.error( 
> String message, Exception e ), which would provide
> the complete stack 
> and root cause in the log file.
> 
> --David
> 
> Chris Baty wrote:
> 
> >Hi David,
> >The only trace  that I can find is the Catalina
> log:
> >
> >Error occurred: org.postgresql.util.PSQLException:
> Something unusual 
> >has occured to cause the driver to fail. Please
> report this exception. 
> >
> >This comes right from my catch routine  and is 
> what I would expect.
> >
> >Thanks.
> >Chris
> >
> >
> >- Original Message 
> >From: David Smith <[EMAIL PROTECTED]>
> >To: Tomcat Users List 
> >Sent: Wednesday, September 5, 2007 10:58:19 AM
> >Subject: Re: Issue with psql driver
> >
> >
> >Can you post the complete stack trace of your
> error?  That would be 
> >extremely helpful in diagnosing the problem.
> >
> >---David
> >
> >
> >Chris Baty wrote:
> >
> >  
> >
> >>Hi Guys, 
> >>I'm trying to access psql from Tomcat5.  I have
> the correct driver 
> >>because my command-lind test program  works fine. 
> So I copied the 
> >>driver into /usr/share/tomcat5/common/lib, like
> the documentation 
> >>says.  Then I kept getting 
> >>
> >>
> >>Error occurred: org.postgresql.util.PSQLException:
> Something unusual 
> >>has occured to cause the driver to fail. Please
> report this exception. 
> >>
> >>I  was told I had a security problem so  I added a
> file called 
> >>chapter1.policy to  /etc/policy.d: 
> >>// These permissions apply to the chapter1 web
> application 
> >>grant codeBase
> "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
> >>classes/-" { 
> >> permission java.security.AllPermission; 
> >>
> >>}; 
> >>
> >>
> >>grant codeBase
> "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
> >>lib/-" { 
> >> permission java.security.AllPermission; 
> >>
> >>}; 
> >>
> >>
> >>// 
> >>// The permission granted to your JDBC driver 
> >>grant codeBase
> "file:${catalina.home}/common/lib/postgresql- 
> >>jdbc3-8.1.jar" { 
> >> permission java.net.SocketPermission
> "localhost:5432", 
> >>"connect"; 
> >>
> >>}; 
> >>
> >>
> >>I still get the same PSQLException 
> >>Could anyone send me an example of a security
> policy that works?  I 
> >>don't understand because 03Catalina.policy
> contains: 
> >>
> >>// These permissions apply to the servlet API
> classes 
> >>// and those that are shared across all class
> loaders 
> >>// located in the "common" directory 
> >>grant codeBase "file:${catalina.home}/common/-" { 
> >> permission java.security.AllPermission; 
> >>
> >>}; 
> >>
> >>
> >>Thanks.
> >>
> >>
> >>  
>
>>
> >>Boardwalk for $500? In 2007? Ha! Play Monopoly
> Here and Now (it's updated for today's economy) at
> Yahoo! Games.
>
>>http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>  
> >> 
> >>
> >>
> >>
> >
> >
>
>-
> >To start a new topic, e-mail:
> users@tomcat.apache.org
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >   
>
>
> >Looking for a deal? Find great prices on flights
> and hotels with Yahoo! FareChase.
> >http://farechase.yahoo.com/
> >  
> >
> 
> 
>
-
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



   

Moody friends. Drama queens. Your life? Nope! - their life, your story. Play 
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue with psql driver

2007-09-05 Thread David Smith
How do you log the event?  Most logging frameworks support log.error( 
String message, Exception e ), which would provide the complete stack 
and root cause in the log file.


--David

Chris Baty wrote:


Hi David,
The only trace  that I can find is the Catalina log:

Error occurred: org.postgresql.util.PSQLException: Something unusual 
has occured to cause the driver to fail. Please report this exception. 


This comes right from my catch routine  and is  what I would expect.

Thanks.
Chris


- Original Message 
From: David Smith <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Wednesday, September 5, 2007 10:58:19 AM
Subject: Re: Issue with psql driver


Can you post the complete stack trace of your error?  That would be 
extremely helpful in diagnosing the problem.


---David


Chris Baty wrote:

 

Hi Guys, 
I'm trying to access psql from Tomcat5.  I have the correct driver 
because my command-lind test program  works fine.  So I copied the 
driver into /usr/share/tomcat5/common/lib, like the documentation 
says.  Then I kept getting 



Error occurred: org.postgresql.util.PSQLException: Something unusual 
has occured to cause the driver to fail. Please report this exception. 

I  was told I had a security problem so  I added a file called 
chapter1.policy to  /etc/policy.d: 
// These permissions apply to the chapter1 web application 
grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
classes/-" { 
permission java.security.AllPermission; 

}; 



grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
lib/-" { 
permission java.security.AllPermission; 

}; 



// 
// The permission granted to your JDBC driver 
grant codeBase "file:${catalina.home}/common/lib/postgresql- 
jdbc3-8.1.jar" { 
permission java.net.SocketPermission "localhost:5432", 
"connect"; 

}; 



I still get the same PSQLException 
Could anyone send me an example of a security policy that works?  I 
don't understand because 03Catalina.policy contains: 

// These permissions apply to the servlet API classes 
// and those that are shared across all class loaders 
// located in the "common" directory 
grant codeBase "file:${catalina.home}/common/-" { 
permission java.security.AllPermission; 

}; 



Thanks.


 


Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  



   




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue with psql driver

2007-09-05 Thread Chris Baty
Hi David,
The only trace  that I can find is the Catalina log:

Error occurred: org.postgresql.util.PSQLException: Something unusual 
has occured to cause the driver to fail. Please report this exception. 

This comes right from my catch routine  and is  what I would expect.

Thanks.
Chris


- Original Message 
From: David Smith <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Wednesday, September 5, 2007 10:58:19 AM
Subject: Re: Issue with psql driver


Can you post the complete stack trace of your error?  That would be 
extremely helpful in diagnosing the problem.

---David


Chris Baty wrote:

>Hi Guys, 
>I'm trying to access psql from Tomcat5.  I have the correct driver 
>because my command-lind test program  works fine.  So I copied the 
>driver into /usr/share/tomcat5/common/lib, like the documentation 
>says.  Then I kept getting 
>
>
>Error occurred: org.postgresql.util.PSQLException: Something unusual 
>has occured to cause the driver to fail. Please report this exception. 
>
>I  was told I had a security problem so  I added a file called 
>chapter1.policy to  /etc/policy.d: 
>// These permissions apply to the chapter1 web application 
>grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
>classes/-" { 
>  permission java.security.AllPermission; 
>
>}; 
>
>
>grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
>lib/-" { 
>  permission java.security.AllPermission; 
>
>}; 
>
>
>// 
>// The permission granted to your JDBC driver 
>grant codeBase "file:${catalina.home}/common/lib/postgresql- 
>jdbc3-8.1.jar" { 
>  permission java.net.SocketPermission "localhost:5432", 
>"connect"; 
>
>}; 
>
>
>I still get the same PSQLException 
>Could anyone send me an example of a security policy that works?  I 
>don't understand because 03Catalina.policy contains: 
>
>// These permissions apply to the servlet API classes 
>// and those that are shared across all class loaders 
>// located in the "common" directory 
>grant codeBase "file:${catalina.home}/common/-" { 
>  permission java.security.AllPermission; 
>
>}; 
>
>
>Thanks.
>
>
>   
>
>Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
>today's economy) at Yahoo! Games.
>http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  
>  
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

Re: Issue with psql driver

2007-09-05 Thread David Smith
Can you post the complete stack trace of your error?  That would be 
extremely helpful in diagnosing the problem.


---David


Chris Baty wrote:

Hi Guys, 
I'm trying to access psql from Tomcat5.  I have the correct driver 
because my command-lind test program  works fine.  So I copied the 
driver into /usr/share/tomcat5/common/lib, like the documentation 
says.  Then I kept getting 



Error occurred: org.postgresql.util.PSQLException: Something unusual 
has occured to cause the driver to fail. Please report this exception. 

I  was told I had a security problem so  I added a file called 
chapter1.policy to  /etc/policy.d: 
// These permissions apply to the chapter1 web application 
grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
classes/-" { 
 permission java.security.AllPermission; 

}; 



grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
lib/-" { 
 permission java.security.AllPermission; 

}; 



// 
// The permission granted to your JDBC driver 
grant codeBase "file:${catalina.home}/common/lib/postgresql- 
jdbc3-8.1.jar" { 
 permission java.net.SocketPermission "localhost:5432", 
"connect"; 

}; 



I still get the same PSQLException 
Could anyone send me an example of a security policy that works?  I 
don't understand because 03Catalina.policy contains: 

// These permissions apply to the servlet API classes 
// and those that are shared across all class loaders 
// located in the "common" directory 
grant codeBase "file:${catalina.home}/common/-" { 
 permission java.security.AllPermission; 

}; 



Thanks.


  


Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Issue with psql driver

2007-09-05 Thread Chris Baty
Hi Guys, 
I'm trying to access psql from Tomcat5.  I have the correct driver 
because my command-lind test program  works fine.  So I copied the 
driver into /usr/share/tomcat5/common/lib, like the documentation 
says.  Then I kept getting 


Error occurred: org.postgresql.util.PSQLException: Something unusual 
has occured to cause the driver to fail. Please report this exception. 

I  was told I had a security problem so  I added a file called 
chapter1.policy to  /etc/policy.d: 
// These permissions apply to the chapter1 web application 
grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
classes/-" { 
  permission java.security.AllPermission; 

}; 


grant codeBase "file:${catalina.home}/webapps/chapter1/WEB-INF/ 
lib/-" { 
  permission java.security.AllPermission; 

}; 


// 
// The permission granted to your JDBC driver 
grant codeBase "file:${catalina.home}/common/lib/postgresql- 
jdbc3-8.1.jar" { 
  permission java.net.SocketPermission "localhost:5432", 
"connect"; 

}; 


I still get the same PSQLException 
Could anyone send me an example of a security policy that works?  I 
don't understand because 03Catalina.policy contains: 

// These permissions apply to the servlet API classes 
// and those that are shared across all class loaders 
// located in the "common" directory 
grant codeBase "file:${catalina.home}/common/-" { 
  permission java.security.AllPermission; 

}; 


Thanks.


   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow