Hi Tim, 

the class not found problem is solved - the class is in jaas.jar (there is a
separate message I sent a while ago which has not appeared yet.)

I currently hardcode the properties in the file,

        Hashtable env = new Hashtable();
                  
                // Get the context
                env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
        
"com.evermind.server.ApplicationClientInitialContextFactory");
                env.put(javax.naming.Context.PROVIDER_URL,
"ormi://localhost/app");
                env.put(javax.naming.Context.SECURITY_PRINCIPAL, "admin");
                env.put(javax.naming.Context.SECURITY_CREDENTIALS,
"password");

      Context context = new InitialContext(env);

     Object homeObject = 
        context.lookup("java:comp/env/ejb/MyEJB");

        <ejb-ref-name>ejb/MyEJB</ejb-ref-name> in
meta-inf/application-client.xml

although it's possible to set them in the *.jnlp file (or read from a file
if security/all-permissions is set).

Now I am running into a JNDI problem: the client starts, but cannot find the
ejb:

Communication error: java:comp/env namespace is only available from within a
J2EE component

is all I get. Since I have no problem starting the client from the command
line or applicationlauncher or the console, I try to find out why the client
is not recognized as a j2ee component when started from WebStart, and what
the jndi path to my ejb may be?

I have encluded the following jar files in the jnlp file (the 'path' for the
MyCLient.jar):

<resources> 
    <j2se version="1.3"/>
   
    <jar href="MyClient.jar"/>
        <jar href="xerces.jar"/>
        <jar href="jaas.jar"/>
        <jar href="xalan.jar"/>
        <jar href="jaxp.jar"/>
        <jar href="crimson.jar"/>
        <jar href="parser.jar"/>
        <jar href="jndi.jar"/>
        <jar href="j2ee.jar"/>
        <jar href="orion.jar"/>
</resources>

Thanks, appreciate your feedback

Peter N. Saurugger
Agilent Technologies
[EMAIL PROTECTED]

-----Original Message-----
From: Tim Pouyer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 6:54 AM
To: Orion-Interest
Subject: Re: AppClient: problem with LoginException


Did you supply the orion.jar file as a resource for your web start app? How
about your initialContext that you try to use to create a connection with
orion, did you make sure your credentials and principal names are correct?
Are you trying to read these from a file such as Properties prop = new
Properties(); prop.load(new FileInputStream("XXX.properties"));  if so you
will need to ask web start for full privilages on the client machine or use
the jnlp RandomAccessFileService class to access that file.  I can't realy
help unless you tell me more about the problem.
----- Original Message -----
From: "SAURUGGER,PETER (A-PaloAlto,ex2)" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Tuesday, September 04, 2001 6:31 PM
Subject: AppClient: problem with LoginException


> I am trying to start an application client with Java WebStart (the client
> works fine from the command-line or applicationlauncher or the console).
>
> I get a
>
> java.lang.NoClassDefFoundError: javax/security/auth/login/LoginException
>
> when started with WebStart, and only with WebStart. This class is
referenced
> in the j2ee API doc. Searching in j2ee.jar, I found instead a
>
> com/sun/enterprise/security/LoginException
>
> class, but not the javax packaged one.
>
> My questions:
>
> (1) In which jar do I find javax/.../LoginException?
> (2) Anybody has any idea why this occurrs only when I attempt to
> start
> the application client with WebStart?
>
>
> Thanks
>
> --peter


Reply via email to