I've been working on this Spring-based webapp. It was originally a servlet-2.5, 
XML-configured webapp that ran great under Resin and I had a nice 
spring-test-mvc-based test class for it, and it all worked well.

After upgrading it to servlet-3.0, and using only annotations to configure (no 
XML!), the webapp works, but I can't get my test class to work. I'm fairly sure 
I still haven't configured it correctly, but in the Spring forums I'm being 
told that I'm linking against the javaee-web-api 6.0 jar, which contains no 
implementation.

While this is true, it was also true before the configuration changes. So the 
guy (a fair expert on Spring) tells me it must be due to some JAR load order 
difference that's causing the error to appear now. Thing is, in the test 
environment, I don't have any part of resin involved. I don't know where else I 
might be getting an implementation.

The exception is

    [junit] java.lang.ClassFormatError: Absent Code attribute in method that is 
not native or abstract in class file javax/servlet/ServletException
    [junit]     at java.lang.ClassLoader.defineClass1(Native Method)
    ...
    [junit]     at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:230)
    ...
    [junit]     at 
org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:148)
    [junit]     at 
org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:105)
    ...

So, I'm just curious if anyone here can shed some light on how this can come to 
be.

Thanks!


-- 
Rick




_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to