After upgrading to JDK 8 , the jetty 9 is no longer able to scan the spring annotations : I get the following error :
MultiException[java.lang.RuntimeException: Error scanning file ApplicationInitializer.class, java.lang.RuntimeException: Error scanning file HibernateConfig.class, java.lang.RuntimeException: Error scanning file MailConfig.class, java.lang.RuntimeException: Error scanning file ServicesConfig.class, java.lang.RuntimeException: Error scanning file WebAppConfig.class]
at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:530)
at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:441)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:466)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:745)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:117)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:99)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:154)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
It was working fine when i used jdk 7 .
The annotations it tries to scan are spring framework 4 annotations something like :
@Configuration
@EnableWebMvc
@ComponentScan("com.cityrentals.rentahouse")
@Import({ HibernateConfig.class, ServicesConfig.class, MailConfig.class })
public class WebAppConfig extends WebMvcConfigurerAdapter {
The error occurs irrespective of if the javaassist dependency is present or not
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.1-GA</version>
</dependency>
Any help is much appreciated
Thanks Suresh