Tomcat will not load any webapp jar containing javax.servlet.Servlet or javax.servlet.jsp.JspPage. I would suggest to remove package javax.servlet from your j2ee.jar. Furthermore trouble is to be expected, if you try to load classes java.* from webapp jars.
I guess you don't use the security manager, because then additional rules would apply. Regards, Rainer Jon Hoffman schrieb: > You are right it is an imcompatibilities between the Libraries. The > j2ee.jar contains a servlet.class that conflicts with the servlet.jar. > I have tried "cutting" out portions of the j2ee.jar that interferes with > the servlet.class but then I get exceptions from other parts tring to > access servlet.class. I have also tired (suggested by Mark Thomas) > removing the servlet-api.jar and jsp-api.jar from tomcat and using the > j2ee.jar but that did not work either. > > The other apps are running on Sun's Application Server (the same kind of > server as the EJB's use but not the same server) or Swing/console based > apps. I just wanted to use a cluster of Tomcat servers for this > project. > > If Sun wants to really push the J2EE standard, it would seem they should > have some standard way to access the services (like EJB's) so we do not > have these imcompatibilities. > > Jon > > -----Original Message----- > From: Christopher Schultz [mailto:[EMAIL PROTECTED] > Sent: Friday, July 28, 2006 1:17 PM > To: Tomcat Users List > Subject: Re: Tomcat and Sun's Application server > > Jon, > >> What I am trying to do is access an EJB from a Tomcat servlet which is > >> what EJB's are designed for. > > Sure, EJBs are designed to be used from servlets, but they can't really > leave their containers (as you have found). Since you need j2ee.jar > available to support the EJBs, there are all kinds of problems because > of the incompatibilities between libraries (servlet.jar and j2ee.jar, > for example). > >> This way you only have to set up the logic once (in an EJB) and then >> any application (servlet, swing, jsp....) should be able to access it. > > True. Although the remote application doesn't "host" the actual bean > (i.e. the real data lives on the EJB server), you still need the > endpoint portion of the bean to be supported by the EJB framework. > > Perhaps I'm confusing the issues; of course EJBs should be able to be > used by, say, a client-side application that is not running within a > formal container (JBoss, websphere, etc.) > > I think the problem is the incompatibilities between j2ee.jar and > servlet.jar. It may be possible to lobotomize Tomcat in order to get it > to do this, but perhaps it's not worth the trouble. What about using > another app server? > >> That is the theory anyway, but it does not seem to be working with >> tomcat because I can access the EJB through console, swing, and most >> web based apps except for the ones on my Tomcat cluster :O(. > > Those other webapps are running on something: what is it? > > -chris > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]