Lib Spring Instrument Java <> Tomcat8

spring
tomcat
tomcat-8
tomcat-7
spring-instrument
Tags: #<Tag:0x00007f015eb5ee18> #<Tag:0x00007f015eb5ecd8> #<Tag:0x00007f015eb5eb98> #<Tag:0x00007f015eb5ea58> #<Tag:0x00007f015eb5e918>

#1

Just to notice,

As stated in Spring Documentation about TomcatInstrumentableClassLoader, spring-instrument-tomcat.jar can only be used with Tomcat 6 or Tomcat 7.

From Tomcat 8, one’s got to use Tomcat’s own InstrumentableClassLoader

NOTE: Requires Apache Tomcat version 6.0 or higher, as of Spring 4.0. This class is not intended to work on Tomcat 8.0+; please rely on Tomcat’s own InstrumentableClassLoader facility instead, as autodetected by Spring’s TomcatLoadTimeWeaver.


#2

For Contrast-Finder, I tested with docker and Tomcat 8.5 (Ubuntu 18.04 image : next LTS release). Just remove the following line from the webapp/src/main/webapp/META-INF/context.xml file and it’s works:

<Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader" useSystemClassLoaderAsParent="false"/>

But, I have no idea how to provide Contrast-finder for Tomcat 7 and Tomcat 8.


some links:


`


#3

@koj, can you explain what TomcatInstrumentableClassLoader is for? To contrast-finder the following line does not seem necessary with Tomcat7.

<Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader" useSystemClassLoaderAsParent="false"/>

Build-Jdk: 1.8.0_151
##############################

Docker ubuntu:14.04 Tomcat7
----> libspring-instrument-java not needed

Docker ubuntu:16.04 Tomcat7
----> libspring-instrument-java not needed

Build-Jdk: 1.7.0_151
##############################

Docker ubuntu:14.04 Tomcat7
----> libspring-instrument-java not needed

Docker ubuntu:16.04 Tomcat7
----> libspring-instrument-java not needed


#4

since Contrast-Finder 0.8.4, TomcatInstrumentableClassLoader was removed by the following commit.


#5

For Asqatasun, libspring-instrument-java is not required since the following commit : fd1ebfe (10 Apr 2014, before the fork). See the context.xml file on the master branch.

Documentation and pre-requisites is fixed by: prerequisites - libspring-instrument-java is not needed #200