Context initialization failed - Cannot find class [org.onebusaway.agency_metadata.model.AgencyMetadata]

215 views
Skip to first unread message

Vel Ats

unread,
Jul 6, 2018, 3:37:46 AM7/6/18
to onebusaway-developers
I have deployed the data-federation-webapp and the api-webapp to tomcat7 in Ubuntu
All i have configured is the data-sources.xml, it looks exactly like this: https://gist.github.com/sheldonabrown/2a522665c7d996f62923c2e5b3bf4bf6#file-gistfile1-txt
The version is 1.1.18
I think that the problem is this:
Cannot find class [org.onebusaway.agency_metadata.model.AgencyMetadata]

I would appreciate any help on how to fix this

this is the output of /var/log/tomcat7/catalina.out

Enter code here.2018-07-06 08:57:05,636 ERROR [ContextLoader.java:220] : Context initialization failed
org
.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agencyMetadataSessionFactory' defined in class path resource [data-sources.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.lang.Class[]' for property 'annotatedClasses'; nested exception is java.lang.IllegalArgumentException: Cannot find class [org.onebusaway.agency_metadata.model.AgencyMetadata]

[...]

Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.lang.Class[]' for property 'annotatedClasses'; nested exception is java.lang.IllegalArgumentException: Cannot find class [org.onebusaway.agency_metadata.model.AgencyMetadata]

[...]

Caused by: java.lang.IllegalArgumentException: Cannot find class [org.onebusaway.agency_metadata.model.AgencyMetadata]

[...]

Caused by: java.lang.ClassNotFoundException: org.onebusaway.agency_metadata.model.AgencyMetadata

[...]

Jul 06, 2018 8:57:05 AM 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
Jul 06, 2018 8:57:05 AM org.apache.catalina.core.StandardContext startInternal
SEVERE
: Context [] startup failed due to previous errors
Jul 06, 2018 8:57:05 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE
: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jul 06, 2018 8:57:05 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE
: The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
Jul 06, 2018 8:57:05 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO
: Deployment of web application directory /var/lib/tomcat7/webapps/ROOT has finished in 3,682 ms
Jul 06, 2018 8:57:05 AM org.apache.coyote.AbstractProtocol start
INFO
: Starting ProtocolHandler ["http-bio-8080"]
Jul 06, 2018 8:57:05 AM org.apache.catalina.startup.Catalina start
INFO
: Server startup in 3727 ms
Jul 06, 2018 8:57:10 AM org.apache.catalina.loader.WebappClassLoaderBase findResourceInternal
INFO
: Illegal access: this web application instance has been stopped already.  Could not load .  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
..



Sheldon A. Brown

unread,
Jul 6, 2018, 6:19:22 AM7/6/18
to onebusaway...@googlegroups.com
Sorry about this -- but we seem to be going in circles here.

the gist I sent you was for 2.0.0-SNAPSHOT code aka the master branch.
If you are working with 1.1.18, perhaps you can just run the
quickstart as detailed here:

https://github.com/OneBusAway/onebusaway-application-modules/wiki/OneBusAway-Quickstart-Guide

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.

Vel Ats

unread,
Jul 6, 2018, 7:02:51 AM7/6/18
to onebusaway-developers
yes you are right. i was searching in the branches for the 2.0.0-snapshot but could not find it so i used the newest i could find there. switching to 2.0.0 solves the problem. nevertheless some other errors occoured but i will open a new thread for that.
Reply all
Reply to author
Forward
0 new messages