Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB and Applets

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 file in my local machine bcos
there is already one 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 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 : -[Applet1.initJMS]: cannot access file C:\WINNT\Java\lib\
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 Applet1.initJMS (
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 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