[
https://issues.apache.org/jira/browse/ONAMI-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945071#comment-14945071
]
Stephan Classen commented on ONAMI-118:
---------------------------------------
Thank you
I added the missing annotation.
As ONAMI is currently undergoing some changes I am not sure when I am able to
release a new version.
Feel free to checkout the source and build a snapshot version for testing.
> 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
> 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)