cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JAMES VANETTEN" <JVANET...@ALLMERICA.COM>
Subject Re: LDAP Error Please help
Date Fri, 08 Sep 2000 14:47:00 GMT
I have put the following jars files into my jserv.properties file like so:

wrapper.classpath=/usr/local/java/Jndi112/lib/jndi.jar
wrapper.classpath=/usr/local/java/ldap1_2_2/lib/ldap.jar
wrapper.classpath=/usr/local/java/ldap1_2_2/lib/providerutil.jar
wrapper.classpath=/usr/local/java/ldap1_2_2/lib/jaas.jar
wrapper.classpath=/usr/local/java/ldap1_2_2/lib/ldapbp.jar

I am using cocoon-1.7.4 which from the cocoon download directory. I did not compile it myself.
I have the following environment:

Apache 1.3.12
ApacheJServ 1.1.2
jdk 1.2.2. 
JSDK 2.0 
cocoon 1.7.4
jndi 1.2.1
ldap 1.2.2

It now works

Thanks for everybodys help


>>> Markus.Spiekermann@web.de 9/7/2000 4:40:02 PM >>>
Hi James,

which Cocoon-Version do you use? If you compile the cocoon.jar yourself, you need to have
ldap.jar int the "lib" folder while you compile it.
Which JAVA do you use? The newer Java-Versions include Ldap/jndi (as far as i know)

jndi.jar

In my jserv.properties one can also find (even if the FAQ tells you they are not necessary).
I m pretty sure you need at least the first two of these (at least my cocoon 1.8dev and my
former 1.7.x  wanted them).

ldap.jar
providerutil.jar
jaas.jar
ldapbp.jar

Check the other ldap-related postings on this site - there are much more knowledgable people
than me around here...

Hope I could help you.

Markus
JAMES VANETTEN wrote:

> I have put the jndi.jar in my classpath by putting:
>
> wrapper.classpath=/usr/local/java/jndi1_2_1/lib/jndi.jar
>
> into my jserv.properties file.
>
> when I try to use it using the following file:
>
> ----snip-----
> <?xml version="1.0"?>
>
> <?cocoon-process type="ldap"?>
> <?cocoon-format type="text/xml"?>
>
> <page>
>
> <ldap-defs>
>  <ldap-server name="test">
>   <initializer>com.sun.jndi.ldap.LdapCtxFactory</initializer>
>   <ldap-serverurl>ldap://ldap.server.com</ldap-serverurl>
>  </ldap-server>
> </ldap-defs>
>
> <ldap-query server="test">
>  sn=*Etten*
> </ldap-query>
>
> </page>
> -----snip-----
>
> I get the following error:
>
> javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory.
 Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:286)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:282)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:243)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:195)
>         at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:49)
>         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:660)
>         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
>         at javax.naming.InitialContext.init(InitialContext.java:226)
>         at javax.naming.ldap.InitialLdapContext.(InitialLdapContext.java:137)
>         at org.apache.cocoon.processor.ldap.LdapContextCreator.getLdapContext(LdapContextCreator.java:82)
>         at org.apache.cocoon.processor.ldap.LdapDefs.getLdapContext(LdapDefs.java:159)
>         at org.apache.cocoon.processor.ldap.LdapProcessor.process(LdapProcessor.java:118)
>         at org.apache.cocoon.Engine.handle(Engine.java:305)
>         at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
>         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
>         at org.apache.jserv.JServConnection.run(JServConnection.java:188)
>         at java.lang.Thread.run(Thread.java:475)
>
> Can someone help me out.
>
> Thanks
> Jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org 
> For additional commands, e-mail: cocoon-users-help@xml.apache.org 


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


Mime
View raw message