Hi Arkin!! and all
I tried both of the following (As suggested by Arkin)
but none of them are working
I am still getting the "AccessControlException"
Please let me know what is the reason for this
AccessControlException when we try to access Jndi jar files
from Servlet with JDK1.2
Thank you
H.M.Mallik
>rkin wrote
>Try one of the followings:
>1. Create a java.lang.RuntimePermission "getClassLoader" permission in your
>java.policy file (jre/lib/security/java.policy) for the code base
you're using
>2. Put both jndi.jar and the SPI JAR in /jre/lib/ext
JDK 1.2 simply has more security restrictions and stuff that gets
ignored in 1.1 will refuse to work in 1.2.
arkin
Mallik HM wrote:
>
>Hi,
> All!!
>
> we were using Java1.1.6 with JNDI1.2 and every thing
> was working fine.
> Recently we updated our Solaris Server with Java1.2
> then started this "AccessControlException " problem while getting
> the Initial Context.
> Here is brief desc of the problem
> We are using servlet to connect to NetscapeLDAP Server4.0
> thourgh JNDI1.2.1 and java1.2
> When we try to get the InitialDirContext we get the following
> error ----->
> javax.naming.NoInitialContextException: Cannot
> instantiate class: com.sun.jndi.ldap.LdapCtxFactory.
> Root exception is java.security.AccessControlException:
> access denied (java.lang.RuntimePermission getClassLoader )
> at java.lang.Throwable.fillInStackTrace(NativeMethod)
> at java.lang.Throwable.fillInStackTrace(Compiled Code)
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at java.lang.RuntimeException.<init>(Compiled Code)
> at java.lang.SecurityException.<init>(Compiled Code)
> at java.security.AccessControlException.<init>(Compiled Code)
> at java.security.AccessControlContext.checkPermission(Compiled Code)
> at java.security.AccessController.checkPermission(Compiled Code)
> at java.lang.SecurityManager.checkPermission(Compiled Code)
> at java.lang.Class.forName(Class.java:196)
> at com.sun.naming.internal.VersionHelper12.loadClass
> at javax.naming.spi.NamingManager.getInitialContext
> at javax.naming.InitialContext.getDefaultInitCtx
> at javax.naming.InitialContext.init
> at javax.naming.InitialContext.<init>
> at javax.naming.directory.InitialDirContext.<init>
> at FtsNetUserLdapDetails.getUserDetails
> at FtsNetUserDetails.service
> at javax.servlet.http.HttpServlet.service
>
> ------
>
> Can any one let me know what else should we specify or should
> modify Jndi stuff to get working with Java1.2
> one more thing is if I just switch the Servlets to use
> jdk1.1.6 with out changing any other configuraion files or
> CLASSPATH every thing will work fine with out problems!!!
> I wonder Java1.2 has some Security restrictions !!!!???
> plese let me know at the earliest!!!
>
>Thanx in advance!!!
>H.M.Mallik
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html