Re: EJB-lookup problems with moved Product ejb example

2000-10-17 Thread Shailesh Joshi

Hi Vivek.

I think, the error you got in the fifth step is because you have changed
from  ejbsamples domain to pricing. So you have to specify it in the
URL.
You can use following lines while running the client.

Properties p = new Properties();


p.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClient
InitialContextFactory");
  p.put(Context.PROVIDER_URL,"ormi://IPAddress/pricing");
  p.put(Context.SECURITY_PRINCIPAL,"username");
  p.put(Context.SECURITY_CREDENTIALS,"password");

  Context context = new InitialContext(p);
.context.lookup(..)  etc.

Shailesh Joshi
Java Programmer
Versaware (India) Ltd.

- Original Message -
From: Vivek Iyer [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, October 17, 2000 8:40 AM
Subject: EJB-lookup problems with moved "Product" ejb example




 Hello all,

 I'm getting a frustrating problem trying to bring up the "Product" entity
bean
 inside Orion 1.4.0 (after latest autoupdate - though I had the problem
with
 1.3.4 as well). It only happens _after_ I move the location of the class
files
 from d:\orion\demo\ejb\product to d:\vivek\pricing\ejb\product.

 The error I get is (ultimately):

 D:\vivek\pricing\ejb\productjava ProductClient
 Communication error: Error reading application-client descriptor: No
 location specified and no suitable instance of the type 'Product' found
 for the ejb-ref MyProduct

 Is this an obvious problem? I can't believe this is just happening because
I
 change the location of the class files and meta-inf files. I noticed
someone
 else got this error some time ago, but no solution was posted.  Here's the
gory
 story, steps 1 through 7:

 System: WinNT4 SP6
 JDK: 1.2.2
 CLASSPATH: .;
 d:\orion\orion.jar;d:\orion\jndi.jar;d:\orion\servlet.jar;d:\orion\ejb.jar

 1. INITIALIZED ORION, deployed the ejbsamples, and the "ProductClient"
 successfully ran, out-of-the-box. All classes are located in
 d:\orion\demo\ejb\product\

 2. COPIED the jndi.properties, ProductEJB, ProductHome and Product (remote
 interface) and ProductClient to d:\vivek\pricing\ejb\product\ and all the
 meta-inf files (application-client.xml, ejb-jar.xml,
 orion-application-client.xml) _without change_, recompiled all the files.
Added
 an application.xml file into d:\vivek\pricing\ejb\meta-inf\application.xml
with
 the following lines -

 application
  display-namePricing/display-name
  module
   ejbproduct/ejb
  /module
 /application

 3. COMMENTED out the "ejbsamples" part of orion's server.xml. Deleted that
 application's deployment files. Added the following application to
server.xml:

 application name="pricing" path="d:\\vivek\\pricing\\ejb" /

 4. RESTARTED Orion. Observed that

 Auto-deploying pricing (New server version detected)...
 Auto-deploying product (No previous deployment found)... done.
 Orion/1.4.0 initialized

 5. RAN ProductClient, and got this message -

 D:\vivek\pricing\ejb\productjava ProductClient
 Exception in thread "main" java.lang.SecurityException: No such
domain/applicati
 on: ejbsamples
 at com.evermind.server.rmi.bd.gk(JAX)
 at com.evermind.server.rmi.bd.gk(JAX)
 at com.evermind.server.rmi.bd.f3(JAX)
 at com.evermind.server.rmi.RMIServer.f3(JAX, Compiled Code)
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.server.administration.LazyResourceFinder.f3(JAX)
 at
com.evermind.server.administration.LazyResourceFinder.getEJBHome(JAX)

 at com.evermind.server.Application.aqo(JAX, Compiled Code)
 at
com.evermind.server.ApplicationClientInitialContextFactory.getInitial
 Context(JAX, Compiled Code)
 at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
 72)
 at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250
 )
 at javax.naming.InitialContext.init(InitialContext.java:226)
 at javax.naming.InitialContext.init(InitialContext.java:182)
 at ProductClient.main(ProductClient.java:18)

 6. ALTERED the second line of jndi.properies:
 OLD: java.naming.provider.url=ormi://localhost/ejbsamples
 NEW: java.naming.provider.url=ormi://localhost/
 (What's up with this, anyway??)

 7. RE-RAN ProductClient, and now get the final message -

 D:\vivek\pricing\ejb\productjava ProductClient
 Communication error: Error reading application-client descriptor: No
location sp
 ecified and no suitable instance of the type 'Product' found for the
ejb-ref MyP
 roduct

 Any assistance would be appreciated. I'm sure I had this working in a much
older
  version
 of Orion, and it seems to have broken, dont know why.

 Thanks,

 Vivek







EJB-lookup problems with moved Product ejb example

2000-10-16 Thread Vivek Iyer



Hello all,

I'm getting a frustrating problem trying to bring up the "Product" entity bean
inside Orion 1.4.0 (after latest autoupdate - though I had the problem with
1.3.4 as well). It only happens _after_ I move the location of the class files
from d:\orion\demo\ejb\product to d:\vivek\pricing\ejb\product.

The error I get is (ultimately):

D:\vivek\pricing\ejb\productjava ProductClient
Communication error: Error reading application-client descriptor: No
location specified and no suitable instance of the type 'Product' found
for the ejb-ref MyProduct

Is this an obvious problem? I can't believe this is just happening because I
change the location of the class files and meta-inf files. I noticed someone
else got this error some time ago, but no solution was posted.  Here's the gory
story, steps 1 through 7:

System: WinNT4 SP6
JDK: 1.2.2
CLASSPATH: .;
d:\orion\orion.jar;d:\orion\jndi.jar;d:\orion\servlet.jar;d:\orion\ejb.jar

1. INITIALIZED ORION, deployed the ejbsamples, and the "ProductClient"
successfully ran, out-of-the-box. All classes are located in
d:\orion\demo\ejb\product\

2. COPIED the jndi.properties, ProductEJB, ProductHome and Product (remote
interface) and ProductClient to d:\vivek\pricing\ejb\product\ and all the
meta-inf files (application-client.xml, ejb-jar.xml,
orion-application-client.xml) _without change_, recompiled all the files. Added
an application.xml file into d:\vivek\pricing\ejb\meta-inf\application.xml with
the following lines -

application
 display-namePricing/display-name
 module
  ejbproduct/ejb
 /module
/application

3. COMMENTED out the "ejbsamples" part of orion's server.xml. Deleted that
application's deployment files. Added the following application to server.xml:

application name="pricing" path="d:\\vivek\\pricing\\ejb" /

4. RESTARTED Orion. Observed that

Auto-deploying pricing (New server version detected)...
Auto-deploying product (No previous deployment found)... done.
Orion/1.4.0 initialized

5. RAN ProductClient, and got this message -

D:\vivek\pricing\ejb\productjava ProductClient
Exception in thread "main" java.lang.SecurityException: No such domain/applicati
on: ejbsamples
at com.evermind.server.rmi.bd.gk(JAX)
at com.evermind.server.rmi.bd.gk(JAX)
at com.evermind.server.rmi.bd.f3(JAX)
at com.evermind.server.rmi.RMIServer.f3(JAX, Compiled Code)
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.server.administration.LazyResourceFinder.f3(JAX)
at com.evermind.server.administration.LazyResourceFinder.getEJBHome(JAX)

at com.evermind.server.Application.aqo(JAX, Compiled Code)
at com.evermind.server.ApplicationClientInitialContextFactory.getInitial
Context(JAX, Compiled Code)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
72)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250
)
at javax.naming.InitialContext.init(InitialContext.java:226)
at javax.naming.InitialContext.init(InitialContext.java:182)
at ProductClient.main(ProductClient.java:18)

6. ALTERED the second line of jndi.properies:
OLD: java.naming.provider.url=ormi://localhost/ejbsamples
NEW: java.naming.provider.url=ormi://localhost/
(What's up with this, anyway??)

7. RE-RAN ProductClient, and now get the final message -

D:\vivek\pricing\ejb\productjava ProductClient
Communication error: Error reading application-client descriptor: No location sp
ecified and no suitable instance of the type 'Product' found for the ejb-ref MyP
roduct

Any assistance would be appreciated. I'm sure I had this working in a much older
 version
of Orion, and it seems to have broken, dont know why.

Thanks,

Vivek