cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Park, Paul" <PP...@eBuilt.com>
Subject RE: [C2] Classpath loading WebLogic (can I help?)
Date Thu, 14 Dec 2000 23:35:16 GMT
We've been using Cocoon2 running on WebLogic 5.1 successfully for our
internal projects until about a week ago.  Our site suddenly stopped working
w/ the new build.  I can run the same build successfully on Tomcat 4.0m5 but
running it on WebLogic 5.1 produces "did not find the stylesheet root!"
exception.

Someone on the list mentioned that this exception is thrown by Xalan
processor when the endDocument() is called without the other SAX events.
Debugging the code at least showed that the InputSource passed to the
tfactory.newTemplates() method correctly points to the sitemap stylesheet
(systemID="zip:/{some-path}/cocoon.jar#org/apache/cocoon/components/language
/markup/sitemap/java/sitemap.xsl".)

However, the calling the newTemplates() method throws the exception:
-------------
javax.xml.transform.TransformerConfigurationException: Did not find the
stylesheet root! at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplate
(TransformerFactoryImpl.java:732)
-------------
I'm beginning to suspect that the incompatibility may exist in Xalan's
codebase ...


To pass in the weblogic.class.path, we patched the setClassPath() method in
CocoonServlet.java (not the most elegant way to handle this but it was a
quick patch for us.)

if (classpathAttribute != null) {
  if (classpathAttribute.startsWith("weblogic"))
    this.classpath = System.getProperty(classpathAttribute.trim()) 
    + File.pathSeparator + (String) System.getProperty("java.class.path");
  else
    this.classpath = (String)
context.getAttribute(classpathAttribute.trim());
} else {
...

and web.xml should now contain

<param-name>classpath-attribute</param-name>
<param-value>weblogic.class.path</param-value>

I don't know if anyone else is able to run the latest build on WebLogic 5.1.
If someone is running Cocoon2 successfully on WebLogic I would like to hear
about it.  Also, I would like to contribute to the group as well.  I'm
working on the concept of an EJB logicsheet ....


Paul Park


 
-----Original Message-----
From: EEAltendorf@thoughtworks.COM [mailto:EEAltendorf@thoughtworks.COM]
Sent: Thursday, December 14, 2000 8:38 AM
To: cocoon-dev@xml.apache.org
Subject: [C2] Classpath loading WebLogic (can I help?)


Hi all,

In Weblogic 5.1, there is no classpath in the ServletContext.getAttributes
() enumeration.  There are two other possibilities of which I know for
loading a classpath.

The command-line specified classpath (the "weblogic classpath" which, as
the installation guide says, should include "all your application code
(stuff that needs to be able to be redeployable)" ) can be accessed with
System.getProperty("weblogic.class.path").

The context parameter weblogic.httpd.servlet.classpath can be set (I
believe) either in the weblogic.properties startup file, or in the web.xml
file specific to your web app.  One property of the servlet classpath is
that Weblogic (claims to) reload classes found in it automatically whenever
they change.   This parameter (should) be accessible in the
ServletContext.getParameterNames() enumeration.

Any suggestions on which of these is more appropriate?  Any particular
opinions on how this should be integrated into the current
classpath-loading system?

I would like to help with Cocoon2 by getting it running reliably and
cleanly on Weblogic, but I'm not sure what I should do.  If anyone can
provide me with some guidance, I'd be happy to help out.  (I must forwarn,
however: my time is quite constrained already, and I'm also going on
vacation soon.)

Eric

Mime
View raw message