Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.1
-
None
-
None
Description
In version prior to 3.1 it was possible to specify an arbitrary filter-name in web.xml and 3.0 documentation uses <filter-name>CayenneFilter</filter-name> as an example.
When upgrading to Cayenne 3.1, if a user keeps the naming in web.xml and renames instead cayenne-project.xml into CayenneFilter.xml he will get an obscure error "HTTP Status 500 - DataRowStore name can't be null".
(Stack trace:
java.lang.IllegalArgumentException: DataRowStore name can't be null.
org.apache.cayenne.access.DataRowStore.<init>(DataRowStore.java:101)
org.apache.cayenne.access.DataDomain.nonNullSharedSnapshotCache(DataDomain.java:367)
org.apache.cayenne.access.DataDomain.getSharedSnapshotCache(DataDomain.java:355)
org.apache.cayenne.configuration.server.DataContextFactory.createdFromDataDomain(DataContextFactory.java:108)
org.apache.cayenne.configuration.server.DataContextFactory.createContext(DataContextFactory.java:56)
org.apache.cayenne.configuration.web.SessionContextRequestHandler.requestStart(SessionContextRequestHandler.java:70)
org.apache.cayenne.configuration.web.CayenneFilter.doFilter(CayenneFilter.java:105)
)
It should be specified in the 3.0 to 3.1 upgrade guide, as well as in the 3.1 documentation, that the name of the filter in web.xml must start with "cayenne-".