Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-513

JPA connector reports error when inserting default (and blank) namespace URI into Oracle database

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 0.6
    • 0.6
    • Storage
    • None

      The user meetoblivion reported on the forums [1] that he was getting an error when he called
      session.getRootNode().addNode("somepage")
      and
      session.getRootNode().addNode("somepage","nt:unstructured");

      The full stack trace is listed on the forum thread, but the relevant part is here:
      2009-09-08 10:45:10,059 WARN [org.hibernate.util.JDBCExceptionReporter] (pool-159-thread-2) SQL Error: 1400, SQLState: 23000
      2009-09-08 10:45:10,108 ERROR [org.hibernate.util.JDBCExceptionReporter] (pool-159-thread-2) ORA-01400: cannot insert NULL into ("JCRPUBLIC"."DNA_NAMESPACES"."URI")
      2009-09-08 10:45:10,108 WARN [org.hibernate.util.JDBCExceptionReporter] (pool-159-thread-2) SQL Error: 1400, SQLState: 23000
      2009-09-08 10:45:10,108 ERROR [org.hibernate.util.JDBCExceptionReporter] (pool-159-thread-2) ORA-01400: cannot insert NULL into ("JCRPUBLIC"."DNA_NAMESPACES"."URI")

      Oracle doesn't like empty VARCHAR values, and attempts instead to insert a NULL value rather than the empty VARCHAR value. This is currently a problem, because the DNA_NAMESPACES.URI column is not nullable.

      [1] http://www.jboss.org/index.html?module=bb&op=viewtopic&t=160723

              rhauch Randall Hauch (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: