Cache manager error using Railo 4.0 beta 2

382 views
Skip to first unread message

Zenom

unread,
Oct 16, 2012, 10:59:39 AM10/16/12
to ra...@googlegroups.com
Hello,
Yesterday I've installed Railo 4.0 beta 2 for testing purposes, and at first it was really nice, and a lot faster. But when I tried to access a second application, it threw an error saying that an unnamed cache instance was already running and the second application did not start. Using Railo 3.3 this issue does not occur. Here's my setup:

Apache 2.2 + Railo connector
Railo 4.0 beta 2 (with tomcat) - fresh install

Also, here's my applications setup:
My applications are inside different folders and every one of them has an Application.cfc file that extends from another one that is common between all applications. When I run any of these applications right after starting Railo, they run normally without any issues, but all the other applications start throwing the Cache Manager error. I've tried to use a separate ehcache.xml for each application, but it did not work. Any suggestions?

Zenom

unread,
Oct 23, 2012, 8:01:40 PM10/23/12
to ra...@googlegroups.com
Anyone?

Matt Quackenbush

unread,
Oct 23, 2012, 8:09:20 PM10/23/12
to ra...@googlegroups.com
I've never seen anything like you're describing. I am also guessing that folks are going to need a lot more information from you in order to steer you in the right direction.

* What is the exact error message?
* What is the stack trace?
* Can you recreate the issue in a very simple test case that folks can run and check against?

I'm sure there will be other questions, too, but the answers to those should help quite a bit.

Joe Brislin

unread,
Feb 8, 2013, 11:55:13 AM2/8/13
to ra...@googlegroups.com
Tom,

Did you ever find a solution to this problem? I've run across the same issue. I'm currently running 4.0.2.002. I installed EhCache through the extensions. The first cache setups fine but as I add a second cache I receive the errors. After the second one is added, you cannot verify either one of them through the Railo admin without receiving an error.

Thanks,
Joe Brislin

On Saturday, November 17, 2012 6:21:26 PM UTC-5, Tom Miller wrote:
I'm getting exactly the same error. I'm using the EHCache add-on (not EHCache-lite).

I can really only get one cache working; as soon as I add another cache, the server poops - I get nullPointers everywhere, and I have to remove the second cache otherwise absolutely nothing works.

Interestingly, when I add the first cache, it works, but I get this in the logs:

SLF4J: The requested version 1.5.5 by your slf4j binding is not compatible with [1.6]

After reading the EHCache install.cfc, it says: "you cannot install ""EHCache"" and ""EHCache Lite"" at the same time, please first uninstall ""EHCache Lite"", to install ""EHCache"".

However, EHCache-lite isn't an extension in Railo 4, it looks like it's core - so how would I get rid of it??

When I add the second cache, in the Railo logs I get the following:

net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.
The source of the existing CacheManager is: InputStreamConfigurationSource [stream=java.io.ByteArrayInputStream@c8c164]
        at net.sf.ehcache.CacheManager.assertNoCacheManagerExistsWithSameName(CacheManager.java:458)
        at net.sf.ehcache.CacheManager.init(CacheManager.java:355)
        at net.sf.ehcache.CacheManager.<init>(CacheManager.java:323)
        at railo.extension.io.cache.eh.EHCache.init(EHCache.java:114)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at railo.runtime.config.ConfigWebFactory.loadCache(ConfigWebFactory.java:2088)
        at railo.runtime.config.ConfigWebFactory.load(ConfigWebFactory.java:354)
        at railo.runtime.config.ConfigServerFactory.load(ConfigServerFactory.java:107)
        at railo.runtime.config.ConfigServerFactory.newInstance(ConfigServerFactory.java:68)
        at railo.runtime.engine.CFMLEngineImpl.getConfigServerImpl(CFMLEngineImpl.java:167)
        at railo.runtime.engine.CFMLEngineImpl.<init>(CFMLEngineImpl.java:103)
        at railo.runtime.engine.CFMLEngineImpl.getInstance(CFMLEngineImpl.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at railo.loader.engine.CFMLEngineFactory.getEngine(CFMLEngineFactory.java:627)
        at railo.loader.engine.CFMLEngineFactory.getCore(CFMLEngineFactory.java:297)
        at railo.loader.engine.CFMLEngineFactory.initEngine(CFMLEngineFactory.java:238)
        at railo.loader.engine.CFMLEngineFactory._restart(CFMLEngineFactory.java:356)
        at railo.loader.engine.CFMLEngineFactory.removeLatestUpdate(CFMLEngineFactory.java:498)
        at railo.loader.engine.CFMLEngineFactory.removeLatestUpdate(CFMLEngineFactory.java:464)
        at railo.runtime.config.ConfigWebAdmin._removeUpdate(ConfigWebAdmin.java:2789)
        at railo.runtime.config.ConfigWebAdmin.removeLatestUpdate(ConfigWebAdmin.java:2774)
        at railo.runtime.tag.Admin.doRemoveUpdate(Admin.java:762)
        at railo.runtime.tag.Admin._doStartTag(Admin.java:705)
        at railo.runtime.tag.Admin.doStartTag(Admin.java:318)
        at admin.services_update_cfm414$cf.call(/Users/mic/Projects/Railo/Source2/railo/railo-cfml/railo-admin/admin/services.update.cfm:45)
        at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:801)
        at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:748)
        at admin.web_cfm$cf.call(/Users/mic/Projects/Railo/Source2/railo/railo-cfml/railo-admin/admin/web.cfm:473)
        at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:801)
        at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:748)
        at admin.server_cfm$cf.call(/Users/mic/Projects/Railo/Source2/railo/railo-cfml/railo-admin/admin/server.cfm:2)
        at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:801)
        at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:753)
        at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:187)
        at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18)
        at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2248)
        at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2215)
        at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:312)
        at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:722)

John Whish

unread,
Feb 8, 2013, 2:43:15 PM2/8/13
to ra...@googlegroups.com
I've had this issue, which seems to have been fixed in the bleeding
edge version (4.0.3.004). It is bleeding edge, but I've been using it
for development and been stable.

- John
> --
> You received this message because you are subscribed to the Google Groups
> "Railo" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to railo+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Joe Brislin

unread,
Feb 8, 2013, 4:12:11 PM2/8/13
to ra...@googlegroups.com
That's got it working. Thanks John. Unfortunately, it's not optimal being a production server but it's looking like it will have to do for now.

-- 
Joe Brislin

Michael Offner

unread,
Feb 8, 2013, 4:53:28 PM2/8/13
to ra...@googlegroups.com
I'm not aware that we did a fix for this, can you please open a ticket in jira

Tnx Micha 

Von meinem iPad gesendet

John Whish

unread,
Feb 8, 2013, 5:18:26 PM2/8/13
to ra...@googlegroups.com
Sorry for the confusion Micha & Joe, when I say fixed, I mean it seems
to be working now, rather than a specific bug fix had been applied to
make it work :)

Joe Brislin

unread,
Feb 13, 2013, 6:05:19 PM2/13/13
to ra...@googlegroups.com
Micha,

I entered a JIRA issue for this since I have been able to replicate it on multiple platforms. The current stable version (4.0.2.002) is affected but it is working in the current bleeding edge version (4.0.3.004).


-- 
Joe Brislin

Igal @ getRailo.org

unread,
Feb 13, 2013, 7:01:38 PM2/13/13
to ra...@googlegroups.com
hi Joe --

so just to confirm:  in 4.0.3.004 you can not replicate this issue?


Igal

Joe Brislin

unread,
Feb 14, 2013, 11:20:20 AM2/14/13
to ra...@googlegroups.com
Yes that is correct. Since I've upgraded to 4.0.3.004, I have not been able to replicate this issue.

-- 
Joe Brislin

Phil Sweeney

unread,
Mar 2, 2013, 3:15:56 AM3/2/13
to ra...@googlegroups.com
I am seeing something similar when I startup web contexts in parallel using Tomcat parameter startStopThreads on the Engine tag.  Without this it starts without exceptions.

I'm just using ehcache built into Railo for session cache.

Railo version: 4.0.4.000

Phil

Tjarko Rikkerink

unread,
Mar 3, 2013, 12:23:26 PM3/3/13
to ra...@googlegroups.com
This is again happening with 4.0.4.000 installed this morning and crashed most of my servers within minutes.

Nullpointer errors, cachemanager stops, TimeToIdle errors... you name it.. everything was flying by in no time.

Michael Offner

unread,
Mar 3, 2013, 2:34:01 PM3/3/13
to ra...@googlegroups.com
We need more details to help you

Micha

Von meinem iPad gesendet

Am 03.03.2013 um 18:23 schrieb Tjarko Rikkerink <tja...@carlosgallupa.com>:

This is again happening with 4.0.4.000 installed this morning and crashed most of my servers within minutes.

Nullpointer errors, cachemanager stops, TimeToIdle errors... you name it.. everything was flying by in no time.

John Whish

unread,
Mar 20, 2013, 10:20:23 AM3/20/13
to ra...@googlegroups.com
Just upgraded from 4.0.3.005 to 4.0.4.001 and the issue is back.

Here's the info:

Railo 4.0.4.001 Error (net.sf.ehcache.CacheException)
Message
Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.
The source of the existing CacheManager is: InputStreamConfigurationSource [stream=java.io.ByteArrayInputStream@7065ec20]
Cause net.sf.ehcache.CacheException
Java Stacktrace
Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.
The source of the existing CacheManager is: InputStreamConfigurationSource [stream=java.io.ByteArrayInputStream@7065ec20] 
   at net.sf.ehcache.CacheManager.assertNoCacheManagerExistsWithSameName(CacheManager.java:458):458 
   at net.sf.ehcache.CacheManager.init(CacheManager.java:355):355 
   at net.sf.ehcache.CacheManager.<init>(CacheManager.java:340):340 
   at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:131):131 
   at org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.start(RegionFactoryCacheProviderBridge.java:72):72 
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:250):250 
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385):1385 
   at railo.runtime.orm.hibernate.HibernateORMEngine.getSessionFactory(HibernateORMEngine.java:279):279 
   at railo.runtime.orm.hibernate.HibernateORMEngine.init(HibernateORMEngine.java:117):117 
   at railo.runtime.config.ConfigImpl.getORMEngine(ConfigImpl.java:3195):3195 
   at railo.runtime.config.ConfigImpl.resetORMEngine(ConfigImpl.java:3181):3181 
   at railo.runtime.orm.ORMUtil.resetEngine(ORMUtil.java:46):46 
   at railo.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:369):369 
   at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:90):90 
   at railo.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:78):78 
   at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2255):2255 
   at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2222):2222 
   at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:315):315 
   at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722):722 
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305 
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210 
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225):225 
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169):169 
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472):472 
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168):168 
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98):98 
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118 
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407 
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999):999 
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565):565 
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307):307 
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source):-1 
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1
   at java.lang.Thread.run(Unknown Source):-1 

Rolling back to 4.0.3.005 does not fix the issue (even after a restart), even though it was working prior to upgrading from 4.0.3.005 to 4.0.4.001.

As a side note - is thgere anywhere where I can download old releases like 4.0.3.005? I tried to modify the download URL but it didn't work.

Thanks!

Igal @ getRailo.org

unread,
Mar 20, 2013, 12:23:10 PM3/20/13
to ra...@googlegroups.com
you can download an older version from http://www.getrailo.org/index.cfm/download/olderversions/

do you create cache regions in your code?  can you show the code snippet that triggers this error?  could a simple fix be to use #Application.ApplicationName# as the name for the Cache object so that no more than one unnamed cache object is created?

Joe Brislin

unread,
Mar 20, 2013, 12:28:05 PM3/20/13
to ra...@googlegroups.com, ra...@googlegroups.com

John,


Do you have the secondary cache enabled in ORM? I had figured out that this being enabled triggers the error that you posted. 

Thanks,
Joe
Joe Brislin
BlueRidge Interactive
(540) 525-5048

John Whish

unread,
Mar 20, 2013, 1:35:49 PM3/20/13
to ra...@googlegroups.com
Hi Joe,

Yes, 99% sure it's the second level cache in ORM that's doing it. 

Cheers,

John

John Whish

unread,
Mar 20, 2013, 1:37:54 PM3/20/13
to ra...@googlegroups.com
Thanks Igal - that's really helpful.

I almost certain it's the hibernate second level cache that's doing it - it was last time I saw this error. I don't believe I can specify the cache name that hibernate uses?

- John

Igal @ getRailo.org

unread,
Mar 20, 2013, 1:44:16 PM3/20/13
to ra...@googlegroups.com
I am actually not sure.  I am not a big fan of ORM myself.

Denny had some comments on this issue a few weeks back on the JIRA.  read the comments at
https://issues.jboss.org/browse/RAILO-2233 and see if it helps.

also, maybe Joe can shed some light with how he resolved this?


Igal

Joe Brislin

unread,
Mar 20, 2013, 2:13:26 PM3/20/13
to ra...@googlegroups.com
I actually have not been able to resolve it yet. I've had to temporarily turn off the secondary cache for ORM.

-- 
Joe Brislin

You received this message because you are subscribed to a topic in the Google Groups "Railo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/railo/nCzEcqB5RO4/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to railo+un...@googlegroups.com.

Igal Sapir

unread,
Mar 20, 2013, 2:14:55 PM3/20/13
to Railo List

You guys should vote for the open ticket in the JIRA. 

As a general guideline -- issues that affect many users get a higher priority than issues that affect few.

--
typos, misspels, and other weird words brought to you courtesy of my mobile device and its auto-(in)correct feature.

John Whish

unread,
Mar 20, 2013, 4:01:10 PM3/20/13
to ra...@googlegroups.com
I've voted for:
https://issues.jboss.org/browse/RAILO-2296

but I think this ticket is related if people want to vote for this as well:

Thanks!
Reply all
Reply to author
Forward
0 new messages