I have 3 applications up on my Tomcat and everything worked fine leading up to this mess.
Before I begin, I am in need of reconfiguring my tomcat logging as this may not be working, but I feel that my application fails to start for a reason that could be put down to erroneous configuring of a Filter I implemented as a first timer today:
package org.thejarbar.web.filters;
import java.io.*;
import java.util.regex.Pattern;
import javax.servlet.*;
import javax.servlet.http.*;
public final class JSessionFilter implements Filter {
public void init(FilterConfig filterConfigObj) {
}
public void doFilter(ServletRequest _req, ServletResponse _res,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) _req;
HttpServletResponse res = (HttpServletResponse) _res;
String url =req.getRequestURL().toString();
if(Pattern.compile(Pattern.quote("jsessionid"), Pattern.CASE_INSENSITIVE).matcher(url).find()){
String redirectURL = "http://thejarbar.org";
res.setStatus(res.SC_MOVED_PERMANENTLY);
res.setHeader("Location",redirectURL);
res.setHeader( "Connection", "close" );
}
chain.doFilter(req, res);
}
public void destroy() { }
}
Configured in web.xml:
<filter>
<filter-name>sessionFilter</filter-name>
<filter-class>org.thejarbar.web.filters.JSessionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sessionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
I suspect a memory issue, but don’t know what command to run on my Unix guest for this, and deleting my biggest application next to my main application does not resolve this (this should free up enough resources).
Is there anything visible in what I posted that could be to blame and rectified?
The applications:enter link description here and enter link description here seem to be deployed but can’t be accessed (if you try).
On my development system all runs smoothly.
Edit Managed to get a log file up again:
INFO | jvm 1 | 2012/06/23 01:19:58 | Jun 23, 2012 1:19:58 AM org.apache.catalina.startup.Catalina start
INFO | jvm 1 | 2012/06/23 01:19:58 | SEVERE: Catalina.start:
INFO | jvm 1 | 2012/06/23 01:19:58 | org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.apache.catalina.startup.Catalina.start(Catalina.java:624)
INFO | jvm 1 | 2012/06/23 01:19:58 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2012/06/23 01:19:58 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
INFO | jvm 1 | 2012/06/23 01:19:58 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
INFO | jvm 1 | 2012/06/23 01:19:58 | at java.lang.reflect.Method.invoke(Method.java:597)
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
INFO | jvm 1 | 2012/06/23 01:19:58 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2012/06/23 01:19:58 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
INFO | jvm 1 | 2012/06/23 01:19:58 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
INFO | jvm 1 | 2012/06/23 01:19:58 | at java.lang.reflect.Method.invoke(Method.java:597)
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:264)
INFO | jvm 1 | 2012/06/23 01:19:58 | at java.lang.Thread.run(Thread.java:662)
INFO | jvm 1 | 2012/06/23 01:19:58 | Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
INFO | jvm 1 | 2012/06/23 01:19:58 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
I resolved my issue. My hosting provider has outdated documentation of where my tomcat logging is found. Namely my
catalina.outwas undervar/log/tomcat7location and nowhere under/opt/tomcat7.Viewing the logs I saw
UnsupportedClassVersionException and downloaded a jdk that matches my production environment. Sorry for the inconvenience.