Announcement Announcement Module
Collapse
No announcement yet.
problem updating to spring 3.0.1.release Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem updating to spring 3.0.1.release

    Hi I have problems when update to spring.3.1.0.release form 3.0.6.Release.

    here is my web.xml

    Code:
     <!-- Session in view filter -->
    	<filter>
    		<filter-name>openSessionInViewFilter</filter-name>
    		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    		<init-param>
    			<param-name>singleSession</param-name>
    			<param-value>false</param-value>
    		</init-param>
    		<init-param>
    			<param-name>flushMode</param-name>
    			<param-value>AUTO</param-value>
    		</init-param>
    	</filter>
    	<filter-mapping>
    		<filter-name>openSessionInViewFilter</filter-name>
    		<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
       
       <!-- Spring -->
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>
                /WEB-INF/config/applicationContext.xml
    		</param-value>
    	</context-param>
       <listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    <!-- 	<listener> -->
    <!-- 		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> -->
    <!-- 	</listener> -->
    	<!--rest -->
       <servlet>
          <servlet-name>articuloRestServ</servlet-name>
          <servlet-class>
             org.springframework.web.servlet.DispatcherServlet
          </servlet-class>
          <init-param>
    			<param-name>contextClass</param-name>
    			<param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value>
    		</init-param>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value>/WEB-INF/config/applicationContext-rest-services.xml</param-value>
    		</init-param>
          <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
          <servlet-name>articuloRestServ</servlet-name>
          <url-pattern>/api/*</url-pattern>
       </servlet-mapping>
       <welcome-file-list>
          <welcome-file />
       </welcome-file-list>
    and this is the error i get, it didnt happened with spring 3.0.6.release.
    Code:
    15-dic-2011 17:01:17 org.apache.catalina.startup.ContextConfig checkHandlesTypes
    ADVERTENCIA: No puedo cargar la clase [org.springframework.instrument.classloading.jboss.JBossMCAdapter] para revisar contra la anotación  @HandlesTypes de uno o más ServletContentInitializers. 
    java.lang.IncompatibleClassChangeError: Implementing class
    	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(SecureClassLoader.java:141)
    	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2820)
    	...
    15-dic-2011 17:01:17 org.apache.catalina.startup.ContextConfig checkHandlesTypes
    ADVERTENCIA: No puedo cargar la clase [org.springframework.instrument.classloading.jboss.JBossModulesAdapter] para revisar contra la anotación  @HandlesTypes de uno o más ServletContentInitializers. 
    java.lang.IncompatibleClassChangeError: Implementing class
    	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(SecureClassLoader.java:141)
    	...
    15-dic-2011 17:01:28 org.apache.catalina.core.ApplicationContext log
    INFO: No Spring WebApplicationInitializer types detected on classpath
    15-dic-2011 17:01:29 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    ReCompralo [2011-12-15 17:01:29,075] INFO : [Thread-3] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
    ReCompralo [2011-12-15 17:01:29,087] INFO : [Thread-3] org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Thu Dec 15 17:01:29 CET 2011]; root of context hierarchy
    ReCompralo [2011-12-15 17:01:29,107] ERROR: [Thread-3] org.springframework.web.context.ContextLoader - Context initialization failed
    java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:87)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
    	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
    	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
    	..
    ReCompralo [2011-12-15 17:01:29,155] WARN : [stop children - Catalina:j2eeType=WebModule,name=//localhost/ReCompralo-restservice,J2EEApplication=none,J2EEServer=none] org.springframework.web.context.support.XmlWebApplicationContext - Exception thrown from LifecycleProcessor on context close
    java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Thu Dec 15 17:01:29 CET 2011]; root of context hierarchy
    	...
    15-dic-2011 17:01:29 org.apache.catalina.core.StandardContext listenerStop
    GRAVE: Excepción enviando evento de contexto destruído a instancia de escuchador de clase org.springframework.web.context.ContextLoaderListener
    java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
    	at o...
    hope you can help me
    Last edited by iturpablo; Dec 15th, 2011, 11:15 AM. Reason: mistake it is spring 3.1.0.release no 3.0.1

  • #2
    Check your class path. Somewhere there is an old spring jar or at least a conflicting spring jar (maybe same jar/class in different class loaders).

    Comment

    Working...
    X