hi. I have written a Session EJB by jbuilder7.0 and deloyed it into the weblogic6.1.but when I test the EJB at client,the test program throwed a error,how can I do it? the source: import java.util.*; import javax.naming.*; import javax.rmi.PortableRemoteObject;
public class testejb { public static void main(String args[]) { try { Properties p=System.getProperties();
} } error: E:\java>java testejb java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unkno wn Source) at javax.rmi.PortableRemoteObject.narrow(Unknown Source) at testejb.main(testejb.java:20)
M.C. Horn
Greenhorn
Joined: Sep 18, 2002
Posts: 28
posted
0
What Interface does TestHome implement ?
Simon Brown
sharp shooter, and author
Ranch Hand
Joined: May 10, 2000
Posts: 1860
posted
0
"gagagohst", Welcome to JavaRanch and thanks for joining us, but your publically displayed name must meet the JavaRanch naming policy. You can edit your profile here. Thanks in advance, Simon, Bartender "J2EE and EJB" forum
Andras Nemeth
Ranch Hand
Joined: Jul 31, 2001
Posts: 80
posted
0
Did you try to write out the result of the lookup? (ref) Isn't it null? What is the JNDI name of the bean (TestHome)? Ban
Andras Nemeth
Ranch Hand
Joined: Jul 31, 2001
Posts: 80
posted
0
I meant of course TestBean instead of TestHome! Cheers, Ban
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: why did't cast the object to TestHome type?