Announcement Announcement Module
Collapse
No announcement yet.
Webpage not running in tomcat 6 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Now it is asking for beanresolver. For that I have downloaded
    org.springframework.expression-3.0.5.RELEASE.jar
    but nothing works out...it has java class for beanresolver but still I am getting the error:

    Code:
    SEVERE: Context initialization failed
    java.lang.NoClassDefFoundError: org/springframework/expression/BeanResolver
    	at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:483)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:400)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: java.lang.ClassNotFoundException: org.springframework.expression.BeanResolver
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    	... 20 more
    Jan 12, 2012 2:05:14 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.NoClassDefFoundError: org/springframework/expression/BeanResolver
    	at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:483)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:400)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: java.lang.ClassNotFoundException: org.springframework.expression.BeanResolver
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    	... 20 more

    Comment


    • #17
      From your picture you've attached earlier, I can see you're using version 3.0.6. Please download entire 3.0.6 distribution - you'll find all needed JARs there:
      http://s3.amazonaws.com/dist.springf...-with-docs.zip
      http://www.springsource.com/download/community

      Comment


      • #18
        Thnx..that has solved my problem related to jars...Now I am getting errors like invalid setters. I have searched out a lot in google but i am not able to get any solution..My class is:

        Code:
        public class MCQSingleAnsController implements QuestionControllerInterface {
        	
        	private QuestionValidatorInterface questionValidatorInterface;
        	private QuestionManagerInterface questionManagerInterface;
        	
        		
        	/* Create question method*/
        	
        	public QuestionValidatorInterface getQuestionValidatorInterface() {
        		return questionValidatorInterface;
        	}
        
        	public void setQuestionValidatorInterface(
        			QuestionValidatorInterface questionValidatorInterface) {
        		this.questionValidatorInterface = questionValidatorInterface;
        	}
        
        	public QuestionManagerInterface getQuestionManagerInterface() {
        		return questionManagerInterface;
        	}
        
        
        	public void setQuestionManagerInterface(
        			QuestionManagerInterface questionManagerInterface) {
        		this.questionManagerInterface = questionManagerInterface;
        	}
        
        
        }
        MAQSingleAnsValidator implements QuestionValidatorInterface
        MAQSingleAnsManager implements QuestionValidatorManager
        and spring xml file code is:


        Code:
        <bean id="MCQSingleAnsValidator" class="com.infosys.enr.question.validator.MCQSingleAnsValidator" />
        <bean id="MCQSingleAnsManager" class="com.infosys.enr.question.manager.MCQSingleAnsManager" />
        
        <bean id="MCQSingleAnsController" class="com.infosys.enr.question.controller.MCQSingleAnsController">
        <property name="questionValidatorInterface">
        			<ref bean="MCQSingleAnsValidator" />
        </property>
        
        <property name="questionManagerInterface">
        			<ref bean="MCQSingleAnsManager" />
        </property>
        </bean>
        ]

        I am getting the error:

        Code:
        	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
        Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'questionValidatorInterface' of bean class [com.infosys.enr.question.controller.MCQSingleAnsController]: Bean property 'questionValidatorInterface' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
        	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1052)
        	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:921)
        	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76)
        	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
        	at org.springframework.bea
        
        ns.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1358)
        	... 28 more
        Related cause:
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDomain' defined in BeanDefinition defined in ServletContext resource [/WEB-INF/enrapp-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean(AbstractBeanFactory.java:1354)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:678)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:518)
        	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:319)
        	at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:185)
        	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:833)
        	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
        	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
        	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
        	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
        	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
        	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
        	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
        	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        	at java.lang.reflect.Method.invoke(Unknown Source)
        	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
        Caused by: java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
        	at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:181)
        	at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)
        	at org.springframework.aop.scope.ScopedProxyFactoryBean.setBeanFactory(ScopedProxyFactoryBean.java:109)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1439)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1408)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        	... 44 more

        Also for

        Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringCons truction(Z)V

        I have download many jars but I am not able to understand what is actually wants??

        Comment


        • #19
          Yes... if you are using Spring 3.1, just include in the lib this jar file org.springframework.asm-3.1.0.RELEASE

          Comment


          • #20
            I am using org.springframework.core-3.0.6.RELEASE.jar and org.springframework.core-3.0.6.RELEASE.jar but still facing the problem. Also, can u tell me any solution related to Invalid Setter Method problem?

            Comment


            • #21
              Look at your classpath and see what version of cglib do you use? Look at: http://search.maven.org/#search|gav|...cglib-nodep%22 to see different versions.

              Comment


              • #22
                I am using cglib-nodep-2.2.jar. For Spring 3.0.6, what which version should I use. Also, should I go for cglib-full-2.0.2.jar?

                Comment


                • #23
                  try cglib-nodep-2.2.2.jar.

                  Comment


                  • #24
                    That did it ...thnx...sorry for asking many questions but can you help me in solving setter problem...I have seen a hell lot solutions in web but all say that there must be something wrong in setter methods or property mapping in xml but I think everything is write in my case...do u find something wrong?

                    Comment


                    • #25
                      Hmm - you've written "MCQSingleAnsValidator" and "MAQSingleAnsValidator" - isn't it wrong?

                      Comment


                      • #26
                        Thats the spelling mistake there actually ...sorry...its MCQSingleAnsValidator and MCQSingleAnsManager

                        Comment


                        • #27
                          So - it works now?

                          Comment


                          • #28
                            The spelling is in my post only, in the quoted text, there is no spelling mistake in the code...

                            Comment


                            • #29
                              Hi, Do need to specifiy another other code or class...coz I am not able to get the solution of this problem...even constructor arg depedency is not working..what can be the problem..??

                              Comment


                              • #30
                                hmm maybe try cglib-nodeb-2.1.3.jar... I've googled somewhere such solution..

                                Comment

                                Working...
                                X