You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sebastian Hauer <ha...@uni-freiburg.de> on 2000/02/29 00:56:46 UTC

config question (Cocoon 1.7)

Hi,

I just more or less successfully setup cocoon.
It was a little tricky and I had to change some stuff I had not expected
to.

The funny thing is that cocoon is running and I have no problems to
transform my xml files into html.
But when ever I try to do a :

http://localhost/Cocoon.xml

All I get is a:
---------------------------------snip----------------------------------
                      Publishing Engine could not be initialized.

java.lang.RuntimeException: 
Error creating org.apache.cocoon.processor.ldap.LdapProcessor: 
make sure the needed classes can be found in the classpath
(javax/naming/directory/DirContext)
              at org.apache.cocoon.framework.Manager.create(Manager.java:102)
              at org.apache.cocoon.framework.Router.init(Router.java:80)
              at org.apache.cocoon.framework.Manager.create(Manager.java:89)
              at org.apache.cocoon.Engine.(Engine.java:155)
              at org.apache.cocoon.Engine.getInstance(Engine.java:190)
              at org.apache.cocoon.Cocoon.init(Cocoon.java:119)
              at org.apache.jserv.JServServletManager.load_init(
			JServServletManager.java:569)
              at org.apache.jserv.JServServletManager.loadServlet(
			JServServletManager.java:488)
              at org.apache.jserv.JServConnection.processRequest(
			JServConnection.java:266)
              at org.apache.jserv.JServConnection.run(JServConnection.java:188)
              at java.lang.Thread.run(Thread.java:475)
-------------------snap----------------------------------------------------

and I don't know why.
Well as I mentioned I had to do some changes to get cocoon actually
running.

Here are some lines out of my jserv.properties:
-------------snip-------------------------
wrapper.bin=/usr/lib/jdk1.2.2/bin/java
wrapper.classpath=/usr/local/apache/libexec/ApacheJServ.jar
wrapper.classpath=/usr/lib/jsdk/lib/jsdk.jar
#wrapper.classpath=/usr/local/servlets/cocoon/lib/servlet_2_2.jar
wrapper.classpath=/usr/local/servlets/cocoon/bin/cocoon.jar
wrapper.classpath=/usr/local/servlets/cocoon/lib/fop_0_12_1.jar
wrapper.classpath=/usr/local/servlets/cocoon/lib/xalan_0_19_4.jar
wrapper.classpath=/usr/local/servlets/cocoon/lib/xerces_1_0_1.jar
-------------snap-------------------------

I was not able to use the servlet_2_2.jar JSDK that was included with my
cocoon 1.7. I don't know why. Maybe because I'm running Sun's JDK 1.2
under Linux??? The old JSDK 2.0 was just working fine.

But to get cocoon working I also had to make some changes to my
cocoon.properties. Here are the lines I had to change:

---------------snip-----------------------------------------
processor.xsp.repository = /usr/local/apache/xsp/repository

# LDAP Processor
#processor.type.ldap = org.apache.cocoon.processor.ldap.LdapProcessor
---------------snap-----------------------------------------

I don't know why I had to comment out the processor.type.ldap line but
it worked.

It would be realy nice if someone could help me out to properly setup
cocoon.

Thanks in advance,

         	Sebastian



Realization of W3C XSL Spec

Posted by "Valentin O. Kluchnick" <va...@module.ru>.
Hi All!
I'm looking for _realization_ of W3C XSL Spec for making well-formed html
documentation(project description, libraries, info, etc.).
Looking for good links.
Thanks!
Valentin.
�


Re: config question (Cocoon 1.7)

Posted by "Valentin O. Kluchnick" <va...@module.ru>.
Hi All!
I'm looking for _realization_ of W3C XSL Spec for making documents, libraries
etc.
Looking for good links.
Thanks!
Valentin.


Re: config question (Cocoon 1.7)

Posted by Ross Burton <bu...@dcs.kcl.ac.uk>.
> But when ever I try to do a :
>
> http://localhost/Cocoon.xml
>
> All I get is a:
> ---------------------------------snip----------------------------------
>                       Publishing Engine could not be initialized.
>
> java.lang.RuntimeException:
> Error creating org.apache.cocoon.processor.ldap.LdapProcessor:
> make sure the needed classes can be found in the classpath
> (javax/naming/directory/DirContext)
> -------------------snap---------------------------------------------------
-
> and I don't know why.

As you mentioned later, this is due to the LDAP processor initialising for
the status page.  Disable the LDAP processor if you will never use it.


> I was not able to use the servlet_2_2.jar JSDK that was included with my
> cocoon 1.7. I don't know why. Maybe because I'm running Sun's JDK 1.2
> under Linux??? The old JSDK 2.0 was just working fine.

JServ 1.1 uses the Servlet 2.0 API, whereas Cocoon 1.6+ (IIRC) is designed
to build under Servlet 2.2.  That would be a problem but 2.2 is fully
backwards compatible, so Cocoon is compiled under 2.2 and it works under
2.0.  servlet_2.2.jar is only required if you plan on building Cocoon from
source.

> ---------------snip-----------------------------------------
> processor.xsp.repository = /usr/local/apache/xsp/repository
>
> # LDAP Processor
> #processor.type.ldap = org.apache.cocoon.processor.ldap.LdapProcessor
> ---------------snap-----------------------------------------

> I don't know why I had to comment out the processor.type.ldap line but
> it worked.

Commenting out the LDAP processor, as I said, is the right thing to do if
you do not have the JNDI package and do not plan on using LDAP.  While you
are here, remove any other processors and producers you won't use, such as
the SQL and DCP processors.

The default path for the XSP repository is ./repository, which is fine when
you know what the default path is!  :-)  Changing it to an absolute path and
creating that directory (with appropriate permissions) is the best course of
action.

Ross Burton


Re: config question (Cocoon 1.7)

Posted by gavin <ga...@ehost.com.au>.
Thanks wayne I'll give it a try


----- Original Message -----
From: Wayne Elliott <wa...@ccis.adisys.com.au>
To: <co...@xml.apache.org>
Sent: Tuesday, February 29, 2000 6:06 PM
Subject: Re: config question (Cocoon 1.7)


> SH
>
> I had the same problem this morning :(
>
> I think you are missing Java Naming Directory Interface from
> your JDK. I believe it was recently bundled into more recent
> versions of JDK 2.
>
> I went to http://www.javasoft.com/products/jndi/index.html
> and downloaded JNDI 1.2.1, unpacked it, added jndi.jar to my
> classpath and the thing worked. You may want to try this.
>
> Or you could get the JDK that includes JNDI (not sure which
> one it is)
>
> You may want to uncomment the processor.type.ldap thingy coz
> ldap seems to be what the error says its trying to run. That
> is a guess coz I'm already suffering from technology overload.
>
> WPE
>
> Sebastian Hauer wrote:
> >
> > Hi,
> >
> > I just more or less successfully setup cocoon.
> > It was a little tricky and I had to change some stuff I had not expected
> > to.
> >
> > The funny thing is that cocoon is running and I have no problems to
> > transform my xml files into html.
> > But when ever I try to do a :
> >
> > http://localhost/Cocoon.xml
> >
> > All I get is a:
> > ---------------------------------snip----------------------------------
> >                       Publishing Engine could not be initialized.
> >
> > java.lang.RuntimeException:
> > Error creating org.apache.cocoon.processor.ldap.LdapProcessor:
> > make sure the needed classes can be found in the classpath
> > (javax/naming/directory/DirContext)
> >               at
org.apache.cocoon.framework.Manager.create(Manager.java:102)
> >               at org.apache.cocoon.framework.Router.init(Router.java:80)
> >               at
org.apache.cocoon.framework.Manager.create(Manager.java:89)
> >               at org.apache.cocoon.Engine.(Engine.java:155)
> >               at org.apache.cocoon.Engine.getInstance(Engine.java:190)
> >               at org.apache.cocoon.Cocoon.init(Cocoon.java:119)
> >               at org.apache.jserv.JServServletManager.load_init(
> >                         JServServletManager.java:569)
> >               at org.apache.jserv.JServServletManager.loadServlet(
> >                         JServServletManager.java:488)
> >               at org.apache.jserv.JServConnection.processRequest(
> >                         JServConnection.java:266)
> >               at
org.apache.jserv.JServConnection.run(JServConnection.java:188)
> >               at java.lang.Thread.run(Thread.java:475)
>
> -------------------snap---------------------------------------------------
-
> >
> > and I don't know why.
> > Well as I mentioned I had to do some changes to get cocoon actually
> > running.
> >
> > Here are some lines out of my jserv.properties:
> > -------------snip-------------------------
> > wrapper.bin=/usr/lib/jdk1.2.2/bin/java
> > wrapper.classpath=/usr/local/apache/libexec/ApacheJServ.jar
> > wrapper.classpath=/usr/lib/jsdk/lib/jsdk.jar
> > #wrapper.classpath=/usr/local/servlets/cocoon/lib/servlet_2_2.jar
> > wrapper.classpath=/usr/local/servlets/cocoon/bin/cocoon.jar
> > wrapper.classpath=/usr/local/servlets/cocoon/lib/fop_0_12_1.jar
> > wrapper.classpath=/usr/local/servlets/cocoon/lib/xalan_0_19_4.jar
> > wrapper.classpath=/usr/local/servlets/cocoon/lib/xerces_1_0_1.jar
> > -------------snap-------------------------
> >
> > I was not able to use the servlet_2_2.jar JSDK that was included with my
> > cocoon 1.7. I don't know why. Maybe because I'm running Sun's JDK 1.2
> > under Linux??? The old JSDK 2.0 was just working fine.
> >
> > But to get cocoon working I also had to make some changes to my
> > cocoon.properties. Here are the lines I had to change:
> >
> > ---------------snip-----------------------------------------
> > processor.xsp.repository = /usr/local/apache/xsp/repository
> >
> > # LDAP Processor
> > #processor.type.ldap = org.apache.cocoon.processor.ldap.LdapProcessor
> > ---------------snap-----------------------------------------
> >
> > I don't know why I had to comment out the processor.type.ldap line but
> > it worked.
> >
> > It would be realy nice if someone could help me out to properly setup
> > cocoon.
> >
> > Thanks in advance,
> >
> >                 Sebastian
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> --
> Wayne Elliott                             | wayne@ccis.adisys.com.au
> ADI Limited                               | +61 8 9333 8889 (Fax)
> C4ISR (IS3)                               | +61 8 9333 8888 (Ph)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Re: config question (Cocoon 1.7)

Posted by Stefano Mazzocchi <st...@apache.org>.
Ross Burton wrote:
> 
> > BTW I read your mail about your problem with the ./repository file.
> > What I did was changing the path in my  cocoon.properties file like this:
> >
> > processor.xsp.repository = /usr/local/apache/xsp/repository
> >
> > and than I created the directory with these rights:
> >
> > drwxr-xr-x   2 nobody   nogroup      1024 Feb 28 23:40
> > /usr/local/apache/xsp/repository/
> >
> > And that is just working fine for me.
> > I hope the rights I gave to this directory are not a savety hole if
> > someone knows I would appreciate it.
> 
> I'm not qualified to reply to this fully (Ben Laurie - can we have your
> professional opinion?  :-)  but:

I'm not qualified to answer the question from an Apache point of view,
but...

> * other read/access should be off (drwxr-x---) because then somebody could
> login and read the files.

right, maybe restrict this to the owner and you're even safer.

> * Then as it is owned by nobody/nogroup (which I assume Apache runs as) no
> other processes can access it.

right.

> * It looks like the xsp directory is outside your document root (which is
> probably /usr/local/apache/htdocs) so web users can't access the directory
> 
> Seems okay to me, once the world access rights have been removed for
> completeness.

Yup, ok to me too.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Re: config question (Cocoon 1.7)

Posted by Ross Burton <bu...@dcs.kcl.ac.uk>.
> BTW I read your mail about your problem with the ./repository file.
> What I did was changing the path in my  cocoon.properties file like this:
>
> processor.xsp.repository = /usr/local/apache/xsp/repository
>
> and than I created the directory with these rights:
>
> drwxr-xr-x   2 nobody   nogroup      1024 Feb 28 23:40
> /usr/local/apache/xsp/repository/
>
> And that is just working fine for me.
> I hope the rights I gave to this directory are not a savety hole if
> someone knows I would appreciate it.

I'm not qualified to reply to this fully (Ben Laurie - can we have your
professional opinion?  :-)  but:

* other read/access should be off (drwxr-x---) because then somebody could
login and read the files.
* Then as it is owned by nobody/nogroup (which I assume Apache runs as) no
other processes can access it.
* It looks like the xsp directory is outside your document root (which is
probably /usr/local/apache/htdocs) so web users can't access the directory

Seems okay to me, once the world access rights have been removed for
completeness.

Ross Burton


Re: config question (Cocoon 1.7)

Posted by Sebastian Hauer <ha...@uni-freiburg.de>.
Hi Wayne,

Thanks a lot installing JNDI solved my problems. Now everything is running
just fine.

On Tue, 29 Feb 2000, Wayne Elliott wrote:

> I think you are missing Java Naming Directory Interface from
> your JDK. I believe it was recently bundled into more recent
> versions of JDK 2. 
as I read on Sun's Java-page it will be included with the JDK 2 version
1.3 which is only available as beta version jet AFAIK.

BTW I read your mail about your problem with the ./repository file.
What I did was changing the path in my  cocoon.properties file like this:

processor.xsp.repository = /usr/local/apache/xsp/repository

and than I created the directory with these rights:

drwxr-xr-x   2 nobody   nogroup      1024 Feb 28 23:40
/usr/local/apache/xsp/repository/

And that is just working fine for me.
I hope the rights I gave to this directory are not a savety hole if
someone knows I would appreciate it.

bye,
	Sebastian



Re: config question (Cocoon 1.7)

Posted by Wayne Elliott <wa...@ccis.adisys.com.au>.
SH

I had the same problem this morning :(

I think you are missing Java Naming Directory Interface from
your JDK. I believe it was recently bundled into more recent
versions of JDK 2. 

I went to http://www.javasoft.com/products/jndi/index.html
and downloaded JNDI 1.2.1, unpacked it, added jndi.jar to my
classpath and the thing worked. You may want to try this.

Or you could get the JDK that includes JNDI (not sure which 
one it is) 

You may want to uncomment the processor.type.ldap thingy coz
ldap seems to be what the error says its trying to run. That
is a guess coz I'm already suffering from technology overload.

WPE

Sebastian Hauer wrote:
> 
> Hi,
> 
> I just more or less successfully setup cocoon.
> It was a little tricky and I had to change some stuff I had not expected
> to.
> 
> The funny thing is that cocoon is running and I have no problems to
> transform my xml files into html.
> But when ever I try to do a :
> 
> http://localhost/Cocoon.xml
> 
> All I get is a:
> ---------------------------------snip----------------------------------
>                       Publishing Engine could not be initialized.
> 
> java.lang.RuntimeException:
> Error creating org.apache.cocoon.processor.ldap.LdapProcessor:
> make sure the needed classes can be found in the classpath
> (javax/naming/directory/DirContext)
>               at org.apache.cocoon.framework.Manager.create(Manager.java:102)
>               at org.apache.cocoon.framework.Router.init(Router.java:80)
>               at org.apache.cocoon.framework.Manager.create(Manager.java:89)
>               at org.apache.cocoon.Engine.(Engine.java:155)
>               at org.apache.cocoon.Engine.getInstance(Engine.java:190)
>               at org.apache.cocoon.Cocoon.init(Cocoon.java:119)
>               at org.apache.jserv.JServServletManager.load_init(
>                         JServServletManager.java:569)
>               at org.apache.jserv.JServServletManager.loadServlet(
>                         JServServletManager.java:488)
>               at org.apache.jserv.JServConnection.processRequest(
>                         JServConnection.java:266)
>               at org.apache.jserv.JServConnection.run(JServConnection.java:188)
>               at java.lang.Thread.run(Thread.java:475)
> -------------------snap----------------------------------------------------
> 
> and I don't know why.
> Well as I mentioned I had to do some changes to get cocoon actually
> running.
> 
> Here are some lines out of my jserv.properties:
> -------------snip-------------------------
> wrapper.bin=/usr/lib/jdk1.2.2/bin/java
> wrapper.classpath=/usr/local/apache/libexec/ApacheJServ.jar
> wrapper.classpath=/usr/lib/jsdk/lib/jsdk.jar
> #wrapper.classpath=/usr/local/servlets/cocoon/lib/servlet_2_2.jar
> wrapper.classpath=/usr/local/servlets/cocoon/bin/cocoon.jar
> wrapper.classpath=/usr/local/servlets/cocoon/lib/fop_0_12_1.jar
> wrapper.classpath=/usr/local/servlets/cocoon/lib/xalan_0_19_4.jar
> wrapper.classpath=/usr/local/servlets/cocoon/lib/xerces_1_0_1.jar
> -------------snap-------------------------
> 
> I was not able to use the servlet_2_2.jar JSDK that was included with my
> cocoon 1.7. I don't know why. Maybe because I'm running Sun's JDK 1.2
> under Linux??? The old JSDK 2.0 was just working fine.
> 
> But to get cocoon working I also had to make some changes to my
> cocoon.properties. Here are the lines I had to change:
> 
> ---------------snip-----------------------------------------
> processor.xsp.repository = /usr/local/apache/xsp/repository
> 
> # LDAP Processor
> #processor.type.ldap = org.apache.cocoon.processor.ldap.LdapProcessor
> ---------------snap-----------------------------------------
> 
> I don't know why I had to comment out the processor.type.ldap line but
> it worked.
> 
> It would be realy nice if someone could help me out to properly setup
> cocoon.
> 
> Thanks in advance,
> 
>                 Sebastian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

-- 
Wayne Elliott                             | wayne@ccis.adisys.com.au
ADI Limited                               | +61 8 9333 8889 (Fax)
C4ISR (IS3)                               | +61 8 9333 8888 (Ph)

Re: config question (Cocoon 1.7)

Posted by Stefano Mazzocchi <st...@apache.org>.
Sebastian Hauer wrote:
> 
> Hi,
> 
> I just more or less successfully setup cocoon.
> It was a little tricky and I had to change some stuff I had not expected
> to.
> 
> The funny thing is that cocoon is running and I have no problems to
> transform my xml files into html.
> But when ever I try to do a :
> 
> http://localhost/Cocoon.xml
> 
> All I get is a:
> ---------------------------------snip----------------------------------
>                       Publishing Engine could not be initialized.
> 
> java.lang.RuntimeException:
> Error creating org.apache.cocoon.processor.ldap.LdapProcessor:
> make sure the needed classes can be found in the classpath
> (javax/naming/directory/DirContext)
>               at org.apache.cocoon.framework.Manager.create(Manager.java:102)
>               at org.apache.cocoon.framework.Router.init(Router.java:80)
>               at org.apache.cocoon.framework.Manager.create(Manager.java:89)
>               at org.apache.cocoon.Engine.(Engine.java:155)
>               at org.apache.cocoon.Engine.getInstance(Engine.java:190)
>               at org.apache.cocoon.Cocoon.init(Cocoon.java:119)
>               at org.apache.jserv.JServServletManager.load_init(
>                         JServServletManager.java:569)
>               at org.apache.jserv.JServServletManager.loadServlet(
>                         JServServletManager.java:488)
>               at org.apache.jserv.JServConnection.processRequest(
>                         JServConnection.java:266)
>               at org.apache.jserv.JServConnection.run(JServConnection.java:188)
>               at java.lang.Thread.run(Thread.java:475)
> -------------------snap----------------------------------------------------
> 
> and I don't know why.
> Well as I mentioned I had to do some changes to get cocoon actually
> running.

Comment out the LDAPProcessor or download the JNDI.jar API from sun.
 
> Here are some lines out of my jserv.properties:
> -------------snip-------------------------
> wrapper.bin=/usr/lib/jdk1.2.2/bin/java
> wrapper.classpath=/usr/local/apache/libexec/ApacheJServ.jar
> wrapper.classpath=/usr/lib/jsdk/lib/jsdk.jar
> #wrapper.classpath=/usr/local/servlets/cocoon/lib/servlet_2_2.jar
> wrapper.classpath=/usr/local/servlets/cocoon/bin/cocoon.jar
> wrapper.classpath=/usr/local/servlets/cocoon/lib/fop_0_12_1.jar
> wrapper.classpath=/usr/local/servlets/cocoon/lib/xalan_0_19_4.jar
> wrapper.classpath=/usr/local/servlets/cocoon/lib/xerces_1_0_1.jar
> -------------snap-------------------------
> 
> I was not able to use the servlet_2_2.jar JSDK that was included with my
> cocoon 1.7. I don't know why. Maybe because I'm running Sun's JDK 1.2
> under Linux??? The old JSDK 2.0 was just working fine.

JServ doesn't support Servlet 2.2 yet. Tomcat does.
 
> But to get cocoon working I also had to make some changes to my
> cocoon.properties. Here are the lines I had to change:
> 
> ---------------snip-----------------------------------------
> processor.xsp.repository = /usr/local/apache/xsp/repository
> 
> # LDAP Processor
> #processor.type.ldap = org.apache.cocoon.processor.ldap.LdapProcessor
> ---------------snap-----------------------------------------
> 
> I don't know why I had to comment out the processor.type.ldap line but
> it worked.

Yes, it's a bug in the 1.7 distribution. Fixed in the upcoming 1.7.1
 
> It would be realy nice if someone could help me out to properly setup
> cocoon.

Your setup is properly configured for JServ.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------