Originally posted by Desai Sandeep:
Hi Nishant,
ClassCastException may occur due to several reasons.Check the following:
- All the required jar files are available.
- The correct jar files are available while client call and during deployment.This is the problem with Oracle products not sure about IBM though!
- The Home Object has been published properly in the JNDI namespace.
Most likely the lookup is not able to find the correct HomeObject.This hints to the fact that deployment may not have been correct.Note it may not show errors while deployment but still as I have mentioned in 2, there may be version conflicts.Do confirm that this is not a problem before trying anything different.
Good luck,
[b]Sandeep
Sun Certified Programmer for Java 2 Platform Scored 93%
Oracle Certified Solution Developer - JDeveloper
-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
-- Object-Oriented Analysis and Design with UML Scored 73%
Oracle Certified Enterprise Developer - Oracle Internet Platform
-- Enterprise Connectivity with J2EE Scored 72%
-- Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
[This message has been edited by Desai Sandeep (edited June 26, 2001).][/B]
Originally posted by Desai Sandeep:
Hi Nishant,
I was wondering why you were not setting the [b]SessionContext in your SessionBean
Could you try the following version of Bean and let me know what happens.
<pre>
public class NishantBean implements SessionBean {
protected SessionContext ctx;
public void ejbActivate() throws RemoteException {
}
public void ejbCreate() throws CreateException,RemoteException {
}
public void ejbPassivate() throws RemoteException {
}
public void ejbRemove() throws RemoveException,RemoteException {
}
public String getMessage() throws RemoteException {
return "Nishant";
}
public void setSessionContext(SessionContext ctx) throws RemoteException {
this.ctx = ctx;
}
}
</pre>
Other things looks alright for the components you pasted.Just confirm that the client does a lookup at the right URL that has been published while deployment.
Hope this helps,
Sandeep
[This message has been edited by Desai Sandeep (edited June 27, 2001).][/B]
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
|