Ant: RE: Cocoon 2 (B2) on weblogic 6.1 problem

2001-12-04 Thread Bernhard Huber

hi,
just wait i had a better solution, i think 
logkit needs some dir to write the log files, too.
If you read the servlet spec. you get a temp-directory location
propoesed from the servlet-content, something like
"javax.servlet.tempdir" i think.
Probably its the best to use this directory as a base
dir for writing the cocoon logs, too.
Then it might be possible to deploy cocoon as a single war file.
You then spot other getServletPath() code.
bye

Huber Bernhard, email: [EMAIL PROTECTED], homepage:
members.a1.net/berni_huber/index.html



- Ursprüngliche Nachricht -
Von: Helena Ginzburg <[EMAIL PROTECTED]>
Datum: Dienstag, Dezember 4, 2001 17:52
Betreff: RE: Cocoon 2 (B2) on weblogic 6.1 problem

> 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:[EMAIL PROTECTED] 
> ]
> Sent: Tuesday, December 04, 2001 12:14 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Cocoon 2 (B2) on weblogic 6.1 problem
> 
> 
> hi,
> i posted a description into cocoon-users mail list about my 
> experiencesdeploying 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---
> 
> class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
> logger="root.xslt">
>   
>value="org.apache.xalan.processor.TransformerFactoryImpl"/>
>
> ---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.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 
> consolepermission 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:
> >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.in

Ant: RE: Cocoon 2 (B2) on weblogic 6.1 problem

2001-12-04 Thread Bernhard Huber

Hi,
You are right, in my installation i didn't deployed
cocoon as a single war file, too.

well if you read the spec about Servlet 2.2, 2.3
getRealPath() is allowed to return null.
The solution is to use getResourceX(),
i think in some places of the cocoon code
this has been done - replacing the getRealPath() call -
thus i think it is a bug to use the getRealPath()
in the Logkit code, opening a bugzilla?

bye

Huber Bernhard, email: [EMAIL PROTECTED], homepage:
members.a1.net/berni_huber/index.html



- Ursprüngliche Nachricht -
Von: Helena Ginzburg <[EMAIL PROTECTED]>
Datum: Dienstag, Dezember 4, 2001 17:52
Betreff: RE: Cocoon 2 (B2) on weblogic 6.1 problem

> 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:[EMAIL PROTECTED] 
> ]
> Sent: Tuesday, December 04, 2001 12:14 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Cocoon 2 (B2) on weblogic 6.1 problem
> 
> 
> hi,
> i posted a description into cocoon-users mail list about my 
> experiencesdeploying 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---
> 
> class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
> logger="root.xslt">
>   
>value="org.apache.xalan.processor.TransformerFactoryImpl"/>
>
> ---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.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 
> consolepermission 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:
> >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(S