Announcement Announcement Module
Collapse
No announcement yet.
Bean, Core and Context library backward compatibilty Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bean, Core and Context library backward compatibilty

    My project is using spring core, bean , web, context 3.0.x. New components are implemented using 3.1/3.2 libraries. There is IllegalAccessError exception while server startup.

    Any option to stay with both ?

  • #2
    Originally posted by oasantosh View Post
    My project is using spring core, bean , web, context 3.0.x. New components are implemented using 3.1/3.2 libraries. There is IllegalAccessError exception while server startup.

    Any option to stay with both ?
    could you post the stacktrace?

    Comment


    • #3
      GCU_WEB] INFO 2013-06-08 07:46:42,017 AnnotationConfigWebApplicationContext: Found 3 annotated classes in package [com.faem.config]
      [GCU_WEB] ERROR 2013-06-08 07:46:42,045 FrameworkServlet: Context initialization failed
      java.lang.IllegalStateException: Cannot load configuration class: com.faem.config.MainConfig
      at org.springframework.context.annotation.Configurati onClassPostProcessor.enhanceConfigurationClasses(C onfigurationClassPostProcessor.java:249)
      at org.springframework.context.annotation.Configurati onClassPostProcessor.postProcessBeanFactory(Config urationClassPostProcessor.java:163)
      at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:663)
      at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:602)
      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:407)
      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 67)
      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 83)
      at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:358 )
      at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:325)
      at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
      at javax.servlet.GenericServlet.init(GenericServlet.j ava:160)
      at org.apache.catalina.core.StandardWrapper.initServl et(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:1088)
      at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:5123)
      at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5407)
      at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NoClassDefFoundError: org/springframework/core/PriorityOrdered
      at java.lang.ClassLoader.defineClass1(Native Method)

      Comment


      • #4
        If I remove spring-beans-3.2.1.RELEASE from tomcat/lib

        java.lang.IllegalStateException: Cannot load configuration class: com.faem.config.MainConfig
        at org.springframework.context.annotation.Configurati onClassPostProcessor.enhanceConfigurationClasses(C onfigurationClassPostProcessor.java:249)
        at org.springframework.context.annotation.Configurati onClassPostProcessor.postProcessBeanFactory(Config urationClassPostProcessor.java:163)
        at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:663)
        at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:602)
        at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:407)
        at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 67)
        at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 83)
        at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:358 )
        at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:325)
        at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
        at javax.servlet.GenericServlet.init(GenericServlet.j ava:160)
        at org.apache.catalina.core.StandardWrapper.initServl et(StandardWrapper.java:1280)
        at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1193)
        at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:1088)
        at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:5123)
        at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5407)
        at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
        Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/Aware
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader. java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java :615)
        at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
        at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2895)
        at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1173)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1681)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1559)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader. java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java :615)
        at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
        at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2895)
        at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1173)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1681)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1559)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.ja va:2427)
        at java.lang.Class.getDeclaredMethods(Class.java:1791 )
        at net.sf.cglib.core.ReflectUtils.addAllMethods(Refle ctUtils.java:348)
        at net.sf.cglib.proxy.Enhancer.getMethods(Enhancer.ja va:421)
        at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer .java:456)
        at net.sf.cglib.core.DefaultGeneratorStrategy.generat e(DefaultGeneratorStrategy.java:25)
        at net.sf.cglib.core.AbstractClassGenerator.create(Ab stractClassGenerator.java:216)
        at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer. java:377)
        at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.j ava:317)
        at org.springframework.context.annotation.Configurati onClassEnhancer.createClass(ConfigurationClassEnha ncer.java:118)
        at org.springframework.context.annotation.Configurati onClassEnhancer.enhance(ConfigurationClassEnhancer .java:89)
        at org.springframework.context.annotation.Configurati onClassPostProcessor.enhanceConfigurationClasses(C onfigurationClassPostProcessor.java:241)
        ... 23 more
        Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.Aware
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1714)
        at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1559)
        ... 52 more

        Comment


        • #5
          [GCU_WEB] ERROR 2013-06-08 17:50:43,817 FrameworkServlet: Context initialization failed
          org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: org.springframework.transaction.annotation.Transac tionManagementConfigurationSelector was imported as a Configuration class but is not annotated with @Configuration nor does it declare any @Bean methods. Update the class to meet either of these requirements or do not attempt to import it.
          Offending resource: class path resource [org/springframework/transaction/annotation/TransactionManagementConfigurationSelector.class]
          at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68)
          at org.springframework.context.annotation.Configurati onClassBeanDefinitionReader.doLoadBeanDefinitionFo rConfigurationClassIfNecessary(ConfigurationClassB eanDefinitionReader.java:151)
          at org.springframework.context.annotation.Configurati onClassBeanDefinitionReader.loadBeanDefinitionsFor ConfigurationClass(ConfigurationClassBeanDefinitio nReader.java:120)
          at org.springframework.context.annotation.Configurati onClassBeanDefinitionReader.loadBeanDefinitions(Co nfigurationClassBeanDefinitionReader.java:111)
          at org.springframework.context.annotation.Configurati onClassPostProcessor.processConfigBeanDefinitions( ConfigurationClassPostProcessor.java:206)
          at org.springframework.context.annotation.Configurati onClassPostProcessor.postProcessBeanDefinitionRegi stry(ConfigurationClassPostProcessor.java:144)
          at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:599)
          at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:407)
          at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 67)
          at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 83)
          at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:358 )
          at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:325)
          at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
          at javax.servlet.GenericServlet.init(GenericServlet.j ava:160)
          at org.apache.catalina.core.StandardWrapper.initServl et(StandardWrapper.java:1280)
          at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1193)
          at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:1088)
          at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:5123)
          at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5407)
          at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
          at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1559)
          at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1549)
          at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          Jun 8, 2013 5:50:43 PM org.apache.catalina.core.ApplicationContext log

          Comment


          • #6
            but are you mixing different spring jars versions?

            if you use spring-core v. 3.0.6, all your other used spring jars should have the same version.

            Comment


            • #7
              it's shows compilation error with old libraries

              Comment


              • #8
                Originally posted by oasantosh View Post
                it's shows compilation error with old libraries
                i repeat myself, can't mix different versions. Upgrade ALL jars to latest stable release and retry

                Comment

                Working...
                X