|
From: Lars F. <lar...@gm...> - 2003-08-26 07:38:41
|
Thomas, thanks a lot, deployment works now. There is one error message when undeploying but I hope alle these missing classes are included in the next release. Regards Lars P.S.: Error when undeploying (do not forget in 1.0): Failed while destroying servlet: contextLoader. java.lang.NoSuchMethodError: com.interface21.web.context.ContextLoader.closeContext(Ljavax/servlet/ServletContext;)V > Juergen, > > The problem is that 'com.interface21.web.context.ContextLoaderServlet' > can't > be found in the classpath - it is not in the spring-full-0.9.jar from the > distribution. Did we remove this file and later add it back in? > > Lars - I have attached a jar file that contains this missing class - add > that > to your lib directory. Also, remove the <listener> entry in web.xml. > > Thomas > > > Lars, > > > > You mean that > > > > <servlet> > > <servlet-name>contextLoader</servlet-name> > > > > > <servlet-class>com.interface21.web.context.ContextLoaderServlet</servlet- > class> > > <load-on-startup>1</load-on-startup> > > </servlet> > > > > <servlet> > > <servlet-name>example</servlet-name> > > > > > <servlet-class>com.interface21.web.servlet.DispatcherServlet</servlet-class> > > <load-on-startup>2</load-on-startup> > > </servlet> > > > > still loads the DispatcherServlet before the ContextLoaderServlet? > Ignoring > > the load-on-startup values would be a major bug in WebLogic's web > container. > > Are you *really* sure that a web.xml with entries like the above causes > wrong > > initialization order? Please recheck that thoroughly! > > > > It's bad enough that WebLogic invokes the listeners at the wrong time, > but > > unfortunately that is not actually conflicting with the current spec. I > can't > > believe that it ignores servlet load-on-startup values though - how did > it > > get its J2EE 1.3 certification then? It seems to work on Thomas' > > installation, so there should be a way to make it work on yours. > > > > Even in the extreme case, a solution can be found. You could for example > just > > use a servlet-specific context and no root context, by simply omitting > the > > context loader definition. You could subclass DispatcherServlet to > perform > > initialization of the root context before continuing with its own. But > I'm > > pretty sure that none of these will be necessary. > > > > Juergen > > > > > > -----Original Message----- > > From: Lars Fischer [mailto:lar...@gm...] > > Sent: Monday, August 25, 2003 10:32 AM > > To: jürgen höller [werk3AT] > > Cc: tri...@tr...; spr...@li... > > Subject: RE: [Springframework-developer] Example classes needed > > > > > > Jürgen, > > > > the problem is that the ***-servlet.xml stuff is always loaded before > > the applicationContext.xml stuff no matter what I define in > > web.xml. This is against the documentation. > > > > I will open a case with BEA support (this would be the first time they > > would solve an issue but you can never know ...). > > > > It seems like I have to use another server but unless there is no error > > in my application Spring is no alternative for production applications > > (Petclinic does not work too at the moment). > > > > Is there any difference between the Java SDK versions ? > > > > Thanks > > Lars > > > > > Lars, Thomas, > > > > > > I guess that WebLogic simply invokes the listeners after > load-on-startup > > > servlets. Bad WebLogic ;-) > > > > > > Unfortunately, the Servlet 2.3 spec leaves this unspecified. The > Servlet > > > 2.4 spec clarifies that listeners have to be *initialized before* and > > > *destroyed after* any servlets. Tomcat and Resin already behave this > > > way, Orion does too since 2.0.2 after I've informed them about the > > > Servlet 2.4 clarification... > > > > > > For a solution with current WebLogic versions, I agree that using the > > > servlet initializers like ContextLoaderServlet and Log4jConfigServlet > is > > > probably the best choice, as Thomas has recommended. > > > > > > Juergen > > > > > > > > > -----Original Message----- > > > From: tri...@tr... [mailto:tri...@tr...] > > > Sent: Sunday, August 24, 2003 10:49 PM > > > To: Lars Fischer > > > Cc: spr...@li... > > > Subject: Re: [Springframework-developer] Example classes needed > > > > > > > > > Lars, > > > > > > Loading ContextLoaderServlet as a servlet with load-on-startup set to > 1 > > > and > > > loading DispatcherServlet with load-on-startup set to 2 works for me > on > > > WebLogic > > > 8.1 SP1. If it does not work, could you send me the web.xml and your > > > log output? > > > > > > Also, I get the same errors deploying the Petclinic, so it does not > work > > > for me. > > > Can you send me the petclinic war file that works with WebLogic 8.1 > SP1 > > > so I > > > can try it on my server? > > > > > > Thomas > > > > > > > > > > Thomas, > > > > > > > > thanks for the suggestion. Tried it but it doesn't work. > > > > > > > > This is a serious one: > > > > > > > > Tested my app with Tomcat 4.1.24 and it works. > > > > > > > > I does NOT work with > > > > > > > > WebLogic 8.1 SP1, WebLogic Express SP1, WebLogic 7.0 SP3. > > > > > > > > What makes me wonder is that Petclinic works with WebLogic 8.1 SP1. > > > > > > > > Regards > > > > Lars > > > > > > > > > Lars, > > > > > > > > > > I have looked into this a little bit more. What happens is that > > > > > ServletContextListener.contextInitialized() method is called > _after_ > > > the > > > > > HttpServlet.init() method is called on servlets specified with > > > <load-on- > > > > > startup>. This causes the xxx-servlet.xml to be loaded before the > > > > > > applicationContext.xml is loaded, so that is why you can't > reference > > > > > > > > the 'cwxDao' bean. This behavior is the opposite of what I see > for > > > > > Tomcat, > > > > > and I'm sure the same is true for Orion and Resin that Juergen is > > > using. > > > > > I > > > > > looked in the Servlet 2.3 specification, but I did not see > anything > > > > > specifying > > > > > which order these methods should be called in. Maybe Juergen or > Rod > > > can > > > > > shed > > > > > some more light on this issue. > > > > > > > > > > You should be able to use the ContextLoaderServlet for now. > > > > > > > > > > Thomas > > > > > > > > > > > |