• Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat to Sun WebApp comms problem with EJBs  RSS feed

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I been posting here for a bit now about EJB3.0 and to be honest, after several weeks of frustration things are finally starting to work!!!

I've managed to get my basic system up and running with comms from the 'client' (jsp/servlet based) to logic (ejb3.0)

both webapps have (until now) been running on Sun WebApp 9.0, but I have been thinking. As I'm using RemoteInterface between the two clients, and if my understanding is correct. I should be able to host the client on a seperate webapp server all together?

I'm looking at running the client on Tomcat (http://localhost:8080) and the logic on Sun WebApp9.0 (http://localhost/).

As you can see Tomcat is running under port 8080 (for now).

The problem is the Servlets (rather RemoteInterface' within the WAR) are not seeing the EJBs on the Sun WebApp.

Whilst the system doesn't crash, I get as far as calling the EJB and... nothing! just a blank webpage! :-(

All that's basically happenig in this sample is:
- JSP (index.jsp) calls Servlet (POST)
- Servlet calls 'local' copy of RemoteInterface
- RemoteInterface does a 'setName' in EJB
- Servlet calls RemoteInterface again
- does a getName from EJB
- Displays name to second JSP (output.jsp)

(Since this post) I just added the 2 lines below

props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");

and added the appserv-rt.jar to the CLASSPATH, but now I get the following error in my JSP:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:337)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:210)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:527)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)





Any help greatly appreciated

KS.

[ November 14, 2007: Message edited by: Keith Seller ]
[ November 14, 2007: Message edited by: Keith Seller ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!