[opencms-dev] RE: OpenCms 6.2.3 installed on WebSphere 6 andDynamic Cache Service enabled
Alexander Kandzior
alex at opencms.org
Thu Jan 4 13:39:15 CET 2007
Dear Arto,
I assume you are correct that the case of the issue is another request
wrapper that prevents the classcast.
I have attached a version of the CmsRequestUtil class that does not use the
cast but should work just as fine. There's another way to get to the
CmsFlexRequest object then casting. You may try this version and see if it
works.
I must admit I have not had the time to test it, so please let me know if
you have any success using it.
BTW the attached class has been compiled for Java 1.5.
Kind Regards,
Alex.
-------------------
Alexander Kandzior
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
________________________________
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Kauppinen, Arto
Sent: Thursday, January 04, 2007 10:31 AM
To: opencms-dev at opencms.org
Subject: [opencms-dev] RE: OpenCms 6.2.3 installed on WebSphere 6
andDynamic Cache Service enabled
Hi all,
I did some research with this stacktrace (attached
WAS_OpenCms_DynaCache.txt).
There are some questions in the text, please try answer to those.
Request handling process goes like this:
1. WebSphere components receive request
2. Request is passed to OpenCms
3. OpenCms starts to handle request
3.1 OpenCms (CmsJspLoader.load()) initializes new class called
CmsFlexRequest which is extended from
javax.servlet.http.HttpServletRequestWrapper.
3.2 After this OpenCms makes a new request for JSP and puts
CmsFlexRequest as a request object parameter.
3.2 req.getRequestDispatcher(target).forward(<CmsFlexRequest>, res);
4. Request is passed to WebSphere components
--------
4.1 Could it be that in this point the DynaCache functionality does
something to request object, so that it is not anymore a CmsFlexRequest
object?
--------
5. Request is passed back to OpenCms components
5.1 OpenCms (CmsRequestUtil.forwardRequest()) tries to cast the
received HttpServletRequest object back to CmsFlexRequest and this throws a
java.lang.ClassCastException.
Exception is:
Exception thrown : java.lang.ClassCastException:
com.ibm.ws.cache.servlet.CacheProxyRequest at
org.opencms.util.CmsRequestUtil.forwardRequest(CmsRequestUtil.java:420)
I also checked with WebSphere Administrative Console
(Troubleshooting / Class Loader Viewer) that which class loader has which
class. Attached file WAS_OpenCms_DynaCache_ClassLoaders.txt.
Enterprise Application (server1 : opencms_war : opencms.war) > Class
Loader Viewer
WAS Bootstrap Extension Class Loader
* com.ibm.ws.cache.servlet.CacheProxyRequest
* file:/wasdata/AppServer/lib/dynacache.jar
* false
WAS Module - Compound Class Loader
* org.opencms.flex.CmsFlexRequest
*
file:/wasdata/AppServer/profiles/HOBBY/installedApps/WC_HOBBY_cell/opencms_w
ar.ear/opencms.war/WEB-INF/lib/opencms.jar
* false
JDK Application Class Loader
* javax.servlet.http.HttpServletRequest
* file:/wasdata/AppServer/lib/j2ee.jar
* true
JDK Application Class Loader
* javax.servlet.http.HttpServletRequestWrapper
* file:/wasdata/AppServer/lib/j2ee.jar
* false
JDK Application Class Loader
* javax.servlet.ServletRequestWrapper
* file:/wasdata/AppServer/lib/j2ee.jar
* false
--------------
This shows that the CmsFlexRequest, CacheProxyRequest and J2EE
Servlet classes are all loaded by different class loaders, could this cause
the problem?
--------------
What can I do to solve this problem?
Kind Regards,
Arto Kauppinen
________________________________
From: Kauppinen, Arto
Sent: 13. joulukuuta 2006 15:07
To: 'opencms-dev at opencms.org'
Subject: OpenCms 6.2.3 installed on WebSphere 6 and Dynamic Cache
Service enabled
Hi,
We are trying to install and use OpenCms 6.2.3 on WebSphere ND
6.0.2.5 and Oracle 10g. WebSphere is actually installed as a part of
WebSphere Commerce 6.0 installation. OpenCms installation went quite nicely,
I installed opencms.war and after that I ran the installation wizard. After
installation I copied these JDK 1.4 support files to system.
I have also changed the cache property to "bypass" for these files
in OpenCms: "/system/workplace/commons/property*.jsp",
"/system/workplace/editors/editor_main.jsp",
"/system/workplace/editors/fckeditor/filebrowser/connector.jsp".
My problem is that if I enable "Dynamic cache service" in WebSphere
(Application servers>server1>Dynamic cache service), I'll start to receive
"com.ibm.ws.cache.servlet.CacheProxyRequest" errors. Which are actually
"java.lang.ClassCastException" exceptions from that class. This exception
will be raised for example when I try to open "Cache AdministrationTool" in
OpenCms. If I disable "Dynamic cache service" from WebSphere, then I'll not
receive these errors, the problem is that I need this cache service to be
enabled.
What I need to do to get OpenCms work with WebSphere and "Dynamic
cache service" enabled?
Here is the complete stacktrace:
java.lang.ClassCastException:
com.ibm.ws.cache.servlet.CacheProxyRequest
at
org.opencms.util.CmsRequestUtil.forwardRequest(CmsRequestUtil.java:420)
at
org.opencms.workplace.tools.CmsToolManager.jspForwardPage(CmsToolManager.jav
a:496)
at
org.opencms.workplace.administration.CmsAdminDialog.displayDialog(CmsAdminDi
alog.java:100)
at
com.ibm._jsp._admin_2D_main._jspService(_admin_2D_main.java:66)
at
com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:2
42)
at
com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:345)
at
com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:214)
at
com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:224)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1
282)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.
java:673)
at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(Gener
icServletWrapper.java:117)
at
com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPE
xtensionServletWrapper.java:178)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
Dispatcher.java:294)
at
org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:409)
at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:7
30)
at
org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1349)
at
org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:151)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:2
42)
at
com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:345)
at
com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:214)
at
com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:224)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1
282)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.
java:673)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServl
etWrapper.java:89)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1878)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht
tpInboundLink.java:472)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht
tpInboundLink.java:411)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLRea
dCallback.java:101)
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManage
r.java:566)
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java
:619)
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java
:952)
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.jav
a:1039)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1462)
Any help would be appreciated.
Kind regards,
Arto Kauppinen
This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorized to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CmsRequestUtil.zip
Type: application/octet-stream
Size: 12752 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20070104/eedd2ac9/attachment.obj>
More information about the opencms-dev
mailing list