I am new to programming ejbs and was hoping for some help.
I have written an ejb that is being called from jsp code. There is a declaration of a class called Searchable(externally written class) in the jsp code. the jsp invokes a method from the ejb and returns an instance of Searchable to the jsp.
se = bean.getActiveSearchable(); //ejb method
Ejb code function
private Searchable active_searchable = null; //declared outside the function
public Searchable getActiveSearchable()
I have a jar file that the ejb and the jsp code uses called search.jar
It is placed in the
The error i get back is
[ERROR,Default] java.lang.ClassCastException: Searchable
[ERROR,Default] at $Proxy5.getActiveSearchable(Unknown Source)
[ERROR,Default] at org.apache.jsp.processSearch$jsp._jspService(processS
[ERROR,Default] at org.apache.jasper.runtime.HttpJspBase.service(HttpJsp
I also tried changing about the location of the jar files and I get a different error Class Searhable violates loader contraints.
If anyone could help it would be great.
What exacly is your bean.getActive... doing. If there is an jndi-lookup inside notice that you have to cast at the Home-Interface of the bean not the Object-Interface!