Hi,
I have deployed the EJB and no error. Then I wrote client code (please see attached
codes). It compiled fine, but
when I run it, I got the following error:
java.lang.NoClassDefFoundError: javax/transaction/Status
at java.lang.ClassLoader.defineClass0(Native Method)
...
I am using JRun 3.0, IIS 4.0.
Any idea is appreciated.
Thank you,
Andi Setiyadi
// Attached code
package com.titan.cabin;
import com.titan.cabin.CabinHome;
import com.titan.cabin.Cabin;
import com.titan.cabin.CabinPK;
import javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NamingException;
import java.rmi.RemoteException;
import java.util.Properties;
public class Client_1 {
public static void main(String[] args) {
try {
Context jndiContext = getInitialContext();
Object ref = jndiContext.lookup("CabinHome");
CabinHome home = (CabinHome) javax.rmi.PortableRemoteObject.narrow(ref,
CabinHome.class);
Cabin cabin_1 = home.create(1);
cabin_1.setName("Master Suite");
...
}
catch (java.rmi.RemoteException re) {re.printStackTrace();}
catch (javax.naming.NamingException ne){ne.printStackTrace();}
catch (javax.ejb.CreateException ce){ce.printStackTrace();}
catch (javax.ejb.FinderException fe) {fe.printStackTrace();}
}
public static Context getInitialContext() throws javax.naming.NamingException{
Properties p = new Properties();
p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "allaire.ejipt.ContextFactory");
p.setProperty(Context.PROVIDER_URL, "ejipt://localhost:2323");
return new javax.naming.InitialContext(p);
}
}
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html