Archive for the ‘Java’ Category

Starting an h2 database console via command line

Tuesday, March 10th, 2009

I have to post this because I am so sure I will have forgotten it once I don’t use it for two days:

$ java -cp h2*.jar org.h2.tools.Server

If you are using maven, as I do, the h2 packages reside in PATHTO/.m2/repository/com/h2database/h2/LATESTVERSION/.

The same information may be found at http://www.h2database.com/html/tutorial.html

Tomcat Debian Permission Problems

Thursday, September 11th, 2008

I just recently installed a tomcat 5.5 on debian etch and ran into a slight problem. Tomcat was unable to read and/or write files with the default configuration. Tomcat was unable to access logfiles and so, unable to start the webapplications.

A little bit of research brought up an answer to the problem. Source was the Java Security Manager. It is configurable through files in /etc/tomcat5.5/policy.d/ but it can be very tedious, because it you have to di it explicitly for every file. If you are the only one deploying to the server you can also disable the security manager tomcatwide by editing /etc/default/tomcat5.5 and setting TOMCAT5_SECURITY to ‘no’.