1 Reply Latest reply on Oct 17, 2002 11:38 PM by Amy

    a problem with Entityproxy

    Amy Newbie

      enviroment: jboss-3.0.0_tomcat-4.0.3, windows 2000, oracle 8.1.7

      session bean:
      public class CompanySessionBean implements SessionBean
      {
      SessionContext sessionContext;
      BeanSearch beanSearch = new BeanSearch();
      CompanyLocalHome clh = null;

      public void ejbCreate() throws CreateException {
      System.out.println("CompanySessionBean.ejbCreate");
      try {
      Object ref = beanSearch.localSearch("Company");
      clh = (CompanyLocalHome)ref;
      }catch(NamingException ex) {
      throw new CreateException(ex.getMessage());
      }
      }
      ...........
      public CompanyLocal findCompanyByPrimarykey(String companyid)
      {
      try
      {
      CompanyLocal companyLocal = this.clh.findByPrimaryKey(companyid);
      System.out.println("companyName="+companyLocal.getCompanyname());
      return companyLocal;
      }catch(Exception ex)
      {
      throw new EJBException(ex.getMessage());
      }
      }
      }

      client call:
      void query_actionPerformed(ActionEvent e)
      {
      System.out.println("begin query");
      CompanyLocal companyLocal = null;
      try
      {
      companyLocal = this.companySession.findCompanyByPrimarykey(this.txtCompanyID.getText().trim());
      }catch(Exception ex)
      {
      ex.printStackTrace();
      }
      }

      Exception occurred during event dispatching:
      java.lang.reflect.UndeclaredThrowableException: java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.EntityProxy (no security manager: RMI class loader disabled)
      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:313)
      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:127)
      at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:138)
      at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:913)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
      at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258)
      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:133)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy1.findCompanyByPrimarykey(Unknown Source)


      server.log shows the company is found and company name is also typed.