Re: Axis Fault, Xerces sees the webapp as stopped although it is running
I noticed that this happens after we stop and restart the context but does not happen right after we restart tomcat. To answer your question, there are other web applications on the server but those are not stopped or restarted. Maybe it's because stopping the context did not correctly deregister the Soap service ? We followed the axis documentation instructions for when using tomcat and declared the AxisServlet in web.xml and assigned it a url-pattern. I am not sure if any additional steps are required for the servlet to correctly de-register ( the documentation mentions the use of a file called undeploy.wsdd but this only applies when running axis standalone ) There is the possibility that XMLGregorianCalendarImpl$DaysInMonth has 2 versions: the one in xercesImpl and the one in jdk-1.8 and maybe they conflict with each other although they are not in the same package ( org.apache.xerces.jaxp.datatype != com.sun.org.apache.xerces.internal.jaxp.datatype ) My automated test deploys a new version of the webapp and performs some testing in which it has to restart the context to continue testing. Then that exception occurs. I noticed that it does not happen when I have another version of the same webapp that stays deployed on the same tomcat. Thinking the bug was related to org.apache.axis.utils.XMLUtils.documentBuilder that uses a ThreadLocalDocumentBuilder, I tried adding a filter that I found online to close the leaks but that did not fix it. About this : > The trick to fixing this is figuring out what code is performing this JVM level registration and moving that code from the web application to $CATALINA_BASE/lib What java method call should I be searching for in libraries source code ? Simon On Tue, Apr 22, 2025 at 12:02 PM Mark Thomas wrote: > On 22/04/2025 16:44, Simon Arame wrote: > > > > > What is strange is that although it says "this web application instance > has > > been stopped already", the web application is still running, end users > are > > still receiving 200 OKs from the web application. > > Any other web applications running on that Tomcat instance? > > Has the web application with the issue ever been restarted / reloaded? > > > We are not sure what causes this because it does not always happen, it is > > "intermittent". The SoapBindingStub is called from a JSP which is aimed > to > > simulate a call to a Soap service as if it was coming from outside of > this > > app. > > So the jsp that made the call received this 500 error from the Soap > service > > but this is unusual. > > What you are seeing is the web application attempting to use classes > that were loaded by a different/"older version of the current" web > application. > > This sort of thing can happen when a web application (or a library is > uses) registers something at the JVM level which then becomes a global > resource rather than a web application specific resource. > > The trick to fixing this is figuring out what code is performing this > JVM level registration and moving that code from the web application to > $CATALINA_BASE/lib > > If it is a library the application is using, this is relatively simple. > If it is the application then things get trickier. > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Help with Cluster Setup on Tomcat 9
We have a cluster of tomcat servers on AWS EC2 which operate behind an AWS load balancer with sticky sessions. We have our session storage on a DB using a JDBC store which for the most part is working well, but we occasionally see duplicate session ids which create issues where a new session with a duplicate session id hijacks an existing session. As you can imagine we would like to prevent this from occurring and have been looking into the issue. It looks like using the cluster tag might be the solution but I wanted to tap into the collective wisdom of the group on the best way forward. We can't just add the | | tag as it uses ip multicast which doesn't work in EC2 as there is no physical broadcast layer. The alternative appears to be to use the StaticMemebrshipService and I wanted to confirm if my config ideas are correct? I have the following setup: Does this look right to others and do I need a separate Member tag for each member of the cluster? I'd appreciate any assistance on this and other suggestions you guys may have. Z.
Re: Help with Cluster Setup on Tomcat 9
> On 2025 Apr 23, at 20:02, Zoran Avtarovski wrote: > > We have a cluster of tomcat servers on AWS EC2 which operate behind an AWS > load balancer with sticky sessions. > > We have our session storage on a DB using a JDBC store which for the most > part is working well, but we occasionally see duplicate session ids which > create issues where a new session with a duplicate session id hijacks an > existing session. > > As you can imagine we would like to prevent this from occurring and have been > looking into the issue. It looks like using the cluster tag might be the > solution but I wanted to tap into the collective wisdom of the group on the > best way forward. We can't just add the > > | | > > tag as it uses ip multicast which doesn't work in EC2 as there is no physical > broadcast layer. The alternative appears to be to use the > StaticMemebrshipService and I wanted to confirm if my config ideas are > correct? I have the following setup: > > className="org.apache.catalina.tribes.membership.StaticMembershipService"> > host="10.0.1.11" port="4004" > uniqueId="{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}"/> > host="10.0.1.12" port="4004" > uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}"/> > > > Does this look right to others and do I need a separate Member tag for each > member of the cluster? > > I'd appreciate any assistance on this and other suggestions you guys may have. Have you specified a unique jvmRoute attribute in the element of each Tomcat server? https://tomcat.apache.org/tomcat-9.0-doc/config/engine.html#Common_Attributes - Chuck