[jboss-jira] [JBoss JIRA] (WFLY-1496) ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] UserTransaction is not available

Juergen Zimmermann (JIRA) jira-events at lists.jboss.org
Tue Jun 11 09:40:54 EDT 2013


Juergen Zimmermann created WFLY-1496:
----------------------------------------

             Summary: ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] UserTransaction is not available
                 Key: WFLY-1496
                 URL: https://issues.jboss.org/browse/WFLY-1496
             Project: WildFly
          Issue Type: Bug
          Components: Transactions
    Affects Versions: 8.0.0.Alpha2
            Reporter: Juergen Zimmermann
            Assignee: jaikiran pai


I just tried the WildFly Alpha 2 snapshot containing Narayana 5.0.0.M3 and get the error message below. The classes causing the error are:
@Path("/bestellungen")
@Produces({ APPLICATION_JSON, APPLICATION_XML })
//@RequestScoped is default for JAX-RS
@Transactional
public class BestellungResource {
@Inject
private BestellungService bs;
...
}

@Transactional(TxType.MANDATORY)
public class BestellungServiceImpl implements Serializable {
	private static final long serialVersionUID = ...L;
	
	@PersistenceContext
	private transient EntityManager em;

// method invoking JPA / Hibernate
}

The fragment of server.log:
15:11:43,254 DEBUG [org.hibernate.SQL] 
    /* named HQL query Bestellung.findKundeById */ select
        distinct abstractku1_.id as id2_8_,
        abstractku1_.aktualisiert as aktualis3_8_,
        abstractku1_.bemerkungen as bemerkun4_8_,
        abstractku1_.email as email5_8_,
        abstractku1_.erzeugt as erzeugt6_8_,
        abstractku1_.file_fk as file18_8_,
        abstractku1_.kategorie as kategori7_8_,
        abstractku1_.nachname as nachname8_8_,
        abstractku1_.newsletter as newslett9_8_,
        abstractku1_.password as passwor10_8_,
        abstractku1_.rabatt as rabatt11_8_,
        abstractku1_.seit as seit12_8_,
        abstractku1_.umsatz as umsatz13_8_,
        abstractku1_.version as version14_8_,
        abstractku1_.vorname as vorname15_8_,
        abstractku1_.familienstand_fk as familie16_8_,
        abstractku1_.geschlecht_fk as geschle17_8_,
        abstractku1_.art as art1_8_ 
    from
        Bestellung bestellung0_ 
    inner join
        kunde abstractku1_ 
            on bestellung0_.kunde_fk=abstractku1_.id 
    where
        bestellung0_.id=?
15:11:43,254 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] SQL Error: 0, SQLState: null
15:11:43,254 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] UserTransaction is not available within the scope of a bean or method annotated with @Transactional and a Transactional.TxType other than NOT_SUPPORTED or NEVER

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list