Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2033

Specifying filter name in web.xml not starting with "cayenne-" ends up with an obscure error HTTP Status 500 - DataRowStore name can't be null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.1
    • None
    • Core Library, Documentation
    • 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-".

      Attachments

        Activity

          People

            Unassigned Unassigned
            misdoro Misha Doronin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified