Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6925705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:49:26+00:00 2026-05-27T10:49:26+00:00

I have two virtual machines with seemingly identical configuration (created from the same VM

  • 0

I have two virtual machines with seemingly identical configuration (created from the same VM template, and diff’ing the Tomcat folder yielded no difference apart from host name configurations). On both machines, the same web applications are deployed.

One machine works fine. On the other machine, I get errors because classes are not found. I restarted tomcat 3 times, and always get a different error, also in different applications. One such error is this:

java.lang.NoClassDefFoundError: org/springframework/web/context/request/ServletRequestAttributes
    org.springframework.web.context.request.RequestContextListener.requestInitialized(RequestContextListener.java:64)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
    org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
    org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
    org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    java.lang.Thread.run(Thread.java:662)

In every occurence of this error so far, the missing class (e.g. ServletRequestAttributes) resides in the same jar as the class that needs it (e.g. RequestContextListener).

I am using CentOS, Apache 2.2.3, Tomcat 6.0.30 and Oracle JDK 1.6.0_24 on both machines. Tomcat is configured with plenty heap and perm gen space (also identical on both machines).


It seems that Tomcat 6 "losing" classes in production is a similar problem, but without solution so far.

One possible problem named there is “you may have reached the max number of open file handles in the OS”. With rudimentary Linux knowledge, I managed to execute some commands found on the internet, which tell me that

  • max file handles is 6815744 on both machines (cat /proc/sys/fs/file-max),
  • current usage is 10710 on the failing and 10200 on the correct machine (cat /proc/sys/fs/file-nr),
  • max file handles per process is 1024 (ulimit -n),
  • current usage by Tomcat is 641 on the failing and 686 on the correct machine (lsof -p <TOMCAT-PID> | wc -l).

UPDATE: I restarted the failing Tomcat, and opened all applications at once in a browser. The file usage of Tomcat went up to 1926. Now I see a NoClassDefFoundError in almost every application, and I also see this message in one log file:

2011-12-12 18:38:36,225 ERROR [TP-Processor3] [rplansecurity] org.jasig.cas.client.validation.Cas20ServiceTicketValidator java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
    at java.net.Socket.createImpl(Socket.java:397) ~[na:1.6.0_24]

I did the same on the correct Tomcat, and it failed, too. So it seems there is no difference in the two machines here: Both seem to open too many files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:49:27+00:00Added an answer on May 27, 2026 at 10:49 am

    Max number of open files exceeded would be my first thought. I also think that ‘ulimit -n’ shows max file handles per user and not per process, but I might be wrong. Keep in mind that Tomcat might run under different user as well.

    I would try to start tomcat with ‘-verbose:class’ to see which classes and from where are being loaded to try to see if there are any sort of pattern there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two Virtual machines on an external server. VM1 is the Tomcat server
Is it possible to have two virtual directories under the same website in IIS
I have two identical tables and need to copy rows from table to another.
We have two virtual machines on a server. We have Sql server installed on
I have two applications running in the same java virtual machine, and both use
i have two delphi xe installled in different virtual machines (Running in Windows 7
I have two servers (virtual machines - I can remotely connect to these) -
I have two virtual hosts on windows(for example: test1.dev and test2.dev). But it always
I have a question, here are two classes below: class Base{ public: virtual void
HELP! I just setup a virtual host for two sites that have a lot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.