java.lang.reflect.UndeclaredThrowableException

Spring JIRA | Stephen Duncan Jr | 1 decade ago
  1. 0

    Despite setting lookup OnStartup to false and providing a proxyInterface, the LocalSessionFactoryBean still attempts to retrieve the dataSource on startup. This is because it attempts to grab a connection while it starts up. Here's the configuration: <property name="dataSource"> <bean class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="jdbc/CIEPortalApps" /> <property name="resourceRef" value="true" /> <property name="lookupOnStartup" value="false" /> <property name="proxyInterface" value="javax.sql.DataSource" /> </bean> </property> Here's the stack trace showing that it attempts to initalize it, but can't since the JNDI name doesn't exist yet: 2006-03-03 14:10:32,460 WARN (org.apache.naming.NamingContext:801) - Unexpected exception resolving reference org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceImpl' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/service.xml]: Can't resolve reference to bean 'databaseService' while setting property 'databaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.hibernate.HibernateTransactionManager#1d98a' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Can't resolve reference to bean 'hibernateSessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.hibernate.HibernateTransactionManager#1d98a' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Can't resolve reference to bean 'hibernateSessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null java.lang.reflect.UndeclaredThrowableException at $Proxy0.getConnection(Unknown Source) at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:76) at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73) at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789) at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:543) at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:96) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320) at mil.jfcom.cie.portal.AbstractSpringObjectFactory.getObject(AbstractSpringObjectFactory.java:76) at mil.jfcom.cie.portal.AbstractSpringObjectFactory.getObjectInstance(AbstractSpringObjectFactory.java:59) at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:129) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:791) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2306) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) Caused by: javax.naming.NameNotFoundException: Name comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:768) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:86) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:104) at org.springframework.jndi.JndiObjectTargetSource.getTarget(JndiObjectTargetSource.java:121) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:150) ... 51 more 2006-03-03 14:10:32,464 ERROR (org.apache.catalina.mbeans.GlobalResourcesLifecycleListener:127) - Exception processing Global JNDI Resources javax.naming.NamingException: Error creating bean with name 'serviceImpl' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/service.xml]: Can't resolve reference to bean 'databaseService' while setting property 'databaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.hibernate.HibernateTransactionManager#1d98a' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Can't resolve reference to bean 'hibernateSessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null at org.apache.naming.NamingContext.lookup(NamingContext.java:803) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2306) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

    Spring JIRA | 1 decade ago | Stephen Duncan Jr
    java.lang.reflect.UndeclaredThrowableException
  2. 0

    Despite setting lookup OnStartup to false and providing a proxyInterface, the LocalSessionFactoryBean still attempts to retrieve the dataSource on startup. This is because it attempts to grab a connection while it starts up. Here's the configuration: <property name="dataSource"> <bean class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="jdbc/CIEPortalApps" /> <property name="resourceRef" value="true" /> <property name="lookupOnStartup" value="false" /> <property name="proxyInterface" value="javax.sql.DataSource" /> </bean> </property> Here's the stack trace showing that it attempts to initalize it, but can't since the JNDI name doesn't exist yet: 2006-03-03 14:10:32,460 WARN (org.apache.naming.NamingContext:801) - Unexpected exception resolving reference org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceImpl' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/service.xml]: Can't resolve reference to bean 'databaseService' while setting property 'databaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.hibernate.HibernateTransactionManager#1d98a' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Can't resolve reference to bean 'hibernateSessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.hibernate.HibernateTransactionManager#1d98a' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Can't resolve reference to bean 'hibernateSessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null java.lang.reflect.UndeclaredThrowableException at $Proxy0.getConnection(Unknown Source) at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:76) at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73) at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789) at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:543) at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:96) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320) at mil.jfcom.cie.portal.AbstractSpringObjectFactory.getObject(AbstractSpringObjectFactory.java:76) at mil.jfcom.cie.portal.AbstractSpringObjectFactory.getObjectInstance(AbstractSpringObjectFactory.java:59) at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:129) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:791) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2306) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) Caused by: javax.naming.NameNotFoundException: Name comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:768) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:86) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:104) at org.springframework.jndi.JndiObjectTargetSource.getTarget(JndiObjectTargetSource.java:121) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:150) ... 51 more 2006-03-03 14:10:32,464 ERROR (org.apache.catalina.mbeans.GlobalResourcesLifecycleListener:127) - Exception processing Global JNDI Resources javax.naming.NamingException: Error creating bean with name 'serviceImpl' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/service.xml]: Can't resolve reference to bean 'databaseService' while setting property 'databaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.hibernate.HibernateTransactionManager#1d98a' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Can't resolve reference to bean 'hibernateSessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [mil/jfcom/cie/directorymanagement/conf/spring/hibernate.xml]: Initialization of bean failed; nested exception is java.lang.reflect.UndeclaredThrowableException: null at org.apache.naming.NamingContext.lookup(NamingContext.java:803) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2306) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

    Spring JIRA | 1 decade ago | Stephen Duncan Jr
    java.lang.reflect.UndeclaredThrowableException
  3. 0

    Should I enabled allowLinking on my Tomcat?

    Stack Overflow | 4 years ago | Eric Banderhide
    javax.naming.NameNotFoundException: Name comp is not bound in this Context
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Timer causing issues on Tomcat server

    Stack Overflow | 4 years ago | RegDHunter
    javax.naming.NameNotFoundException: Name comp is not bound in this Context
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. javax.naming.NameNotFoundException

    Name comp is not bound in this Context

    at org.apache.naming.NamingContext.lookup()
  2. Web Container Naming Utilities
    SelectorContext.lookup
    1. org.apache.naming.NamingContext.lookup(NamingContext.java:768)
    2. org.apache.naming.NamingContext.lookup(NamingContext.java:151)
    3. org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
    3 frames
  3. Java RT
    InitialContext.lookup
    1. javax.naming.InitialContext.lookup(InitialContext.java:351)
    1 frame
  4. Spring Context
    JndiObjectTargetSource.getTarget
    1. org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)
    2. org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
    3. org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
    4. org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146)
    5. org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:86)
    6. org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:104)
    7. org.springframework.jndi.JndiObjectTargetSource.getTarget(JndiObjectTargetSource.java:121)
    7 frames
  5. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:150)
    1 frame
  6. Unknown
    $Proxy0.getConnection
    1. $Proxy0.getConnection(Unknown Source)
    1 frame
  7. Hibernate
    LocalDataSourceConnectionProvider.getConnection
    1. org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:76)
    1 frame
  8. net.sf.hibernate
    Configuration.buildSessionFactory
    1. net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
    2. net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
    3. net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789)
    3 frames
  9. Hibernate
    LocalSessionFactoryBean.afterPropertiesSet
    1. org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:543)
    2. org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:477)
    2 frames
  10. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
    3. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
    4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
    5. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
    6. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013)
    8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824)
    9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)
    10. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:147)
    11. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:96)
    12. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013)
    13. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824)
    14. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)
    15. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
    16. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
    17. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
    18. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
    19. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013)
    20. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824)
    21. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)
    22. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
    23. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
    24. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
    24 frames
  11. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
    1 frame
  12. mil.jfcom.cie
    AbstractSpringObjectFactory.getObjectInstance
    1. mil.jfcom.cie.portal.AbstractSpringObjectFactory.getObject(AbstractSpringObjectFactory.java:76)
    2. mil.jfcom.cie.portal.AbstractSpringObjectFactory.getObjectInstance(AbstractSpringObjectFactory.java:59)
    2 frames
  13. Web Container Naming Utilities
    ResourceFactory.getObjectInstance
    1. org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:129)
    1 frame
  14. Java RT
    NamingManager.getObjectInstance
    1. javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
    1 frame
  15. Web Container Naming Utilities
    NamingContext.lookup
    1. org.apache.naming.NamingContext.lookup(NamingContext.java:791)
    2. org.apache.naming.NamingContext.lookup(NamingContext.java:151)
    2 frames
  16. Embedded GlassFish Web
    GlobalResourcesLifecycleListener.lifecycleEvent
    1. org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155)
    2. org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160)
    3. org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125)
    4. org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97)
    4 frames
  17. Glassfish Core
    Catalina.start
    1. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    2. org.apache.catalina.core.StandardServer.start(StandardServer.java:2306)
    3. org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    3 frames
  18. 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
  19. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    2 frames