I've been experimenting with this for a while, and still can't get it
working, so I was hoping to get some help. I tried following the guide
on adding JPA to my guice project, and have an architecture like the
one on the page. In my module I have:
protected void configure() {
bindConstant().annotatedWith(JpaUnit.class).to("GuiceTestPU");
bind(MIInitializer.class).asEagerSingleton();
bind(DAO.class).to(DAOImpl.class).in(Scopes.SINGLETON);
...
}
My Initializer is
public class MIInitializer {
@Inject MIInitializer(PersistenceService service) {
service.start();
}
And I have a class called DAOImpl, where I have a line:
@Inject Provider<EntityManager> em;
Now when I try to run this, I get
com.google.inject.CreationException: Guice creation errors:
1) No implementation for com.wideplay.warp.persist.PersistenceService
was bound.
while locating com.wideplay.warp.persist.PersistenceService
for parameter 0 at
hu.misoftware.guice.modules.MIInitializer.<init>(MIInitializer.java:
17)
at hu.misoftware.guice.modules.MIModule.configure(MIModule.java:28)
2) No implementation for javax.persistence.EntityManager was bound.
while locating
com.google.inject.Provider<javax.persistence.EntityManager>
for field at hu.misoftware.persistence.DAOImpl.em(DAOImpl.java:34)
at hu.misoftware.guice.modules.MIModule.configure(MIModule.java:31)
I think I have all the jars in my classpath, and the persistence.xml
is OK.
What am I doing wrong?
Any help would be appreciated.
Kristof
Hey,
I've been experimenting with this for a while, and still can't get it
working, so I was hoping to get some help. I tried following the guide
on adding JPA to my guice project, and have an architecture like the
one on the page. In my module I have:
protected void configure() {
--
You received this message because you are subscribed to the Google Groups "warp-core" group.
To post to this group, send email to warp...@googlegroups.com.
To unsubscribe from this group, send email to warp-core+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/warp-core?hl=en.
On Mar 4, 4:29 am, "Dhanji R. Prasanna" <dha...@gmail.com> wrote:
> > warp-core+...@googlegroups.com<warp-core%2Bunsu...@googlegroups.com>