Deploying Onebusaway Combined Webapp from source, getting exception (Error creating bean with name 'agencyMetadataDaoImpl)

43 views
Skip to first unread message

Ali Shan

unread,
Dec 12, 2016, 9:37:42 AM12/12/16
to onebusaway-developers
Hello,

I am trying to deploy Onebusaway Combined Webapp from source, - I am getting exception (Error creating bean with name 'agencyMetadataDaoImpl), below is the exception code snippet,

2016-12-12 18:42:36,280 ERROR [ContextLoader.java:220] : Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agencyMetadataDaoImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.onebusaway.agency_metadata.service.AgencyMetadataDaoImpl.setSessionFactory(org.hibernate.SessionFactory); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.SessionFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.onebusaway.agency_metadata.service.AgencyMetadataDaoImpl.setSessionFactory(org.hibernate.SessionFactory); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.SessionFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:589)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:282)
    ... 26 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.SessionFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:920)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:789)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:547)
    ... 28 more
Dec 12, 2016 6:42:36 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Dec 12, 2016 6:42:36 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
Dec 12, 2016 6:42:36 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [org.hsqldb.jdbc.JDBCDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Dec 12, 2016 6:42:36 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.onebusaway.cacheManager] but has failed to stop it. This is very likely to create a memory leak.
Dec 12, 2016 6:42:36 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [HSQLDB Timer @692b097a] but has failed to stop it. This is very likely to create a memory leak.
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /home/alishan/dosafar/tomcat/webapps/ROOT.war has finished in 9,508 ms
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/alishan/dosafar/tomcat/webapps/examples
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/alishan/dosafar/tomcat/webapps/examples has finished in 225 ms
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/alishan/dosafar/tomcat/webapps/host-manager
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/alishan/dosafar/tomcat/webapps/host-manager has finished in 99 ms
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/alishan/dosafar/tomcat/webapps/manager
Dec 12, 2016 6:42:36 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug loggi

Sheldon A. Brown

unread,
Dec 12, 2016, 10:16:26 AM12/12/16
to onebusaway...@googlegroups.com
Where did you checkout your code from? 'agencyMetadataDaoImpl' has
not been formally merged back into the OneBusAway repo yet. To use it
will require more configuration in the data-sources.xml.


Sheldon
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to onebusaway-devel...@googlegroups.com.
> To post to this group, send email to onebusaway...@googlegroups.com.
> Visit this group at https://groups.google.com/group/onebusaway-developers.
> For more options, visit https://groups.google.com/d/optout.

Ali Shan

unread,
Dec 12, 2016, 11:43:00 PM12/12/16
to onebusaway-developers
Hello Sheldon,

Thanks for your reply, I got the repo from git,

I followed, (https://github.com/OneBusAway/onebusaway/wiki/Importing-source-code-into-Eclipse), And i select version 13 ST tag from repo.

Do i need to select any other specific version? where this issue will not be?

Thanks,

Sheldon A. Brown

unread,
Dec 13, 2016, 6:30:05 AM12/13/16
to onebusaway...@googlegroups.com
Yes, that tag was for a deployment and will not be what you want.
Pull the latest version from master, 1.1.16-SNAPSHOT and let us know
if that helps...

Sheldon
>> > email to onebusaway-devel...@googlegroups.com.
>> > To post to this group, send email to onebusaway...@googlegroups.com.
>> > Visit this group at
>> > https://groups.google.com/group/onebusaway-developers.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to onebusaway-devel...@googlegroups.com.

Ali Shan

unread,
Dec 13, 2016, 6:43:54 AM12/13/16
to onebusaway-developers
Thank you sheldon, I will try and let you know. 
>> > To post to this group, send email to onebusaway...@googlegroups.com.
>> > Visit this group at
>> > https://groups.google.com/group/onebusaway-developers.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Ali Shan

unread,
Dec 13, 2016, 11:47:03 AM12/13/16
to onebusaway-developers
Dear Sheldon,

When i am going to checkout the repo i have only till 1.1.15, See  the below screenshot.
from where i can get 1.1.16-SNAPSHOT?

Auto Generated Inline Image 1

Sean Barbeau

unread,
Dec 13, 2016, 4:35:19 PM12/13/16
to onebusaway-developers
Ali,
1.1.16-SNAPSHOT is the master branch (SNAPSHOT is the designation of the code before it goes into a release for that version, e.g. 1.1.16).  If you look at the code you can find the version in the pom.xml file, for example at:

Sean

Sheldon A. Brown

unread,
Dec 14, 2016, 5:17:43 AM12/14/16
to onebusaway...@googlegroups.com
Right!  

Ali -- you should be using the default branch in eclipse, which should be called "master".  1.1.16-SNAPSHOT was probably too much information for you :)

Sheldon

Sean
>> > To post to this group, send email to onebusaway...@googlegroups.com.
>> > Visit this group at
>> > https://groups.google.com/group/onebusaway-developers.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> To post to this group, send email to onebusaway...@googlegroups.com.
> Visit this group at https://groups.google.com/group/onebusaway-developers.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onebusaway-developers+unsub...@googlegroups.com.
To post to this group, send email to onebusaway-developers@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages