• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

JNDI LookuP using Applets

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I am trying to connect to a JMS server using Applets.
but i am getting the follwoing error when i do a look up

com.ms.security.SecurityExceptionEx[finCalc/stateless/TestClientApplet.teste
2]:
> > cannot access file C:\WINNT\Java\lib\jndi.properties
> > at
> > com/ms/security/permissions/FileIOPermission.check
> > at com/ms/security/PolicyEngine.deepCheck
> > at com/ms/security/PolicyEngine.checkPermission
> > at com/ms/security/StandardSecurityManager.chk
> > at
> > com/ms/security/StandardSecurityManager.checkRead
> > at java/io/FileInputStream.<init>
> > at
> >
> com/sun/naming/internal/VersionHelper11.getJavaHomeLibStream
> > at
> >
> com/sun/naming/internal/ResourceManager.getApplicationResources
> > at
> >
> com/sun/naming/internal/ResourceManager.getInitialEnvironment
> > at javax/naming/InitialContext.init
> > at javax/naming/InitialContext.<init>
> > at finCalc/stateless/TestClientApplet.teste2
This is the piece of code i used to a lookup
=======================================================================
<APPLET CODE="TestClientApplet.class" archive="teste.jar" NAME="Hello"
WIDTH=0 HEIGHT=0>
<param name="java.naming.factory.initial"
value="org.jnp.interfaces.NamingContextFactory">
<param name="java.naming.provider.url" value="t3://inatp2rml21s:7011">
</APPLET>
====================================
TestClientApplet.java
====================================
...
Hashtable env = new Hashtable();
env.put(Context.APPLET, this);
Context ctx = new InitialContext(env);
...
If i'm passing parameters, why does "new InitialContext(env)" is looking
for "C:\WINNT\Java\lib\jndi.properties" ???

Please Help
Thnaks in advance.
sunils
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic