0 Replies Latest reply on Mar 20, 2002 9:13 AM by James Cleary

    Java Web Start jws

    James Cleary Newbie

      Has anybody successfully deployed a client application that uses java web start?

      I have a html in my war file that has a link to a jnlp. This kicks off java web start to invoke/update the Swing application to the client. The program runs but when I try to call an EJB I get the following error. The program runs fine in a shell window calling the EJB ( on a remote system ). The error appears to happen at this statement:
      Object ref = jndiContext.lookup("Mailer");

      Good response running from shell:
      Got context in orderpart
      Got reference
      Creating Mailer Object from Home interface
      Just sent out an email.

      Error message when running from Java Web Start via JBoss:
      Got context in orderpart


      at java.lang.Class.getMethod0(Native Method)

      at java.lang.Class.getMethod(Unknown Source)

      at org.jboss.proxy.ejb.HomeProxy.(HomeProxy.java:77)

      at java.io.ObjectInputStream.allocateNewObject(Native Method)

      at java.io.ObjectInputStream.inputObject(Unknown Source)

      at java.io.ObjectInputStream.readObject(Unknown Source)

      at java.io.ObjectInputStream.inputClassFields(Unknown Source)

      at java.io.ObjectInputStream.defaultReadObject(Unknown Source)

      at java.io.ObjectInputStream.inputObject(Unknown Source)

      at java.io.ObjectInputStream.readObject(Unknown Source)

      at java.io.ObjectInputStream.readObject(Unknown Source)

      at java.rmi.MarshalledObject.get(Unknown Source)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:369)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)

      at javax.naming.InitialContext.lookup(Unknown Source)

      at cae.partslists.PLdata.orderpart(PLdata.java:2438)

      at cae.partslists.PartsLists$55.actionPerformed(PartsLists.java:7937)

      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

      Here's my code:
      // Get a naming context
      InitialContext jndiContext = new InitialContext();
      System.out.println("Got context in orderpart");

      // Get a reference to the Mailer Bean
      Object ref = jndiContext.lookup("Mailer");
      System.out.println("Got reference");

      // Get a reference from this to the Bean's Home interface
      MailerHome home = (MailerHome)
      PortableRemoteObject.narrow(ref, MailerHome.class);

      System.out.println("Creating Mailer Object from Home interface");
      // Create an Mailer object from the Home interface
      Mailer mailer = home.create();

      System.out.println("Sending out an email.");
      mailer.sendMail("cleary_james@si.com","some message");
      System.out.println("Just sent out an email.");