• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB and Applets  RSS feed

sunilkumar ssuparasmul
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,
When i tried to do context lookup in applets . i am getting an error (see below)
Where as the same code works perfectly fine in appletviewer.
I am not sure why it is looking into my jndi.properties file in my local machine bcos
there is already one jndi.properties which i have bundeled as a jar included in my applets
attributes tag.
Can some body please help me solve.
I know it is not advisable to directly contact applets from EJB but my requirment is such taht we canot avoid it and moreover its an intranet application.so please do not mention abt applet-servlet and stuff etc.
So please help me if u have any ideas about this
It is very urgent .

Exception : -
com.ms.security.SecurityExceptionEx[Applet1.initJMS]: cannot access file C:\WINNT\Java\lib\jndi.properties
at com/ms/security/permissions/FileIOPermission.check (FileIOPermission.java)
at com/ms/security/PolicyEngine.deepCheck (PolicyEngine.java)
at com/ms/security/PolicyEngine.checkPermission (PolicyEngine.java)
at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
at com/ms/security/StandardSecurityManager.checkRead (StandardSecurityManager.java)
at java/io/FileInputStream.<init> (FileInputStream.java)
at com/sun/naming/internal/VersionHelper11.getJavaHomeLibStream (VersionHelper11.java:136)
at com/sun/naming/internal/ResourceManager.getApplicationResources (ResourceManager.java:451)
at com/sun/naming/internal/ResourceManager.getInitialEnvironment (ResourceManager.java:152)
at javax/naming/InitialContext.init (InitialContext.java:214)
at javax/naming/InitialContext.<init> (InitialContext.java:190)
at Applet1.initJMS (Applet1.java:126)
Thanks in advance,
Ajith Kallambella
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd think any reference to InitialContext in your program will try to find the jndi.properties file. Since the applet is running on the local machine sandbox it is trying to look on the local machine.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!