tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bragg, Casey" <Casey.Br...@allegiancetelecom.com>
Subject FollowUp : Trying to extend JNDIRealm
Date Mon, 04 Jun 2001 20:19:26 GMT
I ran T4.b5 in debug mode and came up with the following further information
: 

Failure, trying to use org.apache.catalina.realm.JNDIRealm2 (see original
message below; an identical copy of org.apache.catalina.realm.JNDIRealm with
a different class name for testing):

----------------------------------------------------------------------------
----------------------------

XmlMapper: new className org.apache.catalina.realm.JNDIRealm2 Realm
org.apache.catalina.realm.JNDIRealm2@632c2d
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
className=org.apache.catalina.realm.JNDIRealm2)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
connectionName=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
connectionPassword=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
connectionURL=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
userPattern=uid={0},ou=people,o=algx.net,o=internet)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
userPassword=userpassword)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
roleBase=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
roleName=cn)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
roleSearch=(|(uniqueMember={0})(member={0})))
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2
roleSubtree=false)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm2 debug=99)
XmlMapper: Calling org.apache.catalina.core.StandardEngine.setRealm
org.apache.catalina.realm.JNDIRealm2@632c2d
ERROR reading ../bin/../conf/server.xml
At Line 165 /Server/Service/Engine/Realm/ 

Catalina.start: java.lang.IllegalArgumentException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.util.xml.AddChild.end(XmlMapper.java:806)
        at
org.apache.catalina.util.xml.XmlMapper.matchEnd(XmlMapper.java:419)
        at
org.apache.catalina.util.xml.XmlMapper.endElement(XmlMapper.java:119)
        at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1497)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
        at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:260)
        at
org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:677)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:647)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:196)

----------------------------------------------------------------------------
----------------------------

Normal run (from catalina.out) : 


XmlMapper: new className org.apache.catalina.realm.JNDIRealm Realm
org.apache.catalina.realm.JNDIRealm@3f2d5e
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
className=org.apache.catalina.realm.JNDIRealm)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
connectionName=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
connectionPassword=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
connectionURL=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
userPattern=withheld)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
userPassword=userpassword)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
roleBase=ou=groups,o=algx.net,o=internet)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
roleName=cn)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
roleSearch=(|(uniqueMember={0})(member={0})))
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm
roleSubtree=false)
XmlMapper: setProperty(class org.apache.catalina.realm.JNDIRealm debug=99)
XmlMapper: Calling org.apache.catalina.core.StandardEngine.setRealm
org.apache.catalina.realm.JNDIRealm@3f2d5e
XmlMapper: pop Realm org.apache.catalina.realm.JNDIRealm:
org.apache.catalina.realm.JNDIRealm@3f2d5e

----------------------------------------------------------------------------
----------------------------

==============================================
Casey Bragg - Software Engineer
Allegiance Telecom, Inc.  Dallas, TX
469-259-2702 - casey.bragg@allegiancetelecom.com
==============================================


-----Original Message-----
From: Bragg, Casey [mailto:Casey.Bragg@allegiancetelecom.com]
Sent: Friday, June 01, 2001 5:18 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: Trying to extend JNDIRealm


Hello : 

   I'm trying to extend JNDIRealm in tomcat4 to implement my own digest
method for SHA1. 

   When I use org.apache.catalina.realm.JNDIRealm, Tomcat starts up fine.
When I use my extension of JNDIRealm, I get the error listed below.  To
test, I made a duplicate of org.apache.catalina.realm.JNDIRealm and called
it org.apache.catalina.realm.JNDIRealm2.  I used the exact same Realm
descriptor listed below except that I referenced
org.apache.catalina.realm.JNDIRealm2.  Even though the code in the two
classes is identical, I still get the error listed below.  What am I doing
wrong?

Thanks!

Here's my realm entry in conf/server.xml : 

      <Realm className="org.apache.catalina.realm.JNDIRealm"
         connectionName="cn=withheld"
     connectionPassword="withheld"
          connectionURL="ldap://withheld:392"
            userPattern="uid={0},ou=people,o=withheld"
           userPassword="userpassword"
               roleBase="ou=groups,o=withheld"
               roleName="cn"
             roleSearch="(|(uniqueMember={0})(member={0}))"
            roleSubtree="false"
                  debug="99" />

The error : 

more catalina.out
ERROR reading ../bin/../conf/server.xml
At Line 164 /Server/Service/Engine/Realm/ 

Catalina.start: java.lang.IllegalArgumentException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.util.xml.AddChild.end(XmlMapper.java:806)
        at
org.apache.catalina.util.xml.XmlMapper.matchEnd(XmlMapper.java:419)
        at
org.apache.catalina.util.xml.XmlMapper.endElement(XmlMapper.java:119)
        at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1497)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
        at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:260)
        at
org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:677)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:647)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:196)


==============================================
Casey Bragg - Software Engineer
Allegiance Telecom, Inc.  Dallas, TX
469-259-2702 - casey.bragg@allegiancetelecom.com
==============================================

Mime
View raw message