Announcement Announcement Module
Collapse
No announcement yet.
Error because migrating from 1.1 to 1.1.5 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error because migrating from 1.1 to 1.1.5

    At first my application is going well, but i'm interested in using the fileupload to database feature of the spring ibatis support
    (class org.springframework.orm.ibatis.support.BlobSeriali zableTypeHandler)
    which is in version 1.1.5

    but when i changed the spring.jar from 1.1 to 1.1.5, an error like this occured:

    INFO: Installing web application at context path /tes from URL file:C:\Tomcat 5.0\webapps\tes
    INFO <Root WebApplicationContext: initialization started>
    INFO <Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]>
    ERROR <Context initialization failed>
    java.lang.NoSuchMethodError: org.springframework.util.Assert.hasText(Ljava/lang/String;Ljava/lang/StringV
    at org.springframework.beans.factory.config.RuntimeBe anReference.<init>(RuntimeBeanReference.java:53)
    at org.springframework.beans.factory.config.RuntimeBe anReference.<init>(RuntimeBeanReference.java:41)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parsePropertySubelement(Default XmlBeanDefinitionParser.java:548)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.getPropertyValue(DefaultXmlBean DefinitionParser.java:521)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parsePropertyElement(DefaultXml BeanDefinitionParser.java:491)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.getPropertyValueSubElements(Def aultXmlBeanDefinitionParser.java:399)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parseBeanDefinition(DefaultXmlB eanDefinitionParser.java:304)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parseBeanDefinition(DefaultXmlB eanDefinitionParser.java:274)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.registerBeanDefinitions(Default XmlBeanDefinitionParser.java:186)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:175)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:133)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:99)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:114)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:82)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:87)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:262)
    at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:131)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:224)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:150)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 48)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3827)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4343)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:823)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:595)
    at org.apache.catalina.core.StandardHostDeployer.inst all(StandardHostDeployer.java:277)
    at org.apache.catalina.core.StandardHost.install(Stan dardHost.java:832)
    at org.apache.catalina.startup.HostConfig.deployDirec tories(HostConfig.java:701)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:432)
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:983)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:349)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:478)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:480)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:425)
    Mar 23, 2005 2:57:59 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Mar 23, 2005 2:57:59 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    Mar 23, 2005 2:57:59 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path from URL file:C:\Tomcat 5.0\webapps\ROOT
    Mar 23, 2005 2:57:59 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /tomcat-docs from URL file:C:\Tomcat 5.0\webapps\tomcat-docs
    Mar 23, 2005 2:58:00 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-80
    Mar 23, 2005 2:58:00 PM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    Mar 23, 2005 2:58:00 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/62 config=C:\Tomcat 5.0\conf\jk2.properties
    Mar 23, 2005 2:58:00 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 15454 ms
    this particular line is strange:

    java.lang.NoSuchMethodError: org.springframework.util.Assert.hasText(Ljava/lang/String;Ljava/lang/String

    because if i see in the source, there is a method like this...
    does anyone have this problem?

  • #2
    Are you sure there aren't any old Spring JARs on your classpath?

    Comment


    • #3
      yes

      yes..

      i only use two (2) spring related jar before, which is
      spring.jar (1.1) and spring-sandbox.jar (i'm using this to use the commons validator feature)
      and when i replaced the old spring.jar, it encountered this error.. is it maybe because of the spring-andbox.jar?

      Comment


      • #4
        This is definitely a class loading issue, make sure you are not mixing JARS from different version of Spring.

        Rob

        Comment


        • #5
          -

          is there anyone who has tried spring-sandbox.jar and spring.jar 1.1.5
          combined? (i'm using sandbox to use the common validaotr)

          because... this class loading problem still persists.. even though i have done the following thing:
          - i search ALL spring.jar files in my computer
          - i deleted them ALL
          - i download a fresh file (spring-sandbox.jar and spring.jar)
          - i paste that file in my webapp's WEB-INF/lib
          - i deploy to tomcat
          but still the same error message ..

          maybe its just me.. but im now desperate..

          Comment


          • #6
            this is the stacktrace

            Code:
            Apr 21, 2005 5&#58;47&#58;00 PM org.apache.coyote.http11.Http11Protocol init
            INFO&#58; Initializing Coyote HTTP/1.1 on http-80
            Apr 21, 2005 5&#58;47&#58;00 PM org.apache.catalina.startup.Catalina load
            INFO&#58; Initialization processed in 3578 ms
            Apr 21, 2005 5&#58;47&#58;00 PM org.apache.catalina.core.StandardService start
            INFO&#58; Starting service Catalina
            Apr 21, 2005 5&#58;47&#58;00 PM org.apache.catalina.core.StandardEngine start
            INFO&#58; Starting Servlet Engine&#58; Apache Tomcat/5.0.28
            Apr 21, 2005 5&#58;47&#58;00 PM org.apache.catalina.core.StandardHost start
            INFO&#58; XML validation disabled
            INFO <Root WebApplicationContext&#58; initialization started>
            INFO <Loading XML bean definitions from ServletContext resource &#91;/WEB-INF/applicationContext.xml&#93;>
            ERROR <Context initialization failed>
            java.lang.NoSuchMethodError&#58; org.springframework.util.Assert.hasText&#40;Ljava/lang/String;Ljava/lang/String;&#41;V
            	at org.springframework.beans.factory.config.RuntimeBeanReference.<init>&#40;RuntimeBeanReference.java&#58;53&#41;
            	at org.springframework.beans.factory.config.RuntimeBeanReference.<init>&#40;RuntimeBeanReference.java&#58;41&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertySubElement&#40;DefaultXmlBeanDefinitionParser.java&#58;634&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyValue&#40;DefaultXmlBeanDefinitionParser.java&#58;606&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElement&#40;DefaultXmlBeanDefinitionParser.java&#58;552&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElements&#40;DefaultXmlBeanDefinitionParser.java&#58;457&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;329&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;299&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;236&#41;
            	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;185&#41;
            	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;188&#41;
            	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;146&#41;
            	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions&#40;AbstractBeanDefinitionReader.java&#58;99&#41;
            	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;114&#41;
            	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;82&#41;
            	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory&#40;AbstractRefreshableApplicationContext.java&#58;87&#41;
            	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;264&#41;
            	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;131&#41;
            	at org.springframework.web.context.ContextLoader.createWebApplicationContext&#40;ContextLoader.java&#58;230&#41;
            	at org.springframework.web.context.ContextLoader.initWebApplicationContext&#40;ContextLoader.java&#58;156&#41;
            	at org.springframework.web.context.ContextLoaderListener.contextInitialized&#40;ContextLoaderListener.java&#58;48&#41;
            	at org.apache.catalina.core.StandardContext.listenerStart&#40;StandardContext.java&#58;3827&#41;
            	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4343&#41;
            	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1083&#41;
            	at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;789&#41;
            	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1083&#41;
            	at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;478&#41;
            	at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;480&#41;
            	at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;2313&#41;
            	at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;556&#41;
            	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
            	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
            	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
            	at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;287&#41;
            	at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;425&#41;
            Apr 21, 2005 5&#58;47&#58;03 PM org.apache.catalina.core.StandardContext start
            SEVERE&#58; Error listenerStart
            Apr 21, 2005 5&#58;47&#58;03 PM org.apache.catalina.core.StandardContext start
            SEVERE&#58; Context startup failed due to previous errors
            Apr 21, 2005 5&#58;47&#58;04 PM org.apache.catalina.core.StandardHost getDeployer
            INFO&#58; Create Host deployer for direct deployment &#40; non-jmx &#41; 
            Apr 21, 2005 5&#58;47&#58;04 PM org.apache.catalina.core.StandardHostDeployer install
            INFO&#58; Processing Context configuration file URL file&#58;C&#58;\Tomcat 5.0\conf\Catalina\localhost\admin.xml
            Apr 21, 2005 5&#58;47&#58;05 PM org.apache.struts.util.PropertyMessageResources <init>
            INFO&#58; Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
            Apr 21, 2005 5&#58;47&#58;05 PM org.apache.struts.util.PropertyMessageResources <init>
            INFO&#58; Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
            Apr 21, 2005 5&#58;47&#58;06 PM org.apache.struts.util.PropertyMessageResources <init>
            INFO&#58; Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
            Apr 21, 2005 5&#58;47&#58;12 PM org.apache.catalina.core.StandardHostDeployer install
            INFO&#58; Processing Context configuration file URL file&#58;C&#58;\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
            Apr 21, 2005 5&#58;47&#58;12 PM org.apache.catalina.core.StandardHostDeployer install
            INFO&#58; Processing Context configuration file URL file&#58;C&#58;\Tomcat 5.0\conf\Catalina\localhost\manager.xml
            Apr 21, 2005 5&#58;47&#58;12 PM org.apache.catalina.core.StandardHostDeployer install
            INFO&#58; Installing web application at context path  from URL file&#58;C&#58;\Tomcat 5.0\webapps\ROOT
            Apr 21, 2005 5&#58;47&#58;13 PM org.apache.catalina.core.StandardHostDeployer install
            INFO&#58; Installing web application at context path /tomcat-docs from URL file&#58;C&#58;\Tomcat 5.0\webapps\tomcat-docs
            Apr 21, 2005 5&#58;47&#58;13 PM org.apache.coyote.http11.Http11Protocol start
            INFO&#58; Starting Coyote HTTP/1.1 on http-80
            Apr 21, 2005 5&#58;47&#58;13 PM org.apache.jk.common.ChannelSocket init
            INFO&#58; JK2&#58; ajp13 listening on /0.0.0.0&#58;8009
            Apr 21, 2005 5&#58;47&#58;13 PM org.apache.jk.server.JkMain start
            INFO&#58; Jk running ID=0 time=16/188  config=C&#58;\Tomcat 5.0\conf\jk2.properties
            Apr 21, 2005 5&#58;47&#58;13 PM org.apache.catalina.startup.Catalina start
            INFO&#58; Server startup in 13344 ms

            Comment


            • #7
              well.. guessing from the fact that theres no one answering my problem, this is absolutely my fault or mistake

              Comment


              • #8
                so.. i finally found the problem
                i do not know if this is my mistake or not..
                but as you said, this is a class loading issue
                so here's what i do:

                1. i unzipped the spring-sandbox.jar
                2. i go to folder org/springframework/util
                3. i deleted the class Assert.class, because this class is already in the original spring.jar
                4. i zip the spring sandbox again

                and the app is running well...

                Comment


                • #9
                  I have the same problem. I just switched the order of the libraries in the classpath, first spring-1.1.5, then spring-sandbox.

                  Comment

                  Working...
                  X