Category Archives: Java

Debugging with JPDA and Apache Tomcat

The ‘jpda’ option in Apache Tomcat will not work if you use it with startup.sh (like ‘startup.sh jpda’ or ‘js jpda’). You need to use ‘catalina.sh jpda start’ instead. If you want to use startup.sh you may modify last line … Continue reading

Posted in Java, Tomcat | Leave a comment

Install ElasticSearch alongside Tomcat

This tutorial covers installation of standalone ElasticSearch distribution running with included Netty webserver. It is installed on shared server alongside (main) private JVM running application server. Prerequisites: – You will need JDK 1.7 or higher. You can view/change JDK version … Continue reading

Posted in Java | Leave a comment

Using Loggly with Java/Tomcat on shared host

You may sometimes need an easy access to your Tomcat logs outside of the hosting server. Loggly is one of the solutions but setting it up on a shared server is not straightforward. Loggly installation guide assumes you have superuser … Continue reading

Posted in Java, Tomcat | Leave a comment

Memory usage by WebappClassLoader with multiple Hosts and appBase

Using Tomcat virtual hosts with the same appBase can cause unnecessary resource drain mainly due to excessive WebappClassLoader instances. See how to save heap memory by using separate appBase for each Host. In the example setup there were localhost and … Continue reading

Posted in Java, Tomcat | Leave a comment

How to reset Cyclos 4 admin password?

If you lost your Cyclos 4 admin password you may be in troubles. To recover (by reset) access to your Cyclos 4 administration panel follow the tutorial. The instructions that can be found in the net refer to Cyclos 3 … Continue reading

Posted in Java, Tomcat | 2 Comments

Java UrlRewriteFilter and Apache mod_rewrite – rule comparison

UrlRewriteFilter for Tomcat can do most of the stuff mod_rewrite Apache module does. In a hosting scenario where some URLs are served by Apache and others by Tomcat you need to use correct rewriting method for it to succeed. Here … Continue reading

Posted in Java, Tomcat | 2 Comments

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application This is usually caused by incompatibility between used taglib URI and available JSTL jars. Check what version matches your URI by … Continue reading

Posted in Java, Tomcat | Leave a comment

Hibernate and java.lang.NoClassDefFoundError: javax/persistence/EntityListeners

java.lang.NoClassDefFoundError: javax/persistence/EntityListenersorg.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:97)org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getDefaults(JavaReflectionManager.java:226)org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1352)org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1777)org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1861)com.util.HibernateUtil.getSession(HibernateUtil.java:16) It is usually caused by missing hibernate-jpa jars. These may be included in your development environment but mising in the generated WAR. You need to ensure the JPA jar is included in your WAR’s WEB-INF/lib or your application … Continue reading

Posted in Java | Leave a comment

jdbc4.MySQLSyntaxErrorException and max_user_connections

Possible causes for javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User dbuser already has more than ‘max_user_connections’ active connections 1. Mismatch between MySQL max_user_connections and JDBC pool limits The most simple and obvious reason is that your connection pool limits are set above max_user_connections. This … Continue reading

Posted in Databases, Java | Leave a comment

How to host random or wildcard subdomains on Tomcat and Java

See how random subdomains can be processed by Tomcat’s default host using wildcard in DNS and webserver. One of our clients worked on a project where he needed to service random subdomains without a need for creating them in cPanel. … Continue reading

Posted in Java, Tomcat | Leave a comment