cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helena Ginzburg <hel...@nomadiq.com>
Subject RE: Cocoon 2 (B2) on weblogic 6.1 problem
Date Tue, 04 Dec 2001 16:52:06 GMT
Hi,
I followed your instructions, but it did not solved the problem.
However, I found where it is not working properly:


CocoonServlet.private void initLogger()
    throws ServletException {
......
        subcontext.put("context-root",
this.servletContext.getRealPath("/"));
......
}
this.servletContext.getRealPath("/") ===> returns null


The problem is that if I put it as a coccon.WAR file it returns null, if I
put it as a directory (cocoon) it returns the expected value
(C:\bea\wlserver6.1\config\mydomain\applications\cocoon), I have to work
with it as a WAR file. Is there any solution for that?

Thanks,
Helena.

-----Original Message-----
From: Bernhard Huber [ mailto:berni_huber@a1.net <mailto:berni_huber@a1.net>
]
Sent: Tuesday, December 04, 2001 12:14 AM
To: cocoon-users@xml.apache.org
Subject: Re: Cocoon 2 (B2) on weblogic 6.1 problem


hi,
i posted a description into cocoon-users mail list about my experiences
deploying cocoon2
at WLS6.1 sucessfully, search the mailing list for wls6.1

As I found the original mail here once again:
Installing Cocoon2 under WLS6.1

I have struggled a bit before I managed to run Cocoon2 under WLS6.1

The following section describes the steps to install Cocoon2 under WLS6.1.
I have installed Cocoon2 under WIN2000:

As WLS6.1 sp1 uses it own XMLParser, and XSLTransformer you have to
force Cocoon to use
the apache xerces, and apache xalan jars.

Edit the following files:

1) Edit your server startup script: (startWebLogic.cmd in your domain
directory)
Add MYCLASSPATH specifying xerxes, and xalan jar of the Cocoon2
distribution.
Append both at the start of the CLASSPATH. This change is neccessary.
--- snipped ---
set
MYCLASSPATH=%MYCLASSPATH%;D:\bea\wlserver6.1\config\cocoon\applications\coco
on\WEB-INF\lib\xerces_1_4_3.jar

set
MYCLASSPATH=%MYCLASSPATH%;D:\bea\wlserver6.1\config\cocoon\applications\coco
on\WEB-INF\lib\xalan-2.1.0.jar


set CLASSPATH=%MYCLASSPATH%;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
...java -classpath %CLASSPATH%....
--- snipped ---

2) Next edit the cocoon.xconf file, be sure to specify the
transformer-factory set to
org.apache.xalan.processor.TransformerFactoryImpl.
    This is very important: Using the WLS6.1 XSLTransformer I couldn't
managed to generate any valid java sitemap file. This change is neccessary.
---snippet---
<!-- XSLT processor:
    -->
    <xslt-processor
class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
logger="root.xslt">
       <parameter name="use-store" value="true"/>
       <parameter name="transformer-factory"
value="org.apache.xalan.processor.TransformerFactoryImpl"/>
    </xslt-processor>
---snippet---

3) You may activate the xerces parser explicitly in cocoon.xconf, too.
Although it is not absolutly necessary.
--snippet--

-Dorg.apache.cocoon.components.parser.Parser=org.apache.cocoon.components.pa
rser.XercesParser

    -->
    <parser class="org.apache.cocoon.components.parser.XercesParser"/>
--snippet--

4) Last you may have to edit lib/weblogic.policy, deactivating any
security-policy setting, allowing to load compiled xsp, and
sitemaps. At my last test this change was not necessary!
--snippet--
grant {
    // make cocoon work ??
    // permission java.security.AllPermission;

    // Permission "enableSubstitution" needed to run the WebLogic console
    permission java.io.SerializablePermission "enableSubstitution";
--snippet--

I hope it helps!

I have not checked the JSPEngine under Cocoon2 + WLS6.1, but it may need
some reconfiguration, too.


Helena Ginzburg wrote:

>Has anyone managed to successfully install Cocoon 2 (B2) on weblogic 6.1?
>I followed the instructions that came with the distribution, but Cocoon
>failed to load during deployment with the following errors:
><Dec 3, 2001 12:05:04 PM IST> <Error> <J2EE> <Error deploying application
>cocoon
>: Could not load cocoon>
>java.lang.reflect.UndeclaredThrowableException:
>java.lang.NullPointerException
>        at java.util.Hashtable.put(Hashtable.java:380)
>        at
>org.apache.avalon.framework.context.DefaultContext.put(DefaultContext
>.java:107)
>        at
>org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java
>:423)
>        at
>org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:132)
>        at
>weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
>pl.java:700)
>        at
>weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
>Impl.java:643)
>        at
>weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
>mpl.java:588)
>        at
>weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
>ervletContext.java:2203)
>        at
>weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
>ServletContext.java:2147)
>        at
>weblogic.servlet.internal.WebAppServletContext.init(WebAppServletCont
>ext.java:884)
>        at
>weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletCo
>ntext.java:807)
>        at
>weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
>        at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
>        at weblogic.j2ee.Application.addComponent(Application.java:160)
>        at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
>oymentTarget.java:329)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
>oymentTarget.java:144)
>        at
>weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
>r.java:76)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
>eanImpl.java:608)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
>.java:592)
>        at
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
>ionMBeanImpl.java:352)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>55)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>23)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>        at $Proxy33.addWebDeployment(Unknown Source)
>        at
>weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
>ployment(WebServerMBean_CachingStub.java:1094)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
>oymentTarget.java:315)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
>loymentTarget.java:279)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
>ments(DeploymentTarget.java:233)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
>DeploymentTarget.java:193)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
>eanImpl.java:608)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
>.java:592)
>        at
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
>ionMBeanImpl.java:352)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>55)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>23)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>        at $Proxy32.updateDeployments(Unknown Source)
>        at
>weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
>yments(ServerMBean_CachingStub.java:2734)
>        at
>weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
>er(ApplicationManager.java:362)
>        at
>weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
>nManager.java:154)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
>eanImpl.java:608)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
>.java:592)
>        at
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
>ionMBeanImpl.java:352)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>55)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>23)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>        at $Proxy44.start(Unknown Source)
>        at
>weblogic.management.configuration.ApplicationManagerMBean_CachingStub
>.start(ApplicationManagerMBean_CachingStub.java:480)
>        at
>weblogic.management.Admin.startApplicationManager(Admin.java:1151)
>        at weblogic.management.Admin.finish(Admin.java:570)
>        at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:506)
>        at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
>        at weblogic.Server.main(Server.java:35)
>--------------- nested within: ------------------
>weblogic.j2ee.DeploymentException: Could not load cocoon - with nested
>exception
>:
>[java.lang.NullPointerException]
>        at
>weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:424)
>        at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
>        at weblogic.j2ee.Application.addComponent(Application.java:160)
>        at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
>oymentTarget.java:329)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
>oymentTarget.java:144)
>        at
>weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
>r.java:76)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
>eanImpl.java:608)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
>.java:592)
>        at
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
>ionMBeanImpl.java:352)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>55)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>23)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>        at $Proxy33.addWebDeployment(Unknown Source)
>        at
>weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
>ployment(WebServerMBean_CachingStub.java:1094)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
>oymentTarget.java:315)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
>loymentTarget.java:279)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
>ments(DeploymentTarget.java:233)
>        at
>weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
>DeploymentTarget.java:193)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
>eanImpl.java:608)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
>.java:592)
>        at
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
>ionMBeanImpl.java:352)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>55)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>23)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>        at $Proxy32.updateDeployments(Unknown Source)
>        at
>weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
>yments(ServerMBean_CachingStub.java:2734)
>        at
>weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
>er(ApplicationManager.java:362)
>        at
>weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
>nManager.java:154)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
>eanImpl.java:608)
>        at
>weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
>.java:592)
>        at
>weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
>ionMBeanImpl.java:352)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>55)
>        at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
>23)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
>        at
>weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
>        at $Proxy44.start(Unknown Source)
>        at
>weblogic.management.configuration.ApplicationManagerMBean_CachingStub
>.start(ApplicationManagerMBean_CachingStub.java:480)
>        at
>weblogic.management.Admin.startApplicationManager(Admin.java:1151)
>        at weblogic.management.Admin.finish(Admin.java:570)
>        at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:506)
>        at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
>        at weblogic.Server.main(Server.java:35)
><Dec 3, 2001 12:05:05 PM IST> <Notice> <Management> <Application
Poller
>started
>for development server.>
><Dec 3, 2001 12:05:05 PM IST> <Notice> <WebLogicServer> <ListenThread
>listening
>on port 80>
><Dec 3, 2001 12:05:06 PM IST> <Notice> <WebLogicServer> <Started
WebLogic
>Admin
>Server "myserver" for domain "mydomain" running in Development Mode>
>
>Thank's. Helena.
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. < http://xml.apache.org/cocoon/faqs.html
<http://xml.apache.org/cocoon/faqs.html> >
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. < http://xml.apache.org/cocoon/faqs.html
<http://xml.apache.org/cocoon/faqs.html> >

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



Mime
View raw message