I am not sure about any specific JBoss issues here,
but your applet (by default) will be prohibited from
reading any local OS files such as
C:\WINNT\Java\lib\jndi.properties as a result of the
Applet security model.

I am not sure why your InitialContext request should
need to lookup that file, since you have supplied all
the properties needed in your code, but a solution
would be to insert the jndi.properties file into your
Applet JAR file.

//Nicholas


--- "Rafael_S._V._Guimarães" <[EMAIL PROTECTED]>
wrote:
> I'm trying to access may EJB from an applet, but my
> browser give me this error:
> 
>
com.ms.security.SecurityExceptionEx[finCalc/stateless/TestClientApplet.teste2]:
> 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
> 
> I already checked C:\WINNT\Java\lib\jndi.properties,
> and its ok; i tried passing parameters to applet,
> but the problem persists.
> 
> Here is my code:
> 
> Properties prop = new Properties();
> prop.put(Context.INITIAL_CONTEXT_FACTORY,
> "org.jnp.interfaces.NamingContextFactory");
> prop.put(Context.PROVIDER_URL,
> "150.162.51.45:1099");
> Context ctx = new InitialContext(prop);
> Object objref = ctx.lookup("MyEJB");
> MyEJBHome home =
>           (MyEJBHome )
> javax.rmi.PortableRemoteObject.narrow(objref,
> MyEJBHome .class);
> 
> 
> 
> Any help?
> 
>
---------------------------------------------------------------------------------
> Rafael Simões Vieira Guimarães
> Grupo Stela
> Programa de Pós-Graduação em Engenharia de Produção
> - PPGEP
> Universidade Federal de Santa Catarina - UFSC
>
---------------------------------------------------------------------------------
> E-mail : [EMAIL PROTECTED]
> Home-page : http://www.stela.ufsc.br
> Fone/fax : +55 48 331-7016
> Endereço : Rua Lauro Linhares, 2123 - Edif. Trindade
> Center - Bloco B, 2o. andar 
> CEP 88036-000 - Florianópolis - SC - Brasil
>
---------------------------------------------------------------------------------
> 


=====
Nicholas Whitehead
Home: (973) 377 9335
Cell: (973) 615 9646
[EMAIL PROTECTED]

Laugh your pants off with Lionel at eYada.com.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to