cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marian Steinbach <mar...@ds.fh-koeln.de>
Subject Bad Luck witch LDAP processing
Date Fri, 30 Jun 2000 23:20:41 GMT
Hi!

Yet another LDAP problem. I allready read the archive, so:

I got

- Servlet Engine:  Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java
1.3.0rc1; Windows 98 4.10 x86; java.vendor=Sun Microsystems Inc.)
- Cocoon 1.7.4
- jndi.jar, ldap.jar, providerutil.jar, ... in my classpath (passed via
tomcat.bat script on startup)


The Problem:

When I try to run my ldap.xml (configured by myself) I get the error message

  Exception: java.lang.ClassCastException: [B

It doesn´t matter if I have the jndi jars include in the classpath or not,
and there is nerly no difference between different ldap examples i use. The
reason is, for sure, not the search-base.

Unfortunately I have no clue what the error message means.

I post you the XML and XSL. Thanks for help!

Marian





<!-- begin ldap.xml -->

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

<page>

  <ldap-defs>
    <ldap-server name="ratz">
      <initializer>com.sun.jndi.ldap.LdapCtxFactory</initializer>
      <ldap-serverurl>ldap://ratz.ds.fh-koeln.de:389</ldap-serverurl>
    </ldap-server>
    <ldap-querydefs name="standard" default="yes"/>	
  </ldap-defs>

  <ldap-query server="ratz" ldap-searchbase="ou=Design,o=Fachhochschule
Koeln,c=DE" defs="standard">
     givenname=Marian
  </ldap-query>
</page>

<!-- end ldap.xml -->




<!-- begin ldap.xsl -->

<?xml version="1.0"?>

<!-- <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> -->

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="page">
   <xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
   <html>
    <head>
     <title>
      LDAP Search Results
     </title>
    </head>
    <body bgcolor="#ffffff">
     <xsl:apply-templates/>
    </body>
   </html>
  </xsl:template>

 <xsl:template match="searchresult">
	<table cellspacing="0" cellpadding="6">
     <xsl:apply-templates select="cn"/>
     <xsl:apply-templates select="currentorganization"/>
     <xsl:apply-templates select="mail"/>
     <xsl:apply-templates select="telephonenumber"/>
     <xsl:apply-templates select="securephonenumber"/>
	</table>
	<p/>
  </xsl:template>
 
 <xsl:template match="cn">
	<tr>
	 <th bgcolor="tan" align="right">Common Name</th>
	 <td>
      <xsl:apply-templates/>
	 </td>
	</tr>
  </xsl:template>

 <xsl:template match="currentorganization">
	<tr>
	 <th bgcolor="tan" align="right">Org</th>
	 <td>
      <xsl:apply-templates/>
	 </td>
	</tr>
  </xsl:template>

 <xsl:template match="telephonenumber">
	<tr>
	 <th bgcolor="tan" align="right">Tel (work) #</th>
	 <td>
      <xsl:apply-templates/>
	 </td>
	</tr>
  </xsl:template>

 <xsl:template match="securephonenumber">
	<tr>
	 <th bgcolor="tan" align="right">Secure #</th>
	 <td>
      <xsl:apply-templates/>
	 </td>
	</tr>
  </xsl:template>

 <xsl:template match="mail">
	<tr>
	 <th bgcolor="tan" align="right">E-mail</th>
	 <td>
      <a>
	   <xsl:attribute name="href">
        mailto:<xsl:apply-templates/>
	   </xsl:attribute>
       <xsl:apply-templates/>
	  </a>
	 </td>
	</tr>
  </xsl:template>

 <xsl:template match="comment">
<p>	       
      <xsl:apply-templates/>
</p>
  </xsl:template>


</xsl:stylesheet>


<!-- end ldap.xsl -->

Mime
View raw message