java.security.AccessControlException: access denied
(java.io.FilePermission /webs/web1179/.h2.server.properties read)
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
323)
java.security.AccessController.checkPermission(AccessController.java:
546)
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
java.lang.SecurityManager.checkRead(SecurityManager.java:871)
java.io.File.exists(File.java:731)
org.h2.store.fs.FileSystemDisk.exists(FileSystemDisk.java:134)
org.h2.util.FileUtils.exists(FileUtils.java:132)
org.h2.util.SortedProperties.loadProperties(SortedProperties.java:87)
org.h2.server.web.WebServer.loadProperties(WebServer.java:510)
org.h2.server.web.WebServer.init(WebServer.java:223)
org.h2.server.web.WebServlet.init(WebServlet.java:53)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
After having looked at the source code, I understand that I must
somehow set to SysProperites.USER_HOME to a directory accessible from
my web application. I also understand that in a non web application, I
simply could pass "-Duser.home=/mydir" to the application, but is
there a way to achieve the same for a web application running in
Tomcat?
Thanks,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
Create a global environment variable named JAVA_OPTS and the contents
"-Duser.home=/path/to/your/home/dir"
or create a script setenv.bat (or setenv.sh) in $CATALINA_HOME/bin
that contains the above environment variable.
Thomas
<env-entry>
<env-entry-name>user.home</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>d:\config</env-entry-value>
</env-entry>
to my web.xml file, but System.getProperty("user.home") still returned
the old value.
Do you have any experience with that?
On 22 Mrz., 21:26, Kerry Sainsbury <ke...@fidelma.com> wrote:
> A Tomcat mailing list is probably a better source of answers, but Google
> told me this pretty quickly:http://stackoverflow.com/questions/372686/how-can-i-specify-system-pr...
>
> ... it sounds good to me -- especially the last option at the bottom of the
> page.
>
> > h2-database...@googlegroups.com<h2-database%2Bunsu...@googlegroups.com>
On 22 Mrz., 22:06, Thomas Kellerer <google-gro...@sql-workbench.net>
wrote:
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
I guess H2 should ignore the exception when trying to load load / safe
this properties file if it's not accessible. I will implement this.
Regards,
Thomas
On 23 Mrz., 00:04, Kerry Sainsbury <ke...@fidelma.com> wrote:
> I suggested that you look at "the last option at the bottom of the page". I
> still suggest that :-)
>
> > <h2-database%2Bunsu...@googlegroups.com<h2-database%252Buns...@googlegroups.com>
On 23 Mrz., 18:42, Thomas Mueller <thomas.tom.muel...@gmail.com>
wrote: