Re: why the oscahcetest.jsp in oscache example can not run
Chris Miller <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <[email protected]> |
This is because OSCache's ServletCacheAdministrator calls
session.getServletContext() to retrieve the application scoped cache.
However this method is new in the Servlet 2.3 Spec, so won't run on
containers that are v2.2 or lower.
Originally the ServletCacheAdministrator used to hold a reference to the
ServletContext, however this was a big problem since it meant the
administrator couldn't be serialized.
It's unlikely that this will be fixed, rather the minimum requirements
should state Servlet 2.3.
aswill liu(China) wrote:
> I run the oscahcetest.jsp on weblogic6.1, Then got the error:
>
> [INFO] Config - -Properties {cache.capacity=1000}
> [INFO] ServletCacheAdministrator - -Constructed ServletCacheAdministrator()
> [INFO] ServletCacheAdministrator - -Created new instance of
> ServletCacheAdminist
> rator
> [INFO] ServletCacheAdministrator - -Created new application-scoped cache
> at key:
> __oscache_cache
> [INFO] ServletCacheAdministrator - -Created new cache in scope 4
> [WARN] LRUCache - -When using the LRUCache under JRE 1.3.x,
> commons-collections.
> jar should be added to your classpath to increase OSCache's performance.
> <2003-12-10 下午05时04分46秒> <Error> <HTTP>
> <[WebAppServletContext(2422742,IQS,
> /IQS)] Servlet failed with Exception
> java.lang.NoSuchMethodError
> at
> com.opensymphony.oscache.web.ServletCacheAdministrator.getCache(Servl
> etCacheAdministrator.java:220)
> at
> com.opensymphony.oscache.web.tag.CacheTag.doStartTag(CacheTag.java:44
> 4)
> at jsp_servlet._jsp.__cachetest._jspService(__cachetest.java:132)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:262)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:321)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:198)
> at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
> rvletContext.java:2637)
> at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
> pl.java:2359)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> What's wrong?
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/