org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [org/kuali/rice/config/RiceSpringBeans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined

Kuali JIRA | Tim Tuxworth | 7 years ago
  1. 0

    It is possible to configure a Milestone 1 version of Rice to reference an institution specific dictionary configuration, however the referenced xxx-lu-dictionary-config.xml must be a complete copy of the deployed (in ks-lum-impl) lu-dictionary-config.xml. The spring framework apparently should support the ability to configure our specific dictionary configuration (e.g. field lengths, constraints, types and states), inheriting or overriding the supplied configuration, but following the documented configuration this does not work. This is the definition of the 'additional' bean configuration attempted, which apparently sort of works as the log shows loading from both flies: <?xml version="1.0" encoding="UTF-8"?> <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.xsd"> <bean id="luDictionaryCore" abstract="true" class="org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl"> <constructor-arg index="0" value="lu-dictionary-config.xml" /> </bean> <bean id="luDictionary" class="org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl" parent="luDictionaryCore"> <constructor-arg index="0" value="file:///home/tomcat/kuali/main/3/ubc-lu-dictionary-config.xml" /> </bean> </beans> When tomcat is started following the 'steps to reproduce', the app fails to start. Tomcat is running, but returns the following error when browsing to (server:instance)/ks-embedded-dev HTTP Status 404 - type Status report message description The requested resource () is not available. and the following shows up in catalina.out: 2009-10-29 09:40:08,694 [main] u:/d: INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [lu-dictionary-config.xml] ... 2009-10-29 09:40:11,052 [main] u:/d: INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:/home/tomcat/kuali/main/3/ubc-lu-dictionary-config.xml] ... 2009-10-29 09:40:11,385 [main] u:/d: FATAL org.kuali.rice.core.web.listener.StandaloneInitializeListener - Kuali Rice Standalone startup failed! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [org/kuali/rice/config/RiceSpringBeans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:948) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:702) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:378) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at org.kuali.rice.core.web.listener.StandaloneInitializeListener.contextInitialized(StandaloneInitializeListener.java:126) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 4724,73 74% at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined

    Kuali JIRA | 7 years ago | Tim Tuxworth
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [org/kuali/rice/config/RiceSpringBeans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined
  2. 0

    It is possible to configure a Milestone 1 version of Rice to reference an institution specific dictionary configuration, however the referenced xxx-lu-dictionary-config.xml must be a complete copy of the deployed (in ks-lum-impl) lu-dictionary-config.xml. The spring framework apparently should support the ability to configure our specific dictionary configuration (e.g. field lengths, constraints, types and states), inheriting or overriding the supplied configuration, but following the documented configuration this does not work. This is the definition of the 'additional' bean configuration attempted, which apparently sort of works as the log shows loading from both flies: <?xml version="1.0" encoding="UTF-8"?> <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.xsd"> <bean id="luDictionaryCore" abstract="true" class="org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl"> <constructor-arg index="0" value="lu-dictionary-config.xml" /> </bean> <bean id="luDictionary" class="org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl" parent="luDictionaryCore"> <constructor-arg index="0" value="file:///home/tomcat/kuali/main/3/ubc-lu-dictionary-config.xml" /> </bean> </beans> When tomcat is started following the 'steps to reproduce', the app fails to start. Tomcat is running, but returns the following error when browsing to (server:instance)/ks-embedded-dev HTTP Status 404 - type Status report message description The requested resource () is not available. and the following shows up in catalina.out: 2009-10-29 09:40:08,694 [main] u:/d: INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [lu-dictionary-config.xml] ... 2009-10-29 09:40:11,052 [main] u:/d: INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:/home/tomcat/kuali/main/3/ubc-lu-dictionary-config.xml] ... 2009-10-29 09:40:11,385 [main] u:/d: FATAL org.kuali.rice.core.web.listener.StandaloneInitializeListener - Kuali Rice Standalone startup failed! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [org/kuali/rice/config/RiceSpringBeans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:948) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:702) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:378) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at org.kuali.rice.core.web.listener.StandaloneInitializeListener.contextInitialized(StandaloneInitializeListener.java:126) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 4724,73 74% at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined

    Kuali JIRA | 7 years ago | Tim Tuxworth
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [org/kuali/rice/config/RiceSpringBeans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined
  3. 0

    I don't know whether context init/startup exceptions were intentionally not logged for security reasons I had overridden IdentityService, and one of its setter methods threw an exception during app startup. It would be helpful if KFS could have logged the exception by default somewhere along the way (see stack trace below). --------------------------------------------------------- This was the info I got in the console: 2011-07-12 11:26:58,771 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Using custom OJB.properites from: OJB.properties 2011-07-12 11:26:58,771 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Loading OJB Connection Metadata from classpath:org/kuali/rice/kim/config/OJB-repository-kim.xml 2011-07-12 11:26:58,787 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Setting OJB connection descriptor database platform to 'Oracle9i' 2011-07-12 11:26:58,818 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Loading OJB Metadata from classpath:org/kuali/rice/kim/config/OJB-repository-kim.xml 2011-07-12 11:27:00,553 [main] INFO org.kuali.rice.ksb.messaging.quartz.KSBSchedulerFactoryBean :: Shutting down Quartz Scheduler 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED shutting down. 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED paused. 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED shutdown complete. 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED paused. 2011-07-12 11:27:00,553 [main] INFO org.kuali.rice.core.database.XAPoolDataSource :: Destroying WorkflowManagedDatasource. Jul 12, 2011 11:27:00 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Jul 12, 2011 11:27:00 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/kfs-dev] startup failed due to previous errors --- removed some lines 2011-07-12 11:27:00,928 [main] INFO org.kuali.rice.core.database.XAPoolDataSource :: Destroying WorkflowManagedDatasource. 2011-07-12 11:27:00,928 [main] INFO org.objectweb.jotm :: stop JOTM 2011-07-12 11:27:00,974 [main] INFO org.kuali.kfs.sys.context.WebApplicationInitListener :: Started web application context destruction 2011-07-12 11:27:00,974 [main] ERROR org.kuali.kfs.sys.context.WebApplicationInitListener :: Unable to close down Spring Context. ----------------------------------------------------------- After adding a try-catch-log-rethrow block into SpringContext.initializeApplicationContext*(), the following was logged. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [spring-rice-configurer.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kimIdentityService' defined in class path resource [spring-kfs-rice-overrides-uc.xml]: Cannot resolve reference to bean 'peopleLdapService' while setting bean property 'ldapPersonService'; [[SNIP]] nested exception is org.springframework.ldap.BadLdapGrammarException: Failed to parse DN; nested exception is org.springframework.ldap.core.TokenMgrError: Lexical error at line 1, column 1. Encountered: "$" (36), after : "" at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at org.kuali.rice.kns.util.spring.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:44) at org.kuali.kfs.sys.context.SpringContext.initializeApplicationContext(SpringContext.java:289) at org.kuali.kfs.sys.context.SpringContext.initializeApplicationContext(SpringContext.java:233) at org.kuali.kfs.sys.context.WebApplicationInitListener.contextInitialized(WebApplicationInitListener.java:36) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: [[SNIP]]

    Kuali JIRA | 5 years ago | Warren Liang
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [spring-rice-configurer.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kimIdentityService' defined in class path resource [spring-kfs-rice-overrides-uc.xml]: Cannot resolve reference to bean 'peopleLdapService' while setting bean property 'ldapPersonService'; [[SNIP]] nested exception is org.springframework.ldap.BadLdapGrammarException: Failed to parse DN; nested exception is org.springframework.ldap.core.TokenMgrError: Lexical error at line 1, column 1. Encountered: "$" (36), after : ""
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I don't know whether context init/startup exceptions were intentionally not logged for security reasons I had overridden IdentityService, and one of its setter methods threw an exception during app startup. It would be helpful if KFS could have logged the exception by default somewhere along the way (see stack trace below). --------------------------------------------------------- This was the info I got in the console: 2011-07-12 11:26:58,771 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Using custom OJB.properites from: OJB.properties 2011-07-12 11:26:58,771 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Loading OJB Connection Metadata from classpath:org/kuali/rice/kim/config/OJB-repository-kim.xml 2011-07-12 11:26:58,787 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Setting OJB connection descriptor database platform to 'Oracle9i' 2011-07-12 11:26:58,818 [main] INFO org.kuali.rice.core.ojb.BaseOjbConfigurer :: Loading OJB Metadata from classpath:org/kuali/rice/kim/config/OJB-repository-kim.xml 2011-07-12 11:27:00,553 [main] INFO org.kuali.rice.ksb.messaging.quartz.KSBSchedulerFactoryBean :: Shutting down Quartz Scheduler 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED shutting down. 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED paused. 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED shutdown complete. 2011-07-12 11:27:00,553 [main] INFO org.quartz.core.QuartzScheduler :: Scheduler ksbScheduler_$_NON_CLUSTERED paused. 2011-07-12 11:27:00,553 [main] INFO org.kuali.rice.core.database.XAPoolDataSource :: Destroying WorkflowManagedDatasource. Jul 12, 2011 11:27:00 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Jul 12, 2011 11:27:00 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/kfs-dev] startup failed due to previous errors --- removed some lines 2011-07-12 11:27:00,928 [main] INFO org.kuali.rice.core.database.XAPoolDataSource :: Destroying WorkflowManagedDatasource. 2011-07-12 11:27:00,928 [main] INFO org.objectweb.jotm :: stop JOTM 2011-07-12 11:27:00,974 [main] INFO org.kuali.kfs.sys.context.WebApplicationInitListener :: Started web application context destruction 2011-07-12 11:27:00,974 [main] ERROR org.kuali.kfs.sys.context.WebApplicationInitListener :: Unable to close down Spring Context. ----------------------------------------------------------- After adding a try-catch-log-rethrow block into SpringContext.initializeApplicationContext*(), the following was logged. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [spring-rice-configurer.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kimIdentityService' defined in class path resource [spring-kfs-rice-overrides-uc.xml]: Cannot resolve reference to bean 'peopleLdapService' while setting bean property 'ldapPersonService'; [[SNIP]] nested exception is org.springframework.ldap.BadLdapGrammarException: Failed to parse DN; nested exception is org.springframework.ldap.core.TokenMgrError: Lexical error at line 1, column 1. Encountered: "$" (36), after : "" at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at org.kuali.rice.kns.util.spring.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:44) at org.kuali.kfs.sys.context.SpringContext.initializeApplicationContext(SpringContext.java:289) at org.kuali.kfs.sys.context.SpringContext.initializeApplicationContext(SpringContext.java:233) at org.kuali.kfs.sys.context.WebApplicationInitListener.contextInitialized(WebApplicationInitListener.java:36) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: [[SNIP]]

    Kuali JIRA | 5 years ago | Warren Liang
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rice' defined in class path resource [spring-rice-configurer.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kimIdentityService' defined in class path resource [spring-kfs-rice-overrides-uc.xml]: Cannot resolve reference to bean 'peopleLdapService' while setting bean property 'ldapPersonService'; [[SNIP]] nested exception is org.springframework.ldap.BadLdapGrammarException: Failed to parse DN; nested exception is org.springframework.ldap.core.TokenMgrError: Lexical error at line 1, column 1. Encountered: "$" (36), after : ""
  6. 0

    HQL: Cannot Left Join Fetch

    Stack Overflow | 3 years ago | flexinIT
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wuamsApplicationListener' defined in class path resource [GeneralApplicationContext.xml]: Cannot resolve reference to bean 'repository' while setting bean property 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repository' defined in class path resource [GeneralApplicationContext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [GeneralApplicationContext.xml]: Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in class path resource [GeneralApplicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: FindLMSUsername

    25 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.BeanCreationException

      Error creating bean with name 'rice' defined in class path resource [org/kuali/rice/config/RiceSpringBeans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [ks-nl-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDictionary' while setting bean property 'dictionaryServiceDelegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDictionary' defined in URL [file:/home/tomcat/kuali/main/3/ubc-lu-bean-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.student.core.dictionary.service.impl.DictionaryServiceSpringImpl]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.kuali.student.core.dictionary.dto.ConstraintDescriptor#0': Cannot resolve reference to bean 'optional' while setting bean property 'constraint' with key [0]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'optional' is defined

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean()
    2. Spring Beans
      AbstractAutowireCapableBeanFactory$1.run
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      3 frames
    3. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    4. Spring Beans
      DefaultListableBeanFactory.getBeansOfType
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      2. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      7. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
      7 frames
    5. Spring Context
      ClassPathXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:948)
      2. org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:702)
      3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:378)
      4. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      5. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
      5 frames
    6. org.kuali.rice
      StandaloneInitializeListener.contextInitialized
      1. org.kuali.rice.core.web.listener.StandaloneInitializeListener.contextInitialized(StandaloneInitializeListener.java:126)
      1 frame
    7. Glassfish Core
      LifecycleSupport.fireLifecycleEvent
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
      3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
      6. org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
      7. org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
      8. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
      9. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
      10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
      11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      11 frames