Hi Kenneth,
I have followed the steps mentioned in the EJB FAQ in the glassfish site and was able to lookup a remote ejb deployed in glassfish from a standalone client.
In case of standalone client, i set the appropriate jndi properties in the initial context as mentioned in the FAQ and added the 4 jars specified to the classpath of the application.
It all worked perfectly well.
But I attempted to do the same from a servlet running under tomcat.
I set the appropriate jndi properties in the intial context and added 4 jars specified in the lib directory of the war file.
But this did not turn out well and tomcat complained me with some servlet init errors.
Then i searched through the web and found this posting from you:
http://www.archivesat.com/GlassFish_Enterprise_JavaBeans_Developers/thread1399339.htm
Then i created a folder called "shared/lib" under TOMCAT_HOME directory in my machine and ran the same example. Wow.....miraculously the application ran well.
But i found that the "index.jsp" which i configured in the welcome file list does not appear now. But i was able to access the servlet without any problem. And the servlet was able to successfully lookup the ejb deployed in glassfish.
Then i thought, let me try to access the ejb from a jsf application.
Then i created a jsf application in netbeans 5.5.1 and tried to access the bean deployed in glassfish.
(Note: the jsf application runs in tomcat 5.5.17 which is bundled with netbeans)
OOPSS....
Tomcat now complains me that it cannot compile the jsp page..
This is the error i got...
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
C:\Documents and Settings\james\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\CityExplorer-WebClient1\org\apache\jsp\index_jsp.java:7: org.apache.jsp.index_jsp is not abstract and does not override abstract method getDependants() in org.apache.jasper.runtime.JspSourceDependent
public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
^
Generated servlet error:
C:\Documents and Settings\james\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\CityExplorer-WebClient1\org\apache\jsp\index_jsp.java:12: getDependants() in org.apache.jsp.index_jsp cannot implement getDependants() in org.apache.jasper.runtime.JspSourceDependent; attempting to use incompatible return type
found : java.lang.Object
required: java.util.List
public Object getDependants() {
^
2 errors
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
Any ideas...
Can you please help me.
I've noticed that you were eagerly answering questions related to ejb lookup in many places.
I feel there is some potential compatability issue between tomcat and glassfish...
I request you to investigate on this and clarify the community with your response.
Thanks in advance,
James Selvakumar
[Message sent by forum member 'sskjames' (sskjames)]
http://forums.java.net/jive/thread.jspa?messageID=223685