-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.2.2
-
x86
-
windows_nt
Name: krT82822 Date: 10/09/99
When we create an jndi initial context (with a LDAP connection as argument)
we receive a ClassNotFoundException. This only happens when we create the context
as a result of a button press. If we create the context in the init or start methods
of the applet, it works. It seems that somewhere the classpath is changed or lost or
that a different classloader is used that doesn't use the correct classpath.
This happens when the jndi.jar, ldap.jar and providerutil.jar are not put in the ext/
directory. The problem is not security related since I gave a AllPermission permission
to the code. (This would give another exception anyway). Also the order of the jar files
are not the cause since then it shouldn't even work in the init or start methods. (And I tried the
6 different permutations possible with these 3 jar files).
plugin version 1.2.2 px and Netscape 4.5 or Explorer 4.0.
With 1.2.1 I didn't have this problem.
jndi and ldap are version 1.2 but I also have it with older versions.
I have send a file with a minimal example at java-plugin-feedback.
----------------------
9/27/99 test case received from user
However, we have another similar case which appears to be a matter of setting a standard variable, INITIAL_CONTEXT_FACTORY
> From that report:
"The symtom that you are facing is a direct consequence of not following the recomended
standard INITIAL_CONTEXT_FACTORY initialization. From the doc :
INITIAL_CONTEXT_FACTORY
public static final String INITIAL_CONTEXT_FACTORY
Constant that holds the name of the environment property for specifying the initial context factory to use. The value of the property should be the fully qualified class name of the factory class that will create an initial context. This property may be specified in the environment parameter passed to the initial context constructor, an applet parameter, a system property, or an application resource file. If it is not specified in any of these sources, NoInitialContextException is thrown when an initial context is required to complete an operation.
If you do not use any one of the four methods, the initialization is
goint to throw an NoInitialContextException. That is what you are
getting. Please modify the code to follow any of the recomended
four methods.
"
--------------------
10/9/99 eval1127@eng -- user's reply (9/28/99) to this query was:
"This variable is initialized to com.sun.jndi.ldap.LdapCtxFactory as it should be. But it's this class that
isn't found because a wrong ContextClassLoader is used in the AWT event handling routines. Note: do
not confuse an Initial Context with a ContextClassloader, for they are a completely different thing."
Am not sure if the problem exists in the Plug-In itself. This bug report may need to be re-categorized.
Attaching user's test case to the bug.
(Review ID: 94600)
======================================================================
- duplicates
-
JDK-4267872 Context class loader of event dispatch threads is being set incorrectly
-
- Closed
-
- relates to
-
JDK-4155645 "context class loader" doesn't work as intended (and is vaguely specified)
-
- Closed
-