Announcement Announcement Module
Collapse
No announcement yet.
strange error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • strange error

    Hi from newbie

    I'm having this strange error:

    Code:
    org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError
    	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I have no idea what's wrong If anyone has some clue about it pls give me a reply. Here is the:

    applicationContext.xml

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
    	"http://www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
    	<!--  *********************** Hibernate part ************************************** -->
    	<bean id="dataSource"
    		class="org.apache.tomcat.dbcp.dbcp.BasicDataSource"	
    		destroy-method="close">
    		<property name="driverClassName"
    			value="com.mysql.jdbc.Driver">
    		</property>
    		<property name="url"
    			value="jdbc:mysql://127.0.0.1:3306/projbetadb?characterEncoding=utf8&amp;jdbcCompliantTruncation=false">
    		</property>
    		<property name="username" value="root" />
    		<property name="password" value="california" />
    	</bean>
    
    	<bean id="sessionFactory"
    		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    		<property name="dataSource">
    			<ref bean="dataSource" />
    		</property>
    		
    		<property name="mappingResources">
    			<list>
    				<value>pkg\model\employee.hbm.xml</value>
    				<value>pkg\model\supervisors_hierarchy.hbm.xml</value>
    			</list>
    		</property>
    
    		<property name="hibernateProperties">
    			<props>
    				<prop key="hibernate.dialect">
    					org.hibernate.dialect.MySQLDialect
    				</prop>
    				<prop key="hibernate.show_sql">false</prop>
    				<prop key="hibernate.cglib.use_reflection_optimizer">
    					true
    				</prop>
    				<prop key="hibernate.cache.provider_class">
    					org.hibernate.cache.HashtableCacheProvider
    				</prop>
    			</props>
    		</property>
    	</bean>
    
    	<!-- Spring Data Access Exception Translator Defintion -->
    	<bean id="jdbcExceptionTranslator"
    		class="org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator">
    		<property name="dataSource" ref="dataSource"></property>
    	</bean>
    
    	<!-- <bean id="hibernateTemplate"
    		class="org.springframework.orm.hibernate.HibernateTemplate">
    		<property name="sessionFactory" ref="sessionFactory"></property>
    		<property name="jdbcExceptionTranslator"
    			ref="jdbcExceptionTranslator">
    		</property>
    	</bean> -->
    
    
    	<!-- ********************************* Spring part ************************************ -->
    	<bean id="employeeDAO"
    		class="pkg.dao.hibernate.EmployeeDAOHibernateImpl" />
    
    	<bean id="transactionManager"
    		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    		<property name="sessionFactory">
    			<ref bean="sessionFactory" />
    		</property>
    	</bean>
    
    	<bean id="employeeServiceImplTarget"
    		class="pkg.service.impl.EmployeeServiceImpl"
    		singleton="true">
    		<property name="employeeDAO">
    			<ref local="employeeDAO" />
    		</property>
    	</bean>
    
    	<bean id="employeeService"
    		class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    		<property name="target">
    			<ref bean="employeeServiceImplTarget" />
    		</property>
    		<property name="transactionManager">
    			<ref bean="transactionManager" />
    		</property>
    		<property name="transactionAttributeSource">
    			<ref bean="myTransactionAttribute" />
    		</property>
    	</bean>
    
    	<bean id="myTransactionAttribute"
    		class="org.springframework.transaction.interceptor.DefaultTransactionAttribute">
    		<property name="propagationBehaviorName">
    			<value>PROPAGATION_REQUIRES_NEW</value>
    		</property>
    		<property name="isolationLevelName">
    			<value>ISOLATION_SERIALIZABLE</value>
    		</property>
    	</bean>
    </beans>
    faces-managed-beans.xml

    Code:
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
      <managed-bean>
        <description>
          Managed bean that is used as an application scope cache
        </description>
        <managed-bean-name>applicationBean</managed-bean-name>
        <managed-bean-class>pkg.bean.ApplicationBean</managed-bean-class>
        <managed-bean-scope>application</managed-bean-scope>
        <managed-property>
        	<property-name>serviceLocator</property-name>
        	<value>#{serviceLocatorBean}</value>
        </managed-property>    
      </managed-bean>
      
      <managed-bean>
        <description>
          Managed bean that is used as a session scope cache
        </description>
        <managed-bean-name>sessionBean</managed-bean-name>
        <managed-bean-class>pkg.bean.SessionBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      
      <managed-bean>
        <description>
          Service locator of the business services
        </description>
        <managed-bean-name>serviceLocatorBean</managed-bean-name>
        <managed-bean-class>pkg.bean.ServiceLocatorBean</managed-bean-class>
        <managed-bean-scope>application</managed-bean-scope>
      </managed-bean>  
      
      <managed-bean>
        <description>
          Backing bean for the emplooyee.
        </description>
        <managed-bean-name>employeeBean</managed-bean-name>
        <managed-bean-class>pkg.bean.EmployeeBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>     
        <managed-property>
        	<property-name>serviceLocator</property-name>
        	<value>#{serviceLocatorBean}</value>
        </managed-property> 
      </managed-bean>
        
    </faces-config>

  • #2
    Is there some further info in the stacktrace about which class could not be found?

    Regards,
    Andreas

    Comment


    • #3
      here's the full stack:

      Code:
      org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError
      	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      
      root cause
      
      org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError
      	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
      	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
      	org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      
      root cause
      
      javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError
      	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
      	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
      	org.apache.jsp.pages.inputData_jsp._jspService(inputData_jsp.java:117)
      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
      	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
      	org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      
      root cause
      
      javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError
      	com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
      	com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
      	javax.faces.component.UIOutput.getValue(UIOutput.java:147)
      	com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:191)
      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:169)
      	javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
      	com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
      	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435)
      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:440)
      	com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
      	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
      	javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:607)
      	javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:544)
      	com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
      	org.apache.jsp.pages.inputData_jsp._jspx_meth_h_panelGrid_0(inputData_jsp.java:201)
      	org.apache.jsp.pages.inputData_jsp._jspx_meth_f_view_0(inputData_jsp.java:154)
      	org.apache.jsp.pages.inputData_jsp._jspService(inputData_jsp.java:110)
      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
      	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
      	org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      Any idea? I think that he can't find the pkg.bean.ServiceLocatorBean but i'm not sure this error is very strange for me, but i'm a newbie

      Comment


      • #4
        Unfortunately that provides no further clue. Perhaps some jars are missing? Do you have spring-hibernate3.jar and hibernate3.jar in your classpath?

        Regards,
        Andreas

        Comment


        • #5
          I have hibernate3.jar n spring.jar. Now i'm searching for the spring-hibernate3.jar if this will solve the problem i let u know. I'm using spring 1.2.8 n Hibernate3.1 plus JSF 1.2 if that can help u solve my problem
          Last edited by alien01; Aug 31st, 2006, 07:28 AM.

          Comment


          • #6
            Ok. In spring 1.x the hibernate classes are contained in spring.jar (maybe you could recheck). The spring-hibernate3.jar should exist only since spring 2.0.

            Do you have any other log where the application context is being instantiated? Perhaps that could provide more information about what is missing.

            Regards,
            Andreas

            Comment


            • #7
              I've added the spring-hibernate.jar to the \lib but the same error has occured . No i have only this one i'm using tomcat5.5 directly from the eclipse. Yes you are right .org.springframework.orm.hibernate3.* but still i have this error. This is the list of *.jar that i'm using:
              - common-annotations.jar
              - commons-beanutils.jar
              - commons-collections.jar
              - commons-digester.jar
              - commons-logging.jar
              - dom4j-1.6.1.jar
              - hibernate3.jar
              - jsf-api.jar
              - jsf-impl.jar
              - jstl.jar
              - jta.jar
              - spring.jar
              - standard.jar
              - spring-hibernate.jar

              Am i missing some *.jar ?
              Last edited by alien01; Aug 31st, 2006, 07:58 AM.

              Comment


              • #8
                Afaik hibernate requires cglib. So you should add that jar as well.

                Regards,
                Andreas

                Comment


                • #9
                  yap the cglib.jar solved the problem Thx a lot for helping me

                  Comment


                  • #10
                    Hi again

                    I've decided to continue this thread since this is the same error but with a different bean . This time i have this error in a 'employeeService' bean the web.xml n applicationContext.xml stay the same. Think i'll just print the error:


                    If anybody has an idea how to solve this problem pls help. Last time i solved this problem by adding cglib.jar but i think that if i'll add it second time it won't solve the prob . Maybe i'm missing some other pkg?

                    Sry for printing 2 posts but the prev one was too long.

                    Comment


                    • #11
                      now the error:

                      Code:
                      org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
                      	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
                      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
                      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      
                      root cause
                      
                      org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
                      	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
                      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
                      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
                      	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
                      	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
                      	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
                      	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
                      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
                      	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
                      	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
                      	org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
                      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      
                      root cause
                      
                      javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
                      	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
                      	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
                      	org.apache.jsp.pages.inputData_jsp._jspService(inputData_jsp.java:117)
                      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
                      	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
                      	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
                      	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
                      	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
                      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
                      	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
                      	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
                      	org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
                      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      
                      root cause
                      
                      javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'pkg.bean.ServiceLocatorBean'.. class pkg.bean.ServiceLocatorBean : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
                      	com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
                      	com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
                      	javax.faces.component.UIOutput.getValue(UIOutput.java:147)
                      	com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
                      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:191)
                      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:169)
                      	javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
                      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
                      	com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
                      	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
                      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435)
                      	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:440)
                      	com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
                      	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
                      	javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:607)
                      	javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:544)
                      	com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
                      	org.apache.jsp.pages.inputData_jsp._jspx_meth_h_panelGrid_0(inputData_jsp.java:201)
                      	org.apache.jsp.pages.inputData_jsp._jspx_meth_f_view_0(inputData_jsp.java:154)
                      	org.apache.jsp.pages.inputData_jsp._jspService(inputData_jsp.java:110)
                      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
                      	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
                      	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
                      	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
                      	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
                      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
                      	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
                      	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
                      	org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
                      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                      	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

                      Comment


                      • #12
                        The last time was guessing. This time I have no clue.
                        Unless you can get hold of a stacktrace providing more detail about which class has not been found I recommend to debug into the code and try finding out some details. Maybe set an exception breakpoint to ClassNotFoundException and see where the problem lies.

                        Regards,
                        Andreas

                        Comment


                        • #13
                          this is the prob absolutely nowhere is writen what class can't be found i can print u what the console is saying but i don't think this will be much help

                          Comment


                          • #14
                            Don't you have any log files? Besides that, there is still the debugging option...

                            One thing: Did it work after adding cglib.jar? If yes: What changed before it stopped working?

                            Regards,
                            Andreas

                            Comment


                            • #15
                              I think eclipse has only the console. Well the app didn't work i had some more errors which i get rid off. The last prob that i solved was that there was no ref to the serviceFactory in the employeeDAO bean in the applitcationContext.xml (stupid error). I'll try to do some debuging n if i'll discover smth i let u know thx for interest .

                              Comment

                              Working...
                              X