2012/2/16 Konstantin Kolinko <[email protected]>:
> 2012/2/16 Olivier Lamy <[email protected]>:
>> The issue is running Jenkins on Tomcat7 with maven build using jdk1.5 .
>> Jenkins jobs (with jdk1.5) try to load some classes (in our cases
>> javax.servlet.* ) from master node.
>> And in this case they come from tomcat classLoader and are "marked"
>> 1.6 result -> "Caused by: java.lang.UnsupportedClassVersionError: Bad
>> version number in .class file"
>>
>> I don't have any quick fix now or workaround. Expect revert Jenkins
>> master running on tc 6.x
>
>
> I cannot say whether it is relevant, but just for general info:
>
> When web application that runs on Tomcat tries to load javax.servlet.*
> classes, they are always loaded from Tomcat class loader. You are not
> allowed to load them from anywhere else. You are not allowed to put
> them into your WEB-INF/lib folder.
>
> This requirement is from Servlet specification, ch. 10.7.2 in Servlet 3.0
> (it was chapter SRV..9.7.2 in Servlet 2.5),
> so it should not be something unique to Tomcat.
> It is implemented in WebappClassLoader#validate() [1].
>
> [1] 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?view=markup#l3295
>
> I have no clue why Jenkins tries to serialize those classes.

Jenkins use a remoteclassloader mechanism to execute jobs on slave
node (non available classes are loaded from the master node).
So in our case, a 1.5 vm is started on the slave node, this vm try to
load some classes from master (and some classes are 1.6).
BTW it's a Jenkins architecture issue (not a Tomcat issue :-) ).

>
> Tomcat 7 runs on Java 6+, so there is no wonder that its classes are
> compiled on that version of Java.
>
>> 2012/2/16 Niklas Gustavsson <[email protected]>:
>>> On Thu, Feb 16, 2012 at 9:50 AM, Olivier Lamy <[email protected]> wrote:
>>>> It's on my TODO list to debug/fix this jenkins issue.
>>>> I will try to work on that today.
>>>
>>> I tried to downgrade the Cobertura publisher mentioned in the
>>> stacktrace to no improvement.
>>>
>>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Reply via email to