Derby
  1. Derby
  2. DERBY-4671

Embedded driver does not work with jbossCache

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.5.3.1, 10.6.1.0
    • Fix Version/s: 10.5.3.1, 10.6.2.1, 10.7.1.1
    • Component/s: SQL
    • Labels:
      None
    • Environment:
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Regression

      Description

      When trying to use jbossCache (version 3.2.5) and an embedded derby driver the following exception is thrown when jbossCache tries to persist information to the database

      48610 [AsyncCacheLoader-0] ERROR org.jboss.cache.loader.JDBCCacheLoader [] - Failed to insert node :Java exception: ': java.lang.NullPointerException'.
      48610 [AsyncCacheLoader-0] WARN org.jboss.cache.loader.AsyncCacheLoader [] - Failed to process async modifications: java.lang.IllegalStateException: Failed to insert node: Java e
      xception: ': java.lang.NullPointerException'.
      48610 [AsyncCacheLoader-0] DEBUG org.jboss.cache.loader.AsyncCacheLoader [] - Exception:
      java.lang.IllegalStateException: Failed to insert node: Java exception: ': java.lang.NullPointerException'.
      at org.jboss.cache.loader.AdjListJDBCCacheLoader.insertNode(AdjListJDBCCacheLoader.java:562)
      at org.jboss.cache.loader.JDBCCacheLoader.addNewSubtree(JDBCCacheLoader.java:367)
      at org.jboss.cache.loader.JDBCCacheLoader.put(JDBCCacheLoader.java:110)
      at org.jboss.cache.loader.AbstractCacheLoader.put(AbstractCacheLoader.java:303)
      at org.jboss.cache.loader.AbstractDelegatingCacheLoader.put(AbstractDelegatingCacheLoader.java:110)
      at org.jboss.cache.loader.AsyncCacheLoader.access$601(AsyncCacheLoader.java:105)
      at org.jboss.cache.loader.AsyncCacheLoader$AsyncProcessor.put(AsyncCacheLoader.java:417)
      at org.jboss.cache.loader.AsyncCacheLoader$AsyncProcessor.run0(AsyncCacheLoader.java:409)
      at org.jboss.cache.loader.AsyncCacheLoader$AsyncProcessor.run(AsyncCacheLoader.java:371)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
      at org.apache.derby.impl.jdbc.Util.javaException(Util.java:299)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2269)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:148)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(EmbedPreparedStatement20.java:82)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(EmbedPreparedStatement30.java:63)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(EmbedPreparedStatement40.java:40)
      at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Driver40.java:105)
      at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1607)
      at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1435)
      at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213)
      at org.jboss.cache.loader.AdjListJDBCCacheLoader.prepareAndLogStatement(AdjListJDBCCacheLoader.java:90)
      at org.jboss.cache.loader.AdjListJDBCCacheLoader.insertNode(AdjListJDBCCacheLoader.java:545)
      ... 14 more
      Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
      ... 30 more
      Caused by: java.lang.NullPointerException
      at org.apache.derby.impl.sql.compile.CharTypeCompiler.convertible(CharTypeCompiler.java:54)
      at org.apache.derby.impl.sql.compile.CharTypeCompiler.storable(CharTypeCompiler.java:100)
      at org.apache.derby.impl.sql.compile.ResultColumn.checkStorableExpression(ResultColumn.java:887)
      at org.apache.derby.impl.sql.compile.ResultColumn.checkStorableExpression(ResultColumn.java:879)
      at org.apache.derby.impl.sql.compile.ResultColumnList.checkStorableExpressions(ResultColumnList.java:953)
      at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(InsertNode.java:456)
      at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:324)
      at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:90)
      at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:828)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:130)
      ... 23 more

      It works fine using ClientDriver.

      Sample code and configuration files are attached.

      1. derby-4671-1a.diff
        5 kB
        Knut Anders Hatlen
      2. repro.sql
        0.2 kB
        Knut Anders Hatlen
      3. CacheIssue-eclipseProject.zip
        7.40 MB
        Ray O'Hagan
      4. cache-config.xml
        1 kB
        Ray O'Hagan
      5. CacheIssue.java
        0.9 kB
        Ray O'Hagan

        Issue Links

          Activity

          Ray O'Hagan created issue -
          Ray O'Hagan made changes -
          Field Original Value New Value
          Attachment CacheIssue.java [ 12445105 ]
          Ray O'Hagan made changes -
          Attachment cache-config.xml [ 12445106 ]
          Ray O'Hagan made changes -
          Attachment CacheIssue-eclipseProject.zip [ 12445107 ]
          Knut Anders Hatlen made changes -
          Attachment repro.sql [ 12445143 ]
          Knut Anders Hatlen made changes -
          Bug behavior facts [Crash] [Regression]
          Issue & fix info [Newcomer] [Repro attached]
          Component/s SQL [ 11408 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Affects Version/s 10.5.3.1 [ 12314182 ]
          Knut Anders Hatlen made changes -
          Link This issue relates to DERBY-4420 [ DERBY-4420 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Attachment derby-4671-1a.diff [ 12445168 ]
          Knut Anders Hatlen made changes -
          Link This issue is blocked by DERBY-4672 [ DERBY-4672 ]
          Knut Anders Hatlen made changes -
          Issue & fix info [Repro attached] [Patch Available, Repro attached]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.7.0.0 [ 12314971 ]
          Issue & fix info [Patch Available, Repro attached] [Repro attached]
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 10.5.3.1 [ 12314182 ]
          Fix Version/s 10.6.1.1 [ 12314973 ]
          Resolution Fixed [ 1 ]
          Knut Anders Hatlen made changes -
          Link This issue is related to DERBY-4672 [ DERBY-4672 ]
          Knut Anders Hatlen made changes -
          Link This issue is duplicated by DERBY-4683 [ DERBY-4683 ]
          Knut Anders Hatlen made changes -
          Link This issue is blocked by DERBY-4672 [ DERBY-4672 ]
          Knut Anders Hatlen made changes -
          Link This issue is duplicated by DERBY-4749 [ DERBY-4749 ]
          Knut Anders Hatlen made changes -
          Link This issue is duplicated by DERBY-4780 [ DERBY-4780 ]
          Kathey Marsden made changes -
          Fix Version/s 10.6.2.0 [ 12315342 ]
          Fix Version/s 10.6.1.1 [ 12314973 ]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.6.2.1 [ 12315343 ]
          Fix Version/s 10.6.2.0 [ 12315342 ]
          Rick Hillegas made changes -
          Fix Version/s 10.7.1.1 [ 12315564 ]
          Fix Version/s 10.7.1.0 [ 12314971 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12511434 ] Default workflow, editable Closed status [ 12799129 ]

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Ray O'Hagan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development