You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Campeau, Bradford" <bc...@forbes.com> on 2004/01/22 21:06:42 UTC

Cocoon not liking JSP under Weblogic 7

I'm having problems getting JSP pages that produce XML dynamically to be
transformed under Weblogic 7. The problem seems to be that the
jsp-engine (org.apache.cocoon.components.jsp.JSPEngineImplWLS) was
written for Weblogic 5.1 and references
weblogic.servlet.internal.ServletContextImpl on lines 124 and 168. This
class no longer exists under Weblogic 7, and I'm having a difficult time
figuring out what replaced it. When I try to load any JSP page under
cocoon that produces XML, I get:
 
As a result, when any JSP pages are run, the following error is
produced:
java.lang.NoClassDefFoundError:
weblogic/servlet/internal/ServletContextImpl
            at
org.apache.cocoon.components.jsp.JSPEngineImplWLS.executeJSP(JSPEngineIm
plWLS.java:123)
            at
org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:114
)
            at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process
XMLPipeline(AbstractProcessingPipeline.java:548)
            at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe
line.processXMLPipeline(AbstractCachingProcessingPipeline.java:196)
            at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process
(AbstractProcessingPipeline.java:492)
            at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(
SerializeNode.java:147)
            at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:84)
            at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
nvoke(PreparableMatchNode.java:164)
            at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:108)
            at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
ipelineNode.java:163)
            at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:108)
            at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
PipelinesNode.java:161)
            at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:351)
            at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:304)
            at org.apache.cocoon.Cocoon.process(Cocoon.java:640)
            at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1104)
            at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1058)
            at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:401)
            at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:306)
            at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:5445)
            at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMa
nager.java:780)
            at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3105)
            at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2588)
            at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
 
 
For reference, my transformation is set up as such in the sitemap:
<map:match pattern="ahxml/featured_department.jsp"> 
     <map:generate
src="http://localhost:7001/cocoon/ahxml/featured_department.jsp"
type="jsp"/> 
    <!-- TRANSFORM GOES HERE -->
     <map:transform src="ahxml/xsl/featured_department.xsl">
        <map:parameter name="contextPath"
value="{request:contextPath}"/>
      </map:transform>
     <map:serialize type="html"/> 
</map:match>
 
I have modified the cocoon.xconf to use my.roles with:
<?xml version="1.0"?>
<role-list>
  <role name="org.apache.cocoon.components.jsp.JSPEngine"
    shorthand="jsp-engine"
    default-class="org.apache.cocoon.components.jsp.JSPEngineImplWLS"/>
</role-list>
 
The software in use here is weblogic 7 with JDK 1.3, and Cocoon 2.1.2.
 
Any help or experience with this would be appreciated.
 
Brad Campeau-Laurion
Senior Developer
Information Technology
Forbes Inc.
bcampeau@forbes.com
 
 

Re: Cocoon not liking JSP under Weblogic 7

Posted by Joerg Heinicke <jo...@gmx.de>.
I have no experience with Weblogic so I'm just guessing ...

On 22.01.2004 21:06, Campeau, Bradford wrote:

> I'm having problems getting JSP pages that produce XML dynamically to be
> transformed under Weblogic 7. The problem seems to be that the
> jsp-engine (org.apache.cocoon.components.jsp.JSPEngineImplWLS) was
> written for Weblogic 5.1 and references
> weblogic.servlet.internal.ServletContextImpl on lines 124 and 168. This
> class no longer exists under Weblogic 7, and I'm having a difficult time
> figuring out what replaced it. When I try to load any JSP page under
> cocoon that produces XML, I get:
>  
> As a result, when any JSP pages are run, the following error is
> produced:
> java.lang.NoClassDefFoundError:
> weblogic/servlet/internal/ServletContextImpl

If it does no longer exist, then that error occurs as expected. The JSP 
block is compiled against Weblogic mock classes including 
weblogic.servlet.internal.ServletContextImpl.

> For reference, my transformation is set up as such in the sitemap:
> <map:match pattern="ahxml/featured_department.jsp"> 
>      <map:generate
> src="http://localhost:7001/cocoon/ahxml/featured_department.jsp"

You should not access it via http:, but only point to the file.

> type="jsp"/> 
>     <!-- TRANSFORM GOES HERE -->
>      <map:transform src="ahxml/xsl/featured_department.xsl">
>         <map:parameter name="contextPath"
> value="{request:contextPath}"/>
>       </map:transform>
>      <map:serialize type="html"/> 
> </map:match>
>  
> I have modified the cocoon.xconf to use my.roles with:
> <?xml version="1.0"?>
> <role-list>
>   <role name="org.apache.cocoon.components.jsp.JSPEngine"
>     shorthand="jsp-engine"
>     default-class="org.apache.cocoon.components.jsp.JSPEngineImplWLS"/>
> </role-list>

Maybe you do not longer need Weblogic specific JSPEngine. Can you try 
the standard JSPEngine with or the JSPEngine using a dispatcher.

> The software in use here is weblogic 7 with JDK 1.3, and Cocoon 2.1.2.
>  
> Any help or experience with this would be appreciated.

Just comments, but maybe it helps.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org