Archive for the 'Java' category
Spring Transaction in Java main method
Continue Reading »
Managing Java Memory – heap size, max perm size, GC collection etc.,
Define the minimum and maximum heap space.
Continue Reading »
WebTest using https – javax.net.ssl.SSLHandshakeException
<config useInsecureSSL="true" />SEO friendly URL’s in Java
Java – Logging in high volume transactions
SAXParserFactoryImpl not found Error
[java] 2010-10-08 11:29:36.273:WARN::FAILED HandlerCollection@79a2e7: javax.xml.parsers.FactoryConfigurationError: Provider o
rg.apache.xerces.jaxp.SAXParserFactoryImpl not found
[java] 2010-10-08 11:29:36.273:WARN::Error starting handlers
[java] javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
[java] at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:113)
[java] at org.eclipse.jetty.xml.XmlParser.<init>(XmlParser.java:68)
Generate environment specific properties file using ant replace
com.sun.tools.javac.Main is not on the classpath
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to “d:\devtools\java1.5\jre”
Setting up JackRabbit with Database
There are not many resources on the net that shows how to setup up JackRabbit with database. At least I couldn’t find it. There are many reasons you would want to choose to implement the storage in database rather than file system. Well I’m not going to talk about that here. You read an interesting discussion on TheServerSide.
Delete more than one table
String query = "show tables like 'a%'"; String tables = null; try { Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(query); while (rs.next()) { String tableName= rs.getString(1); if (tables == null) tables = tableName; else tables += "," + tableName; } st.close(); st = conn.createStatement(); st.executeUpdate("drop table " + tables); st.close(); } catch (SQLException e) { System.out.println("Unable to execute Query " + e.getMessage()); }