You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@onami.apache.org by "Stephan Classen (JIRA)" <ji...@apache.org> on 2015/10/10 22:48:05 UTC

[jira] [Assigned] (ONAMI-118) Missing @Inject on UserTransactionFacade / UserTransactionProviderByJndiLookup

     [ https://issues.apache.org/jira/browse/ONAMI-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephan Classen reassigned ONAMI-118:
-------------------------------------

    Assignee: Stephan Classen

> Missing @Inject on UserTransactionFacade / UserTransactionProviderByJndiLookup
> ------------------------------------------------------------------------------
>
>                 Key: ONAMI-118
>                 URL: https://issues.apache.org/jira/browse/ONAMI-118
>             Project: Apache Onami
>          Issue Type: Bug
>          Components: persist
>    Affects Versions: persist-1.0.1
>            Reporter: Nicolas MARQUES
>            Assignee: Stephan Classen
>             Fix For: persist-1.0.2
>
>
> I'm setting a multiple JTA datasource application by following the given example
> {code}bindContainerManagedPersistenceUnit(myEntityFactory)
> .annotatedWith(clazz)
> .useGlobalTransactionWithJndiName("java:comp/UserTransaction");
> {code}
> the result is 
> {code}
> 1) Could not find a suitable constructor in org.apache.onami.persist.UserTransactionFacade. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
>   at org.apache.onami.persist.UserTransactionFacade.class(UserTransactionFacade.java:47)
>   while locating org.apache.onami.persist.UserTransactionFacade
>     for parameter 0 at org.apache.onami.persist.JtaTransactionFacadeFactory.<init>(JtaTransactionFacadeFactory.java:54)
>   at org.apache.onami.persist.PersistenceUnitModule.bindJtaTransactionFacadeFactory(PersistenceUnitModule.java:251)
> 1 error
> 	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
> 	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154)
> 	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
> 	at com.google.inject.Guice.createInjector(Guice.java:95)
> 	at com.google.inject.Guice.createInjector(Guice.java:72)
> 	at com.google.inject.Guice.createInjector(Guice.java:62)
> {code}
> If i give a persit unit name instead of factory, i'm facing the same problem on UserTransactionProviderByJndiLookup class



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)