42

Environment: Applciation server: Apache 7.0.54 Java: "1.8.0_05" OS: Mac OS X 10.9.3

Libraries: Spring 3.2 REST application

Following is the error I received during deployment:

localhost.2014.06.09.log

Jun 09, 2014 3:37:47 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Jun 09, 2014 3:37:47 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jun 09, 2014 3:37:47 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

java.lang.IllegalArgumentException
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.asm.ClassReader.<init>(Unknown Source)
    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
    at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
jmj
  • 237,923
  • 42
  • 401
  • 438
user827096
  • 565
  • 1
  • 6
  • 11
  • 1
    take a look here: http://stackoverflow.com/questions/22730801/java-se-spring-data-hibernate – gipinani Jun 09 '14 at 21:03
  • Your link above helped me. I upgraded hibernate-core to 4.0.5.RELEASE and upgraded hibernate-validator to 5.1.1.Final. Everything is working now. Thanks mserioli – user827096 Jun 09 '14 at 23:57
  • Correction from above. Your link above helped me. I upgraded Spring-Core to 4.0.5.RELEASE and upgraded hibernate-validator to 5.1.1.Final. Everything is working now. Thanks mserioli – user827096 Jun 10 '14 at 10:04
  • Please see http://stackoverflow.com/questions/22730801/java-se-spring-data-hibernate. I think you have java 8 – Ram Sharan Mittal Aug 21 '14 at 10:16
  • There is also explanation of this: http://stackoverflow.com/a/23352356/352708 – Slava Semushin Sep 22 '14 at 09:55

4 Answers4

70

You need to upgrade to spring 4 release to support java 1.8 byte code format

jmj
  • 237,923
  • 42
  • 401
  • 438
22

If you can't go Spring 4 just upgrade to 3.2.16 will solved the problem.

Thanks to Tom Saleeba

Community
  • 1
  • 1
Aalkhodiry
  • 2,178
  • 30
  • 25
0

Upgrading to spring 3.2.16 resolved the problem. Looks like older version of spring does not like java 1.8.xxx

0

In my case my application runs with java8 and jetty, uses spring 3.1.4 and can't not be upgraded.

The problem appeared after the use of a lambda function inside a bean definition. Removing it solved my problem.

riccardo.tasso
  • 978
  • 2
  • 10
  • 28