0 Replies Latest reply on Feb 6, 2007 11:59 AM by Bram Biesbrouck

    createNativeQuery fails on me

    Bram Biesbrouck Newbie

      Hi all,

      For some tricky reason, I've one createNativeQuery() in my code.
      When it get's executed, and it throws an error (because of duplicate entries), I get these error-messages and my application crashes:

      17:45:43,035 INFO [STDOUT] Hibernate: INSERT INTO spaceEntity(space, entity, entityType) VALUES(?, ?, ?)
      17:45:43,041 WARN [JDBCExceptionReporter] SQL Error: 1062, SQLState: 23000
      17:45:43,041 ERROR [JDBCExceptionReporter] Duplicate entry '13-143' for key 1
      17:45:50,783 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      17:45:50,783 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=beligum/154, BranchQual=, localId=154]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=beligum/154, BranchQual=, localId=154])
      17:45:50,794 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      17:45:50,794 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=beligum/154, BranchQual=, localId=154]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=beligum/154, BranchQual=, localId=154])
      17:45:50,799 INFO [Exceptions] no exceptions.xml file found
      17:45:50,827 ERROR [Exceptions] redirecting to debug page
      javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: could not get property value: spaceManager.availableEntitiesForSelection
      
      ...
      
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=beligum/154, BranchQual=, localId=154]
      


      For some reason, I think I'm doing something wrong with my transaction-setup.
      Note: The EntityManager get's injected, and I'm using Seam 1.1.5

      It would be awesome if someone could lend me a hand.