I did your sugestion, but the error continues. Thanks anyway.
I have tried passing parameters to applet, but the error continues. like
this:
HTML
=======================================================================
<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="150.162.51.45:1099">
</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" ???
> 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.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
> >
> > 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
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user