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 7180707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:24:18+00:00 2026-05-28T17:24:18+00:00

I’m trying to deploy two or more independent Play! (1.2.4) based projects to the

  • 0

I’m trying to deploy two or more independent Play! (1.2.4) based projects to
the same Jetty instance.

According to this post it apparently is possible to extract the
common lib’s from each PrjName.war/WEB-INF/lib directory and place
them into a shared lib directory i.e. jetty/lib/ext.

We have a large number of smaller independent projects that we would
like to implement using Play! but all need to be deployed in the same
Jetty instance sharing all the libs to reduce RAM usage. Is my assumption correct that several projects sharing the same lib’s will reduce the overall memory footprint?

My attempts putting all the libs in a shared location i.e. jetty/lib/ext worked for a single project but deploying the second project fails
and breaks the first one.

It appears to be an issue with conflicting EhCache instances.

Here is the jetty log:

...
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.eclipse.jetty.start.Main.invokeMain(Main.java:469)
       at org.eclipse.jetty.start.Main.start(Main.java:612)
       at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
       at org.eclipse.jetty.start.Main.main(Main.java:79)
Caused by: net.sf.ehcache.ObjectExistsException: Cache play already
exists
       at net.sf.ehcache.CacheManager.addCache(CacheManager.java:859)
       at play.cache.EhCacheImpl.<init>(EhCacheImpl.java:32)
       at play.cache.EhCacheImpl.newInstance(EhCacheImpl.java:41)
       at play.cache.Cache.init(Cache.java:241)
       at play.Play.start(Play.java:511)
       ... 42 more

Any help is greatly appreciated.

  • 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-28T17:24:19+00:00Added an answer on May 28, 2026 at 5:24 pm

    When you use shared jars, Jetty will use the System’s Classloader to load classes inside the shared jars. And, since Play EhCacheImpl is (almost) a singleton, the second application to start will influence the first and vice versa. That is the exception you are getting now: Play is trying to instance two caches, in the same classloaders, with the same name. I can think about the following solutions:

    1. Fix Playframework so that it can handle this situation
    2. Use your own cache implementation (not sure if this is the only thing that prevents your both applications to work together)
    3. Use a common setup and replicate jars for each application.

    The option 3 sounds better to me, since you don’t have to chance the framework and it is also more secure regarding regression bugs. About the memory footprint, you can use visualvm to validate if the memory consumption is significantly different to justify shared jars.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.