You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Berg, Andreas" <an...@eds.com> on 2000/03/23 10:26:19 UTC

InitArgs to Producers

How do I pass initialization arguments to a producer? Like I do with
servlets in the JServ zone.properties file?

Andreas.

________________________________________
Andreas Berg,  EDS Germany
Cyber*Apps, Web Application Development
Phone: + 49 (0) 6142-80 1447
Fax:      + 49 (0) 6142-80 2339
eMail: mailto:andreas.berg@eds.com 



Re: LDAP woes

Posted by Ian Abbott <ia...@cinesite.co.uk>.
Autobahn Internet Services wrote:
> 
> I've been really happy with cocoon so far (once I got Tomcat set up
> to work with it). The only thing I'm still tearing my hair out about
> is getting it to work with LDAP (RH6.1, latest Cocoon, Apache 1.3.9,
> latest OpenLDAP server). The server's there and responds to command
> line and JNDI requests. But somehow I keep getting this NullPointer
> exception:
> 

I kept getting this too, and I tried all manner of things including
shaking a dead chicken over the machine to get it to work. In the end,
after many attempts, I got it working. Now, I'm not sure if this is
because I recompiled Cocoon myself from a tarball on
http://xml.apache.org/from-cvs/, or whether I finally sorted out the
LDAP.XML file, though I'm sure recompilation wouldn't have any real
effect.

The problem seems to be conflicting information in the documentation and
the sample. I think the placement of searchbase is the most important
factor.

Anyway, here's the file that worked for me, running on Apache 1.3.12,
OpenLDAP, JServ 1.1, Cocoon 1.7.1-dev and SGI IRIX 6.5.7:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="phonebook.xsl"?>
<?cocoon-process type="ldap"?>
<?cocoon-process type="xslt"?>

<page>

 <ldap-defs>
  <ldap-server name="cinesite">
   <initializer>com.sun.jndi.ldap.LdapCtxFactory</initializer>
   <ldap-serverurl>ldap://LDAP.FQDN.GOES.HERE</ldap-serverurl>
  </ldap-server>
  <ldap-querydefs name="standard" default="yes"/>
 </ldap-defs>

 <ldap-query server="cinesite" ldap-searchbase="o=Cinesite,c=UK"
defs="standard">
   cn=*{@name}*
 </ldap-query>

</page>

I'll spare you the XSL sheet. Safe to say that calling
phonebook.xml?name=ia finds things fairly well. 

I knocked up a reasonable GUI to all of this and showed it to a
colleague, and all the while went 'and not a bit of code was needed!'. 

Thanks to all concerned. Cocoon is definitely making my life more
interesting.

Cheers
Ian

LDAP woes

Posted by Autobahn Internet Services <te...@northwest.com>.
I've been really happy with cocoon so far (once I got Tomcat set up
to work with it). The only thing I'm still tearing my hair out about
is getting it to work with LDAP (RH6.1, latest Cocoon, Apache 1.3.9,
latest OpenLDAP server). The server's there and responds to command
line and JNDI requests. But somehow I keep getting this NullPointer
exception:


>
>Cocoon 1.7    Error found handling the request.
>
>      java.lang.NullPointerException
> at
>org.apache.cocoon.processor.ldap.LdapProcessor.process(LdapProcessor.java,
>Compiled Code)
>at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
>at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java,Compiled Code)
>at org.apache.jserv.JServConnection.processRequest(JServConnection.java,
>Compiled Code)
>at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled
>Code) at java.lang.Thread.run(Thread.java, Compiled Code)A

Anyone run into this problem before? Any suggestions?

Regards,
Todd



Re: InitArgs to Producers

Posted by Tsoloane Moahloli <ts...@zen.co.za>.
If you create a producer that implements configurable, you can then 
add the appropriate lines to your cocoon.properties file (I do this 
with a processor and I am guessing that the same would apply for a 
producer).

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 3/23/00, 9:26:19 AM, "Berg, Andreas" <an...@eds.com> wrote 
regarding InitArgs to Producers:


> How do I pass initialization arguments to a producer? Like I do with
> servlets in the JServ zone.properties file?

> Andreas.

> ________________________________________
> Andreas Berg,  EDS Germany
> Cyber*Apps, Web Application Development
> Phone: + 49 (0) 6142-80 1447
> Fax:      + 49 (0) 6142-80 2339
> eMail: mailto:andreas.berg@eds.com



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