Spring context initialization failed with java.lang.IllegalArgumentException while deploying to Apache 7.0.54 and java 8
42,398
Solution 1
You need to upgrade to spring 4 release to support java 1.8 byte code format
Solution 2
If you can't go Spring 4 just upgrade to 3.2.16 will solved the problem.
Thanks to Tom Saleeba
Author by
user827096
Updated on July 09, 2022Comments
-
user827096 about 2 years
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)
-
gipinani about 10 yearstake a look here: stackoverflow.com/questions/22730801/…
-
user827096 about 10 yearsYour 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 about 10 yearsCorrection 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
-
Ram Sharan Mittal almost 10 yearsPlease see stackoverflow.com/questions/22730801/…. I think you have java 8
-
Slava Semushin almost 10 yearsThere is also explanation of this: stackoverflow.com/a/23352356/352708
-
-
Sadanand about 9 yearsSteps to fix the issue given in this link stackoverflow.com/a/30204461/526438
-
Alexander about 8 yearsUpgrading to 3.2.16 solved the problem for my case. Thanks a lot!