Hello John,

        - there is much debugging code but you do not show us your output log or,
at least, exception stack trace.
        - what is the content of your jndi.properties file on the *client side*? Do
you have a jndi.properties file on your client side?
        - Are you sure your bean is bound on the "cont" name in the JNDI tree? Your
previous ejb xml file showed that it was under the "Contact" name
        - forget about your way of launching your test bean as part of your class
bean constructor istself... don't go in this kind of tricky things...
        - What were your JBoss installation problems?

Cheers,



                                        Sacha

> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de John LYC
> Envoy� : lundi, 17 septembre 2001 14:09
> � : [EMAIL PROTECTED]
> Objet : Re: [JBoss-user] Error during conetxt.lookup()
>
>
> okay.. sorry abt the inacuracy..
>
> okay...
> this is waht i did...
>
> my client...
> -----------------------------------------
>
> public class ContactTestClient1 {
>     private static final String ERROR_NULL_REMOTE = "Remote interface
> reference is null.  It must be created by calling one of the Home
> interface
> methods first.";
>     private static final int MAX_OUTPUT_LINE_LENGTH = 50;
>     private boolean logging = true;
>     private ContactHome contactHome = null;
>     private Contact contact = null;
>
>     /**Construct the EJB test client*/
>     public ContactTestClient1() {
>         long startTime = 0;
>
>
>         if (logging) {
>             log("Initializing bean access.");
>             startTime = System.currentTimeMillis();
>         }
>
>         try {
>             //get naming context
>             Context ctx = new InitialContext();
>
>             java.util.Hashtable myHash = ctx.getEnvironment();
>             System.out.println(myHash.toString());
>
>             java.lang.String myString = ctx.getNameInNamespace();
>             System.out.println("hahah"+myString);
>
>             //look up jndi name
>             Object ref = ctx.lookup("cont");
>
>             //cast to Home interface
>             contactHome = (ContactHome) PortableRemoteObject.narrow(ref,
> ContactHome.class);
>             if (logging) {
>                 long endTime = System.currentTimeMillis();
>                 log("Succeeded initializing bean access.");
>                 log("Execution time: " + (endTime - startTime) + " ms.");
>             }
>         }
>         catch(Exception e) {
>             if (logging) {
>                 log("Failed initializing bean access.");
>             }
>             e.printStackTrace();
>         }
>     }
>
> ...
> ...
> ..
> -------------------------
>
> here's how its being called.. in the bean...
>
> --------------------------------------
> public class ContactBean implements EntityBean {
>  EntityContext entityContext;
>  public String contactOid;
>  public String name;
>  public String company;
>  public String address1;
>  public String address2;
>  public String city;
>  public String state;
>  public String country;
>  public String postal;
>  public String email;
>  public String phone;
>  public String fax;
>  public String id;
>  public String accountNo;
> //Calling TestClient......................................
>  ContactTestClient1 contactTestClient1 = new ContactTestClient1();
>  public String ejbCreate(String contactOid, String name, String company,
> String address1, String address2, String city, String state,
> String country,
> String postal, String email, String phone, String fax, String id, String
> accountNo) throws CreateException {
>   this.contactOid = contactOid;
>   this.name = name;
>   this.company = company;
>   this.address1 = address1;
>   this.address2 = address2;
>   this.city = city;
>   this.state = state;
>   this.country = country;
>   this.postal = postal;
>   this.email = email;
>   this.phone = phone;
>   this.fax = fax;
>   this.id = id;
>   this.accountNo = accountNo;
>
> ...........
> .........
> ...........
>
> ------------------------------------
> thanks..
> john
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>


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

Reply via email to