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

Nicolas MARQUES updated ONAMI-118:
----------------------------------
    Description: 
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

  was:
I'm setting a multiple JTA datasource application by following the given example

{panel}bindContainerManagedPersistenceUnit(myEntityFactory)
.annotatedWith(clazz)
.useGlobalTransactionWithJndiName("java:comp/UserTransaction");
{panel}

the result is 
{panel}
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)
{panel}

If i give a persit unit name instead of factory, i'm facing the same problem on 
UserTransactionProviderByJndiLookup class


> Missing @Inject on UserTransactionFacade / UserTransactionProviderByJndiLookup
> ------------------------------------------------------------------------------
>
>                 Key: ONAMI-118
>                 URL: https://issues.apache.org/jira/browse/ONAMI-118
>             Project: Apache Onami
>          Issue Type: Question
>          Components: persist
>    Affects Versions: persist-1.0.1
>            Reporter: Nicolas MARQUES
>
> 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)

Reply via email to