hello world, i have written my own REALM - class for authentication. authentication - verfication should be done by an EnterpriseJavaBean running on JONAS ApplicationServer .
Within a method in my realm i set the environement for initial context as specified by JONAS: Hashtable jndiProps = new Hashtable(); jndiProps.put("java.naming.factory.initial","com.sun.jndi.rmi.registry.RegistryContextFactory"); jndiProps.put("java.naming.provider.url", "rmi://localhost:10991"); jndiProps.put("java.naming.factory.url.pkgs", "org.objectweb.jonas.naming"); initialContext = new InitialContext(jndiProps); When I try to access a protected jsp i get following Exception javax.naming.NoInitialContextException: Cannot instantiate class:com.sun.jndi.rmi.registry.RegistryContextFactory. Root exception is java.lang.ClassCastException: com.sun.jndi.rmi.registry.RegistryContextFactory at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246) at javax.naming.InitialContext.init(InitialContext.java:222) at javax.naming.InitialContext.<init>(InitialContext.java:198) at client.daveraggett.login.LoginCatalinaRealm.getConfiguration(LoginCatalinaRealm.java:84) at client.daveraggett.login.LoginCatalinaRealm.authenticate(LoginCatalinaRealm.java:50) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:263) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:459) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) at java.lang.Thread.run(Thread.java:484) -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>