Announcement Announcement Module
Collapse
No announcement yet.
Class not found after upgrading to spring 3.1 or 3.2 from spring 3.0.6 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Class not found after upgrading to spring 3.1 or 3.2 from spring 3.0.6

    I have a web application that works fine on tomcat 7 using spring 3.0.6/hibernate 3/graniteds. However, after upgrading spring version from 3.0 to 3.1 or 3.2, a "class not found" error (see below) occurs when spring is trying to initialize a bean during startup process.
    org.springframework.beans.factory.BeanDefinitionSt oreException: Failed to load bean class: com.mycompany.myapp.services.WelcomeServiceImpl; nested exception is java.io.FileNotFoundException: class path resource [javax/interceptor/InterceptorBinding.class] cannot be opened because it does not exist
    at org.springframework.context.annotation.Configurati onClassPostProcessor.processConfigBeanDefinitions( ConfigurationClassPostProcessor.java:293)
    at org.springframework.context.annotation.Configurati onClassPostProcessor.postProcessBeanDefinitionRegi stry(ConfigurationClassPostProcessor.java:227)
    at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:623)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:454)
    at org.springframework.web.context.ContextLoader.conf igureAndRefreshWebApplicationContext(ContextLoader .java:388)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:293)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 111)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4797)
    at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5291)
    at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDirec tory(HostConfig.java:1114)
    at org.apache.catalina.startup.HostConfig$DeployDirec tory.run(HostConfig.java:1673)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.io.FileNotFoundException: class path resource [javax/interceptor/InterceptorBinding.class] cannot be opened because it does not exist
    at org.springframework.core.io.ClassPathResource.getI nputStream(ClassPathResource.java:157)
    at org.springframework.core.type.classreading.SimpleM etadataReader.<init>(SimpleMetadataReader.java:49)
    at org.springframework.core.type.classreading.SimpleM etadataReaderFactory.getMetadataReader(SimpleMetad ataReaderFactory.java:80)
    at org.springframework.core.type.classreading.Caching MetadataReaderFactory.getMetadataReader(CachingMet adataReaderFactory.java:101)
    at org.springframework.core.type.classreading.SimpleM etadataReaderFactory.getMetadataReader(SimpleMetad ataReaderFactory.java:76)
    at org.springframework.context.annotation.Configurati onClassParser.getImports(ConfigurationClassParser. java:291)
    at org.springframework.context.annotation.Configurati onClassParser.getImports(ConfigurationClassParser. java:293)
    at org.springframework.context.annotation.Configurati onClassParser.getImports(ConfigurationClassParser. java:293)
    at org.springframework.context.annotation.Configurati onClassParser.doProcessConfigurationClass(Configur ationClassParser.java:223)
    at org.springframework.context.annotation.Configurati onClassParser.processConfigurationClass(Configurat ionClassParser.java:147)
    at org.springframework.context.annotation.Configurati onClassParser.parse(ConfigurationClassParser.java: 124)
    at org.springframework.context.annotation.Configurati onClassPostProcessor.processConfigBeanDefinitions( ConfigurationClassPostProcessor.java:289)
    ... 20 more
    Does spring 3.1 or 3.2 has dependency on this class "javax.interceptor.InterceptorBinding"? If yes, which is the correct jar file to use? I have tried couple jars that containing this class but they also contain classes that conflicted with tomcat server.
    Any input is appreciated. Thanks!

  • #2
    Apparently you are having a @Configuration class which is importing a wrong class...

    I would check your @Configuration classes...

    Comment


    • #3
      Thanks for your input.

      I found out graniteDS class "org.granite.tide.data.DataEnabled" has reference to the missing class "javax.interceptor.InterceptorBinding". Later version of spring tries to read those classes at start up, therefore the error comes up. Hope this is helpful for those who had the same problem.

      Comment

      Working...
      X