I'm new to JBoss, so I just want to make sure I didn't miss something.  I am
getting the following exception when calling create() on a very simple
stateless session bean.  It seems like there is a problem with the proxy
mapping the char primative.  Has anyone else run into this problem?

thanks in advance
Jeremy

D:\mytest>java MyTestClient
java.rmi.ServerError: Error occurred in server thread; nested exception is:
        java.lang.NoClassDefFoundError: java/lang/Char
java.lang.NoClassDefFoundError: java/lang/Char
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
        at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unkno
wn Source)
        at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:79)
        at $Proxy0.create(Unknown Source)
        at MyTestClient.main(MyTestClient.java:32)



Code for my Session Bean
-------------------------------------------------------------------------
import java.rmi.*;
import javax.ejb.*;
import javax.naming.InitialContext;
import javax.naming.Context;

public class StatelessSessionBean implements SessionBean {
  private SessionContext sessionContext;

  public void ejbCreate() throws RemoteException, CreateException {
  System.out.println("StatelessSessionBean.ejbCreate() called");
  }

  public void ejbActivate() throws RemoteException {
    System.out.println("StatelessSessionBean.ejbActivate() called");
  }

  public void ejbPassivate() throws RemoteException {
      System.out.println("StatelessSessionBean.ejbPassivate() called");
  }

  public void ejbRemove() throws RemoteException {
     System.out.println("StatelessSessionBean.ejbRemove() called");
  }

  public void setSessionContext(SessionContext context) throws
RemoteException {
     System.out.println("StatelessSessionBean.setSessionContext() called");
    sessionContext = context;
  }


  public void testParam(char initial) throws RemoteException{
       System.out.println("StatelessSessionBean.testParam() called");
       System.out.println("My middle initial is " + initial );

  }

}

----------------------------------------------------------------------------
--


Code for the Client

----------------------------------------------------------------------------
--

import javax.naming.*;
import java.util.*;
import java.util.Hashtable;
import javax.rmi.PortableRemoteObject;
import java.lang.reflect.*;
import javax.ejb.EJBObject;


class MyTestClient
{
public static void main(String[] args)
        {
        // Set up the naming provider; this may not always be necessary, depending
        // on how your Java system is configured.
        System.setProperty("java.naming.factory.initial",
                "org.jnp.interfaces.NamingContextFactory");
        System.setProperty("java.naming.provider.url",
                "localhost:1099");

        // Enclosing the whole process in a single `try' block is not an ideal way
        // to do exception handling, but I don't want to clutter the program up
        // with catch blocks
        try
                {
          InitialContext ic = new InitialContext();

          Object ref = ic.lookup( "MyTest" );

          StatelessSessionHome home = (StatelessSessionHome)
              PortableRemoteObject.narrow (ref, StatelessSessionHome.class);

          StatelessSession ss = home.create();

                }
        catch(Exception e)
                {
                 System.out.println("Exception in MyTestClient: " + e.toString() );
                 //e.printStackTrace();
                }
        }
}

----------------------------------------------------------------------------
--



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to