Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10206

NullPointerException when using a database for session persistence on the root web context with an Oracle DB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.2
    • Fix Version/s: EAP_EWP 5.3.0.ER1
    • Component/s: Web
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Configure database session persistence as describe in https://community.jboss.org/wiki/HAWebSessionsViaDatabasePersistence persisting to an Oracle DB with a web application using the root context .

      Make a request to the application that causes it to create and persist a session.

      Show
      Configure database session persistence as describe in https://community.jboss.org/wiki/HAWebSessionsViaDatabasePersistence persisting to an Oracle DB with a web application using the root context . Make a request to the application that causes it to create and persist a session.
    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      In previous versions of JBoss EAP 5 a NullPointerException was encountered when storing web sessions from the root context in an Oracle database. This was because of a bug in the Oracle database that treats empty strings as NULL. A new subsituteRootContext property has been added to the persistence manager which stores <literal>/</literal> for the root context instead of an empty string. As a result of this update, database persistence for the root context in an Oracle database works as expected.
      Show
      In previous versions of JBoss EAP 5 a NullPointerException was encountered when storing web sessions from the root context in an Oracle database. This was because of a bug in the Oracle database that treats empty strings as NULL. A new subsituteRootContext property has been added to the persistence manager which stores <literal>/</literal> for the root context instead of an empty string. As a result of this update, database persistence for the root context in an Oracle database works as expected.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      NEW

      Description

      A NullPointerException is thrown while persisting sessions in the root web context when using DataSourcePersistentManager with an Oracle DB.

      The root cause is an Oracle bug where an empty string is treated as a null.

      With the root web context DataSourcePersistentManager stores an empty string as the app name.
      This causes the insert to fail, as the default schema specifies NOT NULL.
      Removing the NOT NULL modifier is not sufficient, as the Oracle bug also causes a select where appName='' to never return any results.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                dereed Dennis Reed
                Reporter:
                dereed Dennis Reed
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: