Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with Applet

3 views
Skip to first unread message

Andreas...@metris.de

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
Hello,

I've a problem to run an applet.
It works fine until it connects to WebSphere 3.5.
While creating a new InitialContext I get the exception below.
>> c = new InitialContext(props);
But the class is definitive in the classpath/jar-file which is loaded.
Can anybody help me?


Thanks a lot

Andy

Exception
-----------------------------------
javax.naming.NoInitialContextException: Cannot instantiate class:
com.ibm.ejs.ns.jndi.CNInitialContextFactory. Root exception is
java.lang.ClassNotFoundException:
com/ibm/ejs/ns/jndi/CNInitialContextFactory
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:199)
at
com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:4
5)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:659)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at
de.metris.tech_prototyp.client.common.util.ServerService.getInitialConte
xt(ServerService.java:103)
at
de.metris.tech_prototyp.client.common.util.ServerService.connect(ServerS
ervice.java:34)
at
de.metris.tech_prototyp.client.common.util.ServerService.getRemoteInterf
ace(ServerService.java:131)
at
de.metris.tech_prototyp.client.main.logical.SchadenVerwaltungLogicalCont
roller.laden(SchadenVerwaltungLogicalController.java, Compiled Code)
at
de.metris.tech_prototyp.client.main.gui.SchadenVerwaltungGuiController.l
adenButtonPressed(SchadenVerwaltungGuiController.java:93)
at java.lang.reflect.Method.invoke(Native Method)
at
de.metris.common.client.mja.core.adapter.EventAdapter.callControllerMeth
od(EventAdapter.java:146)
at
de.metris.common.client.mja.core.adapter.ActionListenerActionPerformedAd
apter.actionPerformed(ActionListenerActionPerformedAdapter.java:18)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractB
utton.java:1101)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.ja
va:378)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonList
ener.java:204)
at java.awt.Component.processMouseEvent(Component.java:3160)
at java.awt.Component.processEvent(Component.java, Compiled
Code)
at java.awt.Container.processEvent(Container.java, Compiled
Code)
at java.awt.Component.dispatchEventImpl(Component.java, Compiled
Code)
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java,
Compiled Code)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:1827)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java,
Compiled Code)
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled
Code)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java,
Compiled Code)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)

Sent via Deja.com http://www.deja.com/
Before you buy.

Andreas Wollny

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
Hi,

...ok, I managed this problem for MS Internet Explorer.
I had to insert ujc.jar, rmiorb.jar and iioprt.jar into the
client-classpath.
also I had to put the ioser12.dll into the PATH-Variable.
This worked only for MS Internet Explorer not for Netscape.
Maybe someone knows another hint?

Unfortunately there occured another problem.
For running client there should be the ibm jdk used.
When I don't I get an ClassCastException at the lookup-Method.
See exception below.
The same happens in Applet but there I can't see any possibility
to change the java-version.
Does someone know any solution??

Thanks a lot

Andy


Exception:
-------------------------------------
java.lang.ClassCastException
at
com.ibm.ejs.ns.jndi.CNContextImpl.isContextLocalCheck(CNContextImpl.java:1252)
at
com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(CNContextImpl.java:746)
at
com.ibm.ejs.ns.jndi.CNContextImpl.lookup(CNContextImpl.java:584)
at javax.naming.InitialContext.lookup(InitialContext.java:349)
at
de.metris.tech_prototyp.client.common.util.ServerService.connect(ServerService.java:45)
at
de.metris.tech_prototyp.client.common.util.ServerService.reconnect(ServerService.java:143)
at
de.metris.tech_prototyp.client.main.gui.LoginGuiController.loginButtonPressed(LoginGuiController.java:38)
at java.lang.reflect.Method.invoke(Native Method)
at
de.metris.common.client.mja.core.adapter.EventAdapter.callControllerMethod(EventAdapter.java:146)
at
de.metris.common.client.mja.core.adapter.ActionListenerActionPerformedAdapter.actionPerformed(ActionListenerActionPerformedAdapter.java:18)


at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1101)
at

javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at
javax.swing.JRootPane$DefaultAction.actionPerformed(JRootPane.java:516)
at javax.swing.JComponent.processKeyBinding(JComponent.java,
Compiled Code)
at
javax.swing.JComponent.processKeyBindings(JComponent.java:1659)
at javax.swing.JComponent.processKeyEvent(JComponent.java:1565)


at java.awt.Component.processEvent(Component.java, Compiled
Code)
at java.awt.Container.processEvent(Container.java, Compiled
Code)
at java.awt.Component.dispatchEventImpl(Component.java, Compiled
Code)
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
at

java.awt.LightweightDispatcher.processKeyEvent(Container.java:1766)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:1740)
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
at java.awt.Window.dispatchEventImpl(Window.java:749)


at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled
Code)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java,
Compiled Code)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)

shutDown done.

Callistus Chui

unread,
Oct 13, 2000, 3:00:00 AM10/13/00
to
Hi,

Good try! Here are two things to avoid this problems:

1. NoInitialContextException - Look closer to the stack, you would find
that the loader couldn't find the class CNInitialContextFactory. Actually,
this was not a problem with classpath, your new InitialContext() statement
was executed inside a context of the child thread. The WAS jdk
implementation cannot find the right class loader for
CNInitialContextFactory. This can be workaround by moving the statement to
the main thread.

2. ClassCastException - I took a easy guess on this one. I am guessing you
are using Java Plug-in, and it is not pointing to the WAS jdk.

CChui

"Andreas Wollny" <awo...@metris.de> wrote in message
news:39E5B6E9...@metris.de...

n.java:1101)
> at
>
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:3

0 new messages