You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Simon Dutil <s....@gmail.com> on 2004/09/16 21:11:24 UTC

Lenya and OC4J - A solution

Hi list,

When i first tried Lenya, I had some troubles making it work in OC4J. 
Having not found any solution after a few days, i deployed it in
tomcat to see what it looks like.  I've been really impressed by Lenya
and cocoon (two thumbs up to everyone behind this!).  Recently, I
convinced our organisation to chose Lenya as our new Cms, and i had to
find (quick) a solution to my Oc4j problem...So yesterday, i have
worked all day on this issue and i finally managed to make Lenya work
on our server!

So this mail is intent to new user of Lenya, who plan to deploy it in
OC4J, so they dont waste any time on this classic and annoying Oracle
library issue!
With a few more details and better explanations, maybe this could be
added in the Lenya's wiki !

The solution :

Firstly, Oracle AS use by default its own xml SAX Parser.  Cocoon work
with the xerces parser, so using the oracle xml parser gives a
classdefnotfound exception wich is catched by cocoon (when trying to
acces to Lenya welcome page http://myhost/lenya)

So, the first thing to do, is to set the container to use the Sax
parser from xerces instead of the one from oracle.  But Oracle isnt
implementing the xerces library (xercesimpl.jar), so you have to add
it.

Plus, Oracle 10g AS use xalan version 2.0.0, and you need at least the
version 2.5.0 for Lenya, so you have to add the latest xalan too.

Note : If you add the libraries to the "applib" folder, maybe that you
will encounter libraries conflicts and probably that the old xalan
will still be used by your container.

Like with tomcat, youll have to force the jre to use your library
instead of the one in the bootstrap libraries (mainly in rt.jar for
Oracle 10g AS).

So you have to create the "endorsed" folder in your jdk directory used
by OracleAS, under $ora10gASHome\jdk\jre\lib\.  Just add to it the
last xercesImpl.jar, xalan.jar and xml-apis.jar and restart the server
( restarting only the container wont change anything since you need
the server to take in consideration "your newly created endorsed
folder") .

Great! Now all of the required libraries are loaded, but we still have
to tell the container to use xerces and xalan.

This can be done by adding the fellowings in the java options line (
In Oracle Enterprise manager : YourContainer > ServerProperties ) :

-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser 
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl

I havent encounter any "outofmemory" error, but just to be sure this
wouldnt happen, i set -Xms and -Xmx to 512m

-Xms512m
-Xmx512m

This solution have worked for me ( Oracle 10g As ), i haven't saw any
other exceptions, related or not, to libraries issues.  But i still
havent found the time to take a close look at the logs!

Hope this help!

Regards,

Simon

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


Re: Lenya and OC4J - A solution

Posted by Simon Dutil <s....@gmail.com>.
On Thu, 16 Sep 2004 22:48:07 +0200, Gregor J. Rothfuss
<gr...@apache.org> wrote:
> Simon Dutil wrote:
> > Hi list,
> >
> > When i first tried Lenya, I had some troubles making it work in OC4J.
> > Having not found any solution after a few days, i deployed it in
> > tomcat to see what it looks like.  I've been really impressed by Lenya
> > and cocoon (two thumbs up to everyone behind this!).  Recently, I
> > convinced our organisation to chose Lenya as our new Cms, and i had to
> > find (quick) a solution to my Oc4j problem...So yesterday, i have
> > worked all day on this issue and i finally managed to make Lenya work
> > on our server!
> 
> could you wikify this?
> 

Yeah Sure! As soon as i am an 100% sure on how OC4J is handling the
patched jre...

Simon

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


Re: Lenya and OC4J - A solution

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Simon Dutil wrote:
> Hi list,
> 
> When i first tried Lenya, I had some troubles making it work in OC4J. 
> Having not found any solution after a few days, i deployed it in
> tomcat to see what it looks like.  I've been really impressed by Lenya
> and cocoon (two thumbs up to everyone behind this!).  Recently, I
> convinced our organisation to chose Lenya as our new Cms, and i had to
> find (quick) a solution to my Oc4j problem...So yesterday, i have
> worked all day on this issue and i finally managed to make Lenya work
> on our server!

could you wikify this?

-- 
Gregor J. Rothfuss
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://wyona.com                   http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com                       gregor@apache.org

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


Re: Lenya and OC4J - A solution

Posted by Simon Dutil <s....@gmail.com>.
Sorry, my mistake, those lines are optional :

-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl

Actually, we dont want our application server to use xerces sax parser
for every of its applications, so we had to place xercesimpl.jar in
the container applib folder instead of endorsed folder.
And apparently that both of the lines are only required in this specific case.

I guess that the only thing that really need to be done afterall is
the creation of the endorsed folder as usual...

Simon

On Thu, 16 Sep 2004 15:11:24 -0400, Simon Dutil <s....@gmail.com> wrote:
> Hi list,
> 
> When i first tried Lenya, I had some troubles making it work in OC4J.
> Having not found any solution after a few days, i deployed it in
> tomcat to see what it looks like.  I've been really impressed by Lenya
> and cocoon (two thumbs up to everyone behind this!).  Recently, I
> convinced our organisation to chose Lenya as our new Cms, and i had to
> find (quick) a solution to my Oc4j problem...So yesterday, i have
> worked all day on this issue and i finally managed to make Lenya work
> on our server!
> 
> So this mail is intent to new user of Lenya, who plan to deploy it in
> OC4J, so they dont waste any time on this classic and annoying Oracle
> library issue!
> With a few more details and better explanations, maybe this could be
> added in the Lenya's wiki !
> 
> The solution :
> 
> Firstly, Oracle AS use by default its own xml SAX Parser.  Cocoon work
> with the xerces parser, so using the oracle xml parser gives a
> classdefnotfound exception wich is catched by cocoon (when trying to
> acces to Lenya welcome page http://myhost/lenya)
> 
> So, the first thing to do, is to set the container to use the Sax
> parser from xerces instead of the one from oracle.  But Oracle isnt
> implementing the xerces library (xercesimpl.jar), so you have to add
> it.
> 
> Plus, Oracle 10g AS use xalan version 2.0.0, and you need at least the
> version 2.5.0 for Lenya, so you have to add the latest xalan too.
> 
> Note : If you add the libraries to the "applib" folder, maybe that you
> will encounter libraries conflicts and probably that the old xalan
> will still be used by your container.
> 
> Like with tomcat, youll have to force the jre to use your library
> instead of the one in the bootstrap libraries (mainly in rt.jar for
> Oracle 10g AS).
> 
> So you have to create the "endorsed" folder in your jdk directory used
> by OracleAS, under $ora10gASHome\jdk\jre\lib\.  Just add to it the
> last xercesImpl.jar, xalan.jar and xml-apis.jar and restart the server
> ( restarting only the container wont change anything since you need
> the server to take in consideration "your newly created endorsed
> folder") .
> 
> Great! Now all of the required libraries are loaded, but we still have
> to tell the container to use xerces and xalan.
> 
> This can be done by adding the fellowings in the java options line (
> In Oracle Enterprise manager : YourContainer > ServerProperties ) :
> 
> -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
> -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
> 
> I havent encounter any "outofmemory" error, but just to be sure this
> wouldnt happen, i set -Xms and -Xmx to 512m
> 
> -Xms512m
> -Xmx512m
> 
> This solution have worked for me ( Oracle 10g As ), i haven't saw any
> other exceptions, related or not, to libraries issues.  But i still
> havent found the time to take a close look at the logs!
> 
> Hope this help!
> 
> Regards,
> 
> Simon
>

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