org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named '/login' must be of typ e [org.apache.struts.action.Action], but was actually of type [$Proxy59]

Terracotta | gurdeeps | 8 years ago
  1. 0

    terracotta + spring +struts BeanNotOfRequiredTypeException

    Terracotta | 8 years ago | gurdeeps
    org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named '/login' must be of typ e [org.apache.struts.action.Action], but was actually of type [$Proxy59]
  2. 0

    Error creating bean throws "BeanNotOfRequiredTypeException"

    Stack Overflow | 6 years ago | daydreamer
    org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'hibernate-session-manager' must be of type [org.springframework.transaction.PlatformTransactionManager], but was actually of type [com.xxxxxx.core.AnnotationBasedSessionManager]
  3. 0

    Parent Contexts in spring based web-app

    Stack Overflow | 7 years ago | emeraldjava
    org.jboss.deployment.DeploymentException: Could not create deployment: file:/C:/projects/libs/jboss-4.2.2.GA/server/default/tmp/deploy/tmp30413validationservice.ear-contents/validation-ejb.jar; - nested throwable: (java.lang.ExceptionInInitializerError)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We have a maven 2.0.10 build that buids a product that uses servlets, hibernate, spring and jersey. The maven build runs fine from the command line. We added a profile to turn on cobertura and is activated using the BUILD_NUMBER property. The build runs fine with the profile loaded explicitly using the -P maven switch. However, when run from hudson with cobertura code coverage turned on, we get exceptions from spring: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'liveResource' must be of type [com.corp.m5es.rest.resources.livepc.LiveResource], but was actually of type [$Proxy114] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884) at com.sun.jersey.spi.spring.container.SpringComponentProviderFactory$SpringManagedComponentProvider.getInstance(SpringComponentProviderFactory.java:182) at com.sun.jersey.server.impl.component.IoCResourceFactory$PerRequestWrapper.getInstance(IoCResourceFactory.java:138) at com.sun.jersey.server.impl.application.WebApplicationContext.getResource(WebApplicationContext.java:160) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:64) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:654) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:612) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:603) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:309) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:590) at com.corp.m5es.spring.M5SpringServlet.service(M5SpringServlet.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:141) at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:220) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:148) at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:621) at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:552) at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:800) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.SelectorThread$1.execute(SelectorThread.java:649) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56) We are not sure what is causing this. Perhaps byte-code engineering is broken. suspecting it might be an OS related issue ( hudson is running on CentOS and our dev machines are windows), we created a windows slave and directed the build to that slave. But we got the same errors. LiveResource is a java class with class level @Component and @Scope("prototype") annotations and has spring auto-wired members. I haven't been able to craete a test case that can reproduce this yet.

    Jenkins JIRA | 7 years ago | moizd
    org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'liveResource' must be of type [com.corp.m5es.rest.resources.livepc.LiveResource], but was actually of type [$Proxy114]
  6. 0

    We have a maven 2.0.10 build that buids a product that uses servlets, hibernate, spring and jersey. The maven build runs fine from the command line. We added a profile to turn on cobertura and is activated using the BUILD_NUMBER property. The build runs fine with the profile loaded explicitly using the -P maven switch. However, when run from hudson with cobertura code coverage turned on, we get exceptions from spring: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'liveResource' must be of type [com.corp.m5es.rest.resources.livepc.LiveResource], but was actually of type [$Proxy114] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884) at com.sun.jersey.spi.spring.container.SpringComponentProviderFactory$SpringManagedComponentProvider.getInstance(SpringComponentProviderFactory.java:182) at com.sun.jersey.server.impl.component.IoCResourceFactory$PerRequestWrapper.getInstance(IoCResourceFactory.java:138) at com.sun.jersey.server.impl.application.WebApplicationContext.getResource(WebApplicationContext.java:160) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:64) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:654) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:612) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:603) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:309) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:590) at com.corp.m5es.spring.M5SpringServlet.service(M5SpringServlet.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:141) at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:220) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:148) at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:621) at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:552) at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:800) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.SelectorThread$1.execute(SelectorThread.java:649) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56) We are not sure what is causing this. Perhaps byte-code engineering is broken. suspecting it might be an OS related issue ( hudson is running on CentOS and our dev machines are windows), we created a windows slave and directed the build to that slave. But we got the same errors. LiveResource is a java class with class level @Component and @Scope("prototype") annotations and has spring auto-wired members. I haven't been able to craete a test case that can reproduce this yet.

    Jenkins JIRA | 7 years ago | moizd
    org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'liveResource' must be of type [com.corp.m5es.rest.resources.livepc.LiveResource], but was actually of type [$Proxy114]

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.beans.factory.BeanNotOfRequiredTypeException

      Bean named '/login' must be of typ e [org.apache.struts.action.Action], but was actually of type [$Proxy59]

      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean()
    2. Spring Beans
      AbstractBeanFactory.getBean
      1. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
      2. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      3. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
      3 frames
    3. Spring Context
      AbstractApplicationContext.getBean
      1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)
      1 frame
    4. Spring Struts
      DelegatingRequestProcessor.processActionCreate
      1. org.springframework.web.struts.DelegatingRequestProcessor.getDelegateAction(DelegatingRequestProcessor.java:176)
      2. org.springframework.web.struts.DelegatingRequestProcessor.processActionCreate(DelegatingRequestProcessor.java:154)
      2 frames
    5. struts
      ActionServlet.doPost
      1. org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
      2. org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      3. org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
      3 frames
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      1 frame
    7. com.mypkg.cpanel
      CPanelServlet.service
      1. com.mypkg.cpanel.servlets.CPanelServlet.service(CPanelServlet.java:85)
      1 frame
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      1 frame
    9. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2 frames
    10. Hibernate
      OpenSessionInViewFilter.doFilterInternal
      1. org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      1 frame
    11. com.mypkg.cpanel
      CPanelFilter.doFilterInternal
      1. com.mypkg.cpanel.servlets.CPanelFilter.doFilterInternal(CPanelFilter.java:115)
      1 frame
    12. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      1 frame
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2 frames
    14. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      2 frames
    15. Glassfish Core
      StandardEngineValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      7 frames
    16. org.terracotta.modules
      SessionValve55.invoke
      1. org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.tcInvoke(SessionValve55.java:63)
      2. org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.invoke(SessionValve55.java:50)
      2 frames
    17. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      1 frame
    18. Grizzly HTTP
      LeaderFollowerWorkerThread.runIt
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      2. org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      3. org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      4. org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      4 frames
    19. Tomcat Util
      ThreadPool$ControlRunnable.run
      1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      1 frame
    20. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame