Error: Servlet Jar not Loaded… Offending class: javax/servlet/Servlet.class

This is a sign of classpath pollution. The JSP/Servlet API libraries are appserver implementation dependent and belongs in case of Tomcat 6 in the Tomcat/lib folder and should in no way be moved nor duplicated somewhere else. It’s recipe for portability trouble and collisions in classloading as you’ve encountered now. The libraries in webapp have … Read more

How to increase Java heap space for a tomcat app

There is a mechanism to do it without modifying any files that are in the distribution. You can create a separate file %CATALINA_HOME%\bin\setenv.bat or $CATALINA_HOME/bin/setenv.sh and put your environment variables there. Further, the memory settings apply to the JVM, not Tomcat, so I’d set the JAVA_OPTS variable instead: set JAVA_OPTS=-Xmx512m

Running tomcat with eclipse kepler

If you did not install the package Eclipse IDE for Java EE Developers so you have to make sure that you install the plug-in “JST Server Adapters Extensions”. To do so, go to Help->Install New Software… and select the “Kepler” repository. Then expand “Web, XML, Java EE and OSGi Enterprise Development” and check the box … Read more

How can I monitor/log Tomcat’s thread pool?

Direct JMX access Try adding this to catalina.sh/bat: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5005 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false UPDATE: Alex P suggest that the following settings might also be required in some situations: -Dcom.sun.management.jmxremote.host=localhost This enables remote anonymous JMX connections on port 5005. You may also consider JVisualVM which is much more please and allows to browse JMX via plugin. What … Read more

Tomcat won’t stop or restart

I had this error message having started up a second Tomcat server on a Linux server. $CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted. When starting up the 2nd Tomcat I had set CATALINA_PID as asked but my mistake was to set it to a directory (I assumed … Read more

What benefit do I get from JSVC over just using systemd?

In general, most of the functionality provided by jsvc is provided by systemd, with the exception of opening of privileged ports (see below). If possible, it is a very good idea to switch to using systemd functionality directly, since things become simpler and more efficient. Your unit file looks mostly OK, with the exception of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)