Hi,
When running integration tests I get the following stacktrace:
Caused by: java.lang.IllegalStateException: No service found for thread; make
sure ((RequestScopedService)service).__isis_startRequest() is called first
at
org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:117)
at
org.apache.isis.applib.annotation.Bulk$InteractionContext_$$_jvst36f_0.hashCode(Bulk$InteractionContext_$$_jvst36f_0.java)
at
org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.add(PojoAdapterHashMap.java:121)
at
org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.mapAndInjectServices(AdapterManagerDefault.java:717)
at
org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:174)
at
org.apache.isis.core.runtime.system.persistence.PersistenceSession.createServiceAdapters(PersistenceSession.java:221)
at
org.apache.isis.core.runtime.system.persistence.PersistenceSession.initServices(PersistenceSession.java:209)
at
org.apache.isis.core.runtime.system.persistence.PersistenceSession.open(PersistenceSession.java:199)
at
org.apache.isis.core.runtime.system.session.IsisSessionDefault.open(IsisSessionDefault.java:110)
at
org.apache.isis.core.runtime.system.context.IsisContextStatic.openSessionInstance(IsisContextStatic.java:71)
at
org.apache.isis.core.runtime.system.context.IsisContext.openSession(IsisContext.java:279)
at
org.apache.isis.core.runtime.system.IsisSystemFixturesHookAbstract.initializeServices(IsisSystemFixturesHookAbstract.java:177)
I'm using the todo app ToDoSystemInitializer with the following registration of
services:
// services annotated with @DomainService
withServices(new Contacts(), new Companies(),
new Permissions(), new Roles(),
new NestedSetManagerService(),
new QueryResultsCache());
withServicesIn("org.apache.isis.core.wrapper"
,"org.apache.isis.applib"
,"org.apache.isis.core.metamodel.services"
,"org.apache.isis.core.runtime.services"
,"org.apache.isis.objectstore.jdo.datanucleus.service.support" //
IsisJdoSupportImpl
,"org.apache.isis.objectstore.jdo.datanucleus.service.eventbus" //
EventBusServiceJdo
);
When I omit the withServicesIn-call my tests start but I get an other error
later on.
I used the todoapp as the basis for my tests but had to replace/remove the
dom-part with my own dom. The todoapp tests run OK.
Any idea?
Erik