LoginModule JAAS and Tomcat (initialize method is not called)

2006-02-15 Thread Vincent Delhommois
Hello,
I developped my own LoginModule which is very simple for the moment. I wanted 
to know if I have to create the JAAS configuration file ? If yes where you I 
locate it ?
When I start Tomcat, the constructor of the LoginModule is well called but 
Tomcat failed before the initialize method. Tomcat launch an exception : 
Arguments type error.
Do you have any idea ?
Thanks for all !!

Re: LoginModule JAAS and Tomcat (initialize method is not called)

2006-02-15 Thread Vincent Delhommois
I start Tomcat with the following option :
set 
JVM_OPTS=-Djava.security.auth.login.config=D:/Appl/eclipse/workspace2/testAppli/jaas.conf
 (in the catalina.bat)

My jaas.conf is :
/** Login Configuration for the JAAS **/
MyLoginModule {
com.gcatrans.testappli.MyLoginModule required debug=true app=testAppli;
};

The error message is :
15 fÚvr. 2006 19:14:25 org.apache.commons.digester.Digester endElement
GRAVE: End event threw exception
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
a:252)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.start(Catalina.java:420)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Catalina.start using D:\Appl\Tomcat 4.1\conf\server.xml: java.lang.IllegalArgume
ntException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
at org.apache.commons.digester.Digester.createSAXException(Digester.java
:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java
:2566)
at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)





 Message du 15/02/06 à 17h51
 De : Vincent Delhommois 
 A : users@tomcat.apache.org
 Copie à : 
 Objet : LoginModule JAAS and Tomcat (initialize method is not called)
 
 Hello,
 I developped my own LoginModule which is very simple for the moment. I wanted 
 to know if I have to create the JAAS configuration file ? If yes where you I 
 locate it ?
 When I start Tomcat, the constructor of the LoginModule is well called but 
 Tomcat failed before the initialize method. Tomcat launch an exception : 
 Arguments type error.
 Do you have any idea ?
 Thanks for all !!

RE: LoginModule JAAS and Tomcat (initialize method is not called)

2006-02-15 Thread Caldarale, Charles R
 From: Vincent Delhommois [mailto:[EMAIL PROTECTED] 
 Subject: Re: LoginModule JAAS and Tomcat (initialize method 
 is not called)
 
 I start Tomcat with the following option :
 set 
 JVM_OPTS=-Djava.security.auth.login.config=D:/Appl/eclipse/wor
 kspace2/testAppli/jaas.conf (in the catalina.bat)

Do you mean JAVA_OPTS?  JVM_OPTS is not used in the distributed scripts,
unless you've modified them.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: LoginModule JAAS and Tomcat (initialize method is not called)

2006-02-15 Thread Vincent Delhommois
Thanks for your answer.
You are right.I tried several positions. I'm sure that the conf file is used.
In my conf file :
MyLoginModule {
com.gcatrans.testappli.MyLoginModule required debug=true app=testAppli;
};
I don't know where is made the mapping between the realm name and the conf 
file...





 Message du 15/02/06 à 19h29
 De : Caldarale, Charles R 
 A : Tomcat Users List , [EMAIL PROTECTED]
 Copie à : 
 Objet : RE: LoginModule JAAS and Tomcat (initialize method is not called)
 
  From: Vincent Delhommois [mailto:[EMAIL PROTECTED] 
  Subject: Re: LoginModule JAAS and Tomcat (initialize method 
  is not called)
  
  I start Tomcat with the following option :
  set 
  JVM_OPTS=-Djava.security.auth.login.config=D:/Appl/eclipse/wor
  kspace2/testAppli/jaas.conf (in the catalina.bat)
 
 Do you mean JAVA_OPTS? JVM_OPTS is not used in the distributed scripts,
 unless you've modified them.
 
 - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.