java - Is there any dependency between Spring and Apache Tomcat Jar -
following timeline of how got error in application
- used spring 2.5.3 , tomcat 7.0.27 - no error
- upgraded spring 3.1.1 same tomcat (7.0.27) - no error
- upgraded tomcat 7.0.42, used spring 3.1.1 - verifyerror
when stop application, 1000 verifyerrors (seperate error every destroybean) when upgraded tomcat 7.0.42.
following stack trace:
java.lang.verifyerror: (class: org/springframework/orm/jpa/entitymanagerfactoryutils, method: convertjpaaccessexceptionifpossible signature: (ljava/lang/runtimeexception;)lorg/springframework/dao/dataaccessexception;) wrong return type in function @ org.springframework.orm.jpa.support.persistenceannotationbeanpostprocessor.postprocessbeforedestruction(persistenceannotationbeanpostprocessor.java:357) @ org.springframework.beans.factory.support.disposablebeanadapter.destroy(disposablebeanadapter.java:193) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroybean(defaultsingletonbeanregistry.java:498) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroysingleton(defaultsingletonbeanregistry.java:474) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroybean(defaultsingletonbeanregistry.java:509) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroysingleton(defaultsingletonbeanregistry.java:474) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroysingletons(defaultsingletonbeanregistry.java:442) @ org.springframework.context.support.abstractapplicationcontext.destroybeans(abstractapplicationcontext.java:1066) @ org.springframework.context.support.abstractapplicationcontext.doclose(abstractapplicationcontext.java:1040) @ org.springframework.context.support.abstractapplicationcontext.close(abstractapplicationcontext.java:988) @ org.springframework.web.context.contextloader.closewebapplicationcontext(contextloader.java:556) @ org.springframework.web.context.contextloaderlistener.contextdestroyed(contextloaderlistener.java:142) @ org.apache.catalina.core.standardcontext.listenerstop(standardcontext.java:4980) @ org.apache.catalina.core.standardcontext.stopinternal(standardcontext.java:5626) @ org.apache.catalina.util.lifecyclebase.stop(lifecyclebase.java:232) @ org.apache.catalina.core.containerbase$stopchild.call(containerbase.java:1575) @ org.apache.catalina.core.containerbase$stopchild.call(containerbase.java:1564) @ java.util.concurrent.futuretask$sync.innerrun(unknown source) @ java.util.concurrent.futuretask.run(unknown source) @ java.util.concurrent.threadpoolexecutor$worker.runtask(unknown source) @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source) @ java.lang.thread.run(unknown source)
possible cause: fixed entitymanagerfactoryutils's "convertjpaaccessexception" return rather throw dataaccessexceptions line in changelog of spring 2.5.6
but application works fine spring 3.1.1 , tomcat 7.0.27 throws error when upgraded tomcat 7.0.42
afaik, tomcat doesn't depend on spring, , spring doesn't depend on tomcat. not in version of either.
i suspect in intermediate version of application after "upgrade spring 3.1.1 same tomcat (7.0.27)", either didn't trigger code run. note happening in code run when webapp shut. if never attempted clean shutdown in intermediate version of application, postprocessbeanbeforedestruction
method wouldn't called on bean, , problem wouldn't arise.
my guess real problem caused mixing versions of spring jar files.
Comments
Post a Comment