When i try to get InitialContext from Applet ( running from appletviewer),
i'm hitting this error. Please help me to solve this problem
Exactly this line gives the error
InitialContext ic = new InitalContext ( hEnv )
Error:
javax.naming.NoInitialContextException: Cannot Instantiate class:
weblogic.jndi.WLInitialContextFactory
-regards
Abdul Malik
i have tried in another pc ( version 1.2.2 ) and hit another error (
confusing!!!!!!!!!)
>appletviewer JOracle.htm
java.lang.NoClassDefFoundError: javax/naming/InitialContext
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:241)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:517)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:453)
at sun.applet.AppletPanel.run(AppletPanel.java:291)
at java.lang.Thread.run(Thread.java:479)
classpath is same, but the java version is different ( earlier one is
version 1.3 )
Weblogic Version: 5.1 sp 7
"Daniel Hoppe" <ho...@sitewaerts.de> wrote in message
news:923A7281CDB7D4118A50...@samoa.sitewaerts...
Hi Abdul,
what is the classpath of your applet? You need to include the WebLogic
classes (or a certain subset of them - unfortunately there's not a
client jar so far) in your applet's classpath for this to work.
Daniel
> -----Ursprüngliche Nachricht-----
> Von: Abdul Malik [mailto:abd...@tp.edu.sg]
> Bereitgestellt: Mittwoch, 20. Juni 2001 09:38
> Bereitgestellt in: jndi
> Unterhaltung: InitialContext - Applet Problem
> Betreff: InitialContext - Applet Problem
code:
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://anthony01:7001");
System.out.println("creating context");
InitialContext ctx = new InitialContext(ht);
error:
JMSException: weblogic.jms.common.JMSException: java.rmi.MarshalException:
failed to marshal public abstract weblogic.jms.client.JMSConnection
weblogic.jms.frontend.FEConnectionFactoryRemote.createConnection(weblogic.rj
vm.JVMID,weblogic.jms.client.JMSCallbackRemote) throws
javax.jms.JMSException,java.rmi.RemoteException; nested exception is:
java.io.NotSerializableException: weblogic.jms.client.JMSCallback
"Abdul Malik" <abd...@tp.edu.sg> wrote in message
news:3b306aa1$1...@newsgroups.bea.com...
After 5 days of struggle, somehow i was managed to access the EJB from
Applet. But very slow coz of Big Jar files ( can make it bit small by
identitfying required classes ). I dont know this is correct approach or
not, but works ( damn slow )
What i did was
1) Installed the Latest Plugin 1.3.1
2) Downloaded HTMLConverter tool from java.sun.com and converted my
html file to use plugin.
3) inlcuded few jar files in archive tag.
The files i added in archive tag is
1) myapplet.jar ( applet classes )
2) weblogicaux.jar ( !!!!!!!!!!!! quite big jar file )
3) weblogicclass.jar ( jarred all the classes from classes\weblogic folder
(!!!!!!!!!! so big jar file !!!!!! )
4) myejb.jar ( suppose to work with home and remote class, but not working
( looking for container generated files). so i added my EJB.jar file. dont
know why ?????????? )
then it works.
well, i am not happy with this kind of approach. if any body have efficient
one, please kindly post it.
Note: i tried in 1.2.2 plugin ( works )
Environment: Windows 2000 / Windows 98, Weblogic 5.1 Service pack 7
-regards
Abdul Malik
"Daniel Hoppe" <ho...@sitewaerts.de> wrote in message
news:923A7281CDB7D4118A50...@samoa.sitewaerts...
Anthony,
why should he place j2ee.jar in the applet classpath? Shouldn't be there
actually. Your problem seems to be related to a class which is not
serializable.
Daniel
> -----Ursprüngliche Nachricht-----
> Von: Anthony A. [mailto:anth...@hotmail.com]
> Bereitgestellt: Freitag, 22. Juni 2001 18:10
> Bereitgestellt in: jndi
> Unterhaltung: InitialContext - Applet Problem
> Betreff: Re: InitialContext - Applet Problem
mj
"minjiang" <minj...@fairex.com> wrote in message
news:3B3C3576...@fairex.com...
mj