You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
applicationContext.xml defines the following H2 datasource URL :
jdbc:h2:${catalina.base}/webapps/connector-manager/WEB-INF/connector_manager.dbs
tore/connector-manager
This is not ideal since it causes problems when the webapp is run within
Eclipse: WARs run from Eclipse are deployed in a shallow Tomcat directory
structure under a "wtpwebapps" folder (as opposite to "webapps"). This causes
the H2 database to be written in a completely separate location from the
deployed app.
It also has other drawbacks such as:
- Tying the app. to Tomcat via ${catalina.base}: Although I understand this is
the only supported container, loosening dependencies never hurts.
- It assumes it's deployed under a /connector-manager path which might not be
the case.
Suggestion is to add a org.springframework.web.util.WebAppRootListener
<listener> just before the com.google.enterprise.connector.servlet.StartUp one,
then use the following URL:
jdbc:h2:${webapp.root}/WEB-INF/connector_manager.dbstore/connector-manager...
to have it relative to the WAR location.
Original issue reported on code.google.com by nicolas@guillaumin.me on 28 Dec 2012 at 5:17