Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required key [jdbc.overnight.url] not found #1

Open
emeraldjava opened this issue Jun 16, 2015 · 2 comments
Open

Required key [jdbc.overnight.url] not found #1

emeraldjava opened this issue Jun 16, 2015 · 2 comments

Comments

@emeraldjava
Copy link

Hi,

Could you document that value this property should have in the README.md file?

Thanks,
Paul

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.sql.DataSource krasa.core.backend.config.OvernightConfig.dataSource; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'overnightDataSource' defined in class path resource [krasa/core/backend/config/OvernightMysqlConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.jolbox.bonecp.BoneCPDataSource]: Factory method 'overnightDataSource' threw exception; nested exception is java.lang.IllegalStateException: required key [jdbc.overnight.url] not found
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 21 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'overnightDataSource' defined in class path resource [krasa/core/backend/config/OvernightMysqlConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.jolbox.bonecp.BoneCPDataSource]: Factory method 'overnightDataSource' threw exception; nested exception is java.lang.IllegalStateException: required key [jdbc.overnight.url] not found
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
... 23 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.jolbox.bonecp.BoneCPDataSource]: Factory method 'overnightDataSource' threw exception; nested exception is java.lang.IllegalStateException: required key [jdbc.overnight.url] not found
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 35 more
Caused by: java.lang.IllegalStateException: required key [jdbc.overnight.url] not found
at org.springframework.core.env.AbstractPropertyResolver.getRequiredProperty(AbstractPropertyResolver.java:151)
at org.springframework.core.env.AbstractEnvironment.getRequiredProperty(AbstractEnvironment.java:536)
at krasa.core.backend.config.CommonConfig.get(CommonConfig.java:16)
at krasa.core.backend.config.OvernightMysqlConfig.overnightDataSource(OvernightMysqlConfig.java:18)
at krasa.core.backend.config.OvernightMysqlConfig$$EnhancerBySpringCGLIB$$fafb53b6.CGLIB$overnightDataSource$1()
at krasa.core.backend.config.OvernightMysqlConfig$$EnhancerBySpringCGLIB$$fafb53b6$$FastClassBySpringCGLIB$$3ff327f9.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
at krasa.core.backend.config.OvernightMysqlConfig$$EnhancerBySpringCGLIB$$fafb53b6.overnightDataSource()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)

@krasa
Copy link
Owner

krasa commented Jun 16, 2015

Hello, the application contains a lot of features specifically created for my work environment. This is one of them, so it would not work for you anyway, because you do not have the database schema.

Other features like, merging, or tokenization, or maybe even building, could be probably used by anyone, yet noone did before, so it might require some changes... Basically I had no time to do a lot of things more generic, user friendly and test them, so it contains a lot of shitty code, sorry :-)

@krasa
Copy link
Owner

krasa commented Jun 16, 2015

Oh yeah it is written while starting, you need to run StartVojtitkoDummy which does not connect to that db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants