java.lang.ClassCastException: org.springframework.jndi.JndiObjectFactoryBean

Spring JIRA | Dominique Jean-Prost | 9 years ago
  1. 0

    I get this exception when undeploying a webapp. I use Spring deployer (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSpringIntegration) to deploy my spring component. An application context is created then put in jndi. As this eception occurs at shutdown, it doesn't prevent the application from running. My webapp is configured this way : web.xml : ... <context-param> <param-name>parentContextKey</param-name> <param-value>factory.services</param-value> </context-param> <context-param> <param-name>locatorFactorySelector</param-name> <param-value>/WEB-INF/beanRefContext.xml</param-value> </context-param> ... beanRefContext.xml : <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="factory.services" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="bigjam" /> </bean> </beans> where bigjam is the jndi name of the application context created by spring deployer. 16:48:59,022 ERROR [[/produit]] Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.ClassCastException: org.springframework.jndi.JndiObjectFactoryBean at org.springframework.context.support.AbstractApplicationContext.doStop(AbstractApplicationContext.java:1108) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:836) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:802) at org.springframework.context.access.ContextSingletonBeanFactoryLocator.destroyDefinition(ContextSingletonBeanFactoryLocator.java:155) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator$CountingBeanFactoryReference.release(SingletonBeanFactoryLocator.java:525) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:374) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:70) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3770) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4339) at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1132) at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4443) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:173) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103) at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371) at org.jboss.web.WebModule.startModule(WebModule.java:83) at org.jboss.web.WebModule.startService(WebModule.java:61) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy31.start(Unknown Source) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97) at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238) at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117) at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188) at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy32.start(Unknown Source) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771) at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy8.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy4.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362) at org.jboss.Main.boot(Main.java:200) at org.jboss.Main$1.run(Main.java:464) at java.lang.Thread.run(Thread.java:595)

    Spring JIRA | 9 years ago | Dominique Jean-Prost
    java.lang.ClassCastException: org.springframework.jndi.JndiObjectFactoryBean
  2. 0

    I get this exception when undeploying a webapp. I use Spring deployer (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSpringIntegration) to deploy my spring component. An application context is created then put in jndi. As this eception occurs at shutdown, it doesn't prevent the application from running. My webapp is configured this way : web.xml : ... <context-param> <param-name>parentContextKey</param-name> <param-value>factory.services</param-value> </context-param> <context-param> <param-name>locatorFactorySelector</param-name> <param-value>/WEB-INF/beanRefContext.xml</param-value> </context-param> ... beanRefContext.xml : <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="factory.services" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="bigjam" /> </bean> </beans> where bigjam is the jndi name of the application context created by spring deployer. 16:48:59,022 ERROR [[/produit]] Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.ClassCastException: org.springframework.jndi.JndiObjectFactoryBean at org.springframework.context.support.AbstractApplicationContext.doStop(AbstractApplicationContext.java:1108) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:836) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:802) at org.springframework.context.access.ContextSingletonBeanFactoryLocator.destroyDefinition(ContextSingletonBeanFactoryLocator.java:155) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator$CountingBeanFactoryReference.release(SingletonBeanFactoryLocator.java:525) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:374) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:70) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3770) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4339) at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1132) at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4443) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:173) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103) at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371) at org.jboss.web.WebModule.startModule(WebModule.java:83) at org.jboss.web.WebModule.startService(WebModule.java:61) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy31.start(Unknown Source) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97) at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238) at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117) at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188) at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy32.start(Unknown Source) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771) at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy8.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy4.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362) at org.jboss.Main.boot(Main.java:200) at org.jboss.Main$1.run(Main.java:464) at java.lang.Thread.run(Thread.java:595)

    Spring JIRA | 9 years ago | Dominique Jean-Prost
    java.lang.ClassCastException: org.springframework.jndi.JndiObjectFactoryBean
  3. 0

    JaxB cannot be cast to java.lang.Integer

    Stack Overflow | 4 years ago | Rodrigo
    java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast to java.lang.Integer
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    app crashes when i change the order of my XML RelativeLayout android

    Stack Overflow | 4 years ago | Aaron Russell
    java.lang.ClassCastException: android.widget.ImageView
  6. 0

    Fragment Activity in tabhost "cannot be cast to android.support.v4.app.Fragment"

    Stack Overflow | 4 years ago | Aoyama Nanami
    java.lang.ClassCastException: id.co.ajsmsig.epolicy.LoginActivity cannot be cast to android.support.v4.app.Fragment

    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. java.lang.ClassCastException

      org.springframework.jndi.JndiObjectFactoryBean

      at org.springframework.context.support.AbstractApplicationContext.doStop()
    2. Spring Context
      ContextSingletonBeanFactoryLocator.destroyDefinition
      1. org.springframework.context.support.AbstractApplicationContext.doStop(AbstractApplicationContext.java:1108)
      2. org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:836)
      3. org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:802)
      4. org.springframework.context.access.ContextSingletonBeanFactoryLocator.destroyDefinition(ContextSingletonBeanFactoryLocator.java:155)
      4 frames
    3. Spring Beans
      SingletonBeanFactoryLocator$CountingBeanFactoryReference.release
      1. org.springframework.beans.factory.access.SingletonBeanFactoryLocator$CountingBeanFactoryReference.release(SingletonBeanFactoryLocator.java:525)
      1 frame
    4. Spring
      ContextLoaderListener.contextDestroyed
      1. org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:374)
      2. org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:70)
      2 frames
    5. Glassfish Core
      StandardContext.destroy
      1. org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3770)
      2. org.apache.catalina.core.StandardContext.stop(StandardContext.java:4339)
      3. org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1132)
      4. org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4443)
      4 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    7. Commons Modeler
      BaseModelMBean.invoke
      1. org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      1 frame
    8. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      2. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2 frames
    9. org.jboss.web
      TomcatDeployer.performDeploy
      1. org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:173)
      2. org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
      2 frames
    10. JBoss Application Server Server
      WebModule.startService
      1. org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
      2. org.jboss.web.WebModule.startModule(WebModule.java:83)
      3. org.jboss.web.WebModule.startService(WebModule.java:61)
      3 frames
    11. JBoss Application Server System
      ServiceMBeanSupport.jbossInternalLifecycle
      1. org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      2. org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      2 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    13. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    14. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4 frames
    15. JBoss Application Server System
      ServiceController$ServiceProxy.invoke
      1. org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      1 frame
    16. Unknown
      $Proxy0.start
      1. $Proxy0.start(Unknown Source)
      1 frame
    17. JBoss Application Server System
      ServiceController.start
      1. org.jboss.system.ServiceController.start(ServiceController.java:417)
      1 frame
    18. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    19. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    20. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      5. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      5 frames
    21. Unknown
      $Proxy31.start
      1. $Proxy31.start(Unknown Source)
      1 frame
    22. JBoss Application Server Server
      AbstractWebContainer.start
      1. org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
      1 frame
    23. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    24. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    25. JBoss Application Server J2SE
      Invocation.dispatch
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      1 frame
    26. org.jboss.mx
      AbstractInterceptor.invoke
      1. org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      1 frame
    27. JBoss Application Server J2SE
      Invocation.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      1 frame
    28. org.jboss.mx
      DynamicInterceptor.invoke
      1. org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      2. org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      2 frames
    29. JBoss Application Server System
      InterceptorServiceMBeanSupport.invokeNext
      1. org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      1 frame
    30. org.jboss.ws
      WebServiceDeployer.start
      1. org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
      1 frame
    31. JBoss Application Server System JMX
      SubDeployerInterceptor.invoke
      1. org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      2. org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      2 frames
    32. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      3. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      4 frames
    33. Unknown
      $Proxy32.start
      1. $Proxy32.start(Unknown Source)
      1 frame
    34. JBoss Application Server System JMX
      MainDeployer.deploy
      1. org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      2. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      3. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      3 frames
    35. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    36. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    37. JBoss Application Server J2SE
      Invocation.dispatch
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      1 frame
    38. org.jboss.mx
      AbstractInterceptor.invoke
      1. org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      1 frame
    39. JBoss Application Server J2SE
      Invocation.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      1 frame
    40. org.jboss.mx
      ModelMBeanOperationInterceptor.invoke
      1. org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      1 frame
    41. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      3. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      4 frames
    42. Unknown
      $Proxy8.deploy
      1. $Proxy8.deploy(Unknown Source)
      1 frame
    43. org.jboss.deployment
      AbstractDeploymentScanner.startService
      1. org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      2. org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      3. org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      4. org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
      4 frames
    44. JBoss Application Server System
      ServiceMBeanSupport.jbossInternalLifecycle
      1. org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      2. org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      2 frames
    45. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    46. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    47. JBoss Application Server J2SE
      MBeanServerImpl.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4 frames
    48. JBoss Application Server System
      ServiceController$ServiceProxy.invoke
      1. org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      1 frame
    49. Unknown
      $Proxy0.start
      1. $Proxy0.start(Unknown Source)
      1 frame
    50. JBoss Application Server System
      ServiceController.start
      1. org.jboss.system.ServiceController.start(ServiceController.java:417)
      1 frame
    51. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    52. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    53. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2. org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      3. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      4. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      5. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      5 frames
    54. Unknown
      $Proxy4.start
      1. $Proxy4.start(Unknown Source)
      1 frame
    55. JBoss Application Server System JMX
      MainDeployer.deploy
      1. org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      2. org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      3. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      4. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      5. org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
      5 frames
    56. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    57. org.jboss.mx
      ReflectedDispatcher.invoke
      1. org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      1 frame
    58. JBoss Application Server J2SE
      Invocation.dispatch
      1. org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      1 frame
    59. org.jboss.mx
      AbstractInterceptor.invoke
      1. org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      1 frame
    60. JBoss Application Server J2SE
      Invocation.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      1 frame
    61. org.jboss.mx
      ModelMBeanOperationInterceptor.invoke
      1. org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      1 frame
    62. JBoss Application Server J2SE
      MBeanProxyExt.invoke
      1. org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2. org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      3. org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      4. org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      4 frames
    63. Unknown
      $Proxy5.deploy
      1. $Proxy5.deploy(Unknown Source)
      1 frame
    64. JBoss Application Server System JMX
      ServerImpl.start
      1. org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
      2. org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
      2 frames
    65. JBoss Application Server Server
      Main$1.run
      1. org.jboss.Main.boot(Main.java:200)
      2. org.jboss.Main$1.run(Main.java:464)
      2 frames
    66. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame