Back Forum Reply New

Spring Weaving Tomcat addon

Hi

I'm trying to deploy a web-app developed against Tomcat 6.0.26 back to a tomcat 5.0.23 server. Under 6.0.26 I was usuing the org..instrument.tomcat-3.0.2.RELEASE.jar (for JPA weaving) and I've had a few problems getting it recognized under 5.0.23. Now I've got the classloader working, the 5.0.23 system at startup complains it can't find things that are located in servlet.jar! (ServletContextListener, fromSessionListener for starters) Obviously servlet.jar must be found otherwise none of the other web-apps would run.

It occurs to me that in the 5.x.x days, jar files were located in common/lib, server/lib and shared/lib whereas that distinction doesn't exist in Tomcat 6.x.x. So am I using a too uptodate weaver that doesn't recognize the library split and do I need a version known to work against Tomcat 5.x.x? If so any ideas where I could find it?

After further research, I can report that I have two webapps. Both webAppA and webAppB use Spring 3.0.2, EclipseLink JPA for persistence. WebAppA only uses Spring for DI - persistence is handled by the webapp, whereas we've tried to throw everything at Spring for persistence in WebAppB. WebAppB depoys org..instrument-tomcat-3.0.2.RELEASE.jar to perform the run time weaving to get lazy loading of entities etc.

Running under Windows XP and Tomcat 6.0.26 both webapps will deploy. Running under Tomcat 6.0.26 under Linux, both webapps will deploy. However, under tomcat 5.0.23 (Windows or Linux) webappA will deploy successfully and webappB fails. Log files indicate that ServletContextListener, fromSessionListener can't be found. It appears that after replacing the WebappClasLoader with Springs TomcatInstrumentableClassLoader, Tomcat can no longer find jars in /lib/common.

I've found via Google references to using spring-tomcat-weaver.jar in conjunction with Tomcat 5.x.x so I've downloaded Spring 2.5.6SEC01, lifted the jar file and installed that. Same thing - webappB will not deploy under 5.0.23 complaining about the same thing.

Regards

Regards
¥
Back Forum Reply New