From: thhal at mailblocks.com (Thomas Hallgren) Date: Wed, 20 Apr 2005 12:13:47 +0200 Subject: [Pljava-dev] SecurityException read file In-Reply-To: <1742.10.0.0.30.1113991848.squirrel@10.0.0.30> References: <1742.10.0.0.30.1113991848.squirrel@10.0.0.30> Message-ID: <42662B5B.6050100@mailblocks.com> Jordi Marqu?s wrote: > I need read file into pljava trigger, but when I read the file I > obtain the following error: > > java.lang.SecurityException: read on C:\postgresql\test.txt > > Somebody knows the solution > > Thank you very much As most of the PostgreSQL PL's, PL/Java comes with two language handlers, a "java" and a "javaU". The former is "trusted" and will not permit your functions access to the file system. You need to use LANGUAGE javaU in your function declaration. Regards, Thomas Hallgren