OK, well, from I've figured out the issue for your original problem (and it is a defect in Isis...)
... specifically *if logging is set to DEBUG*, then there's a call to pojo.hashCode() on the request-scoped service (Bulk.InteractionContext), and that's what's tripping up. I'll fix that for 1.7.0. Not sure about your JDBC issue though, let me stare at it for a while. Dan On 8 October 2014 14:49, Erik de Hair <[email protected]> wrote: > It's against 1.6.0. > > I tried to get you an example that produces the same error by stripping > all 'company code' from my code but this gives me some other errors... I > believe I can't give you the right example :-( > > ________________________________________ > From: Dan Haywood [[email protected]] > Sent: Wednesday, October 08, 2014 2:22 PM > To: users > Subject: Re: integration tests fail: problem with registration of services > > is this against 1.7.0-snapshot or 1.6.0? > > and (even better) can you provide an example demonstrating the issue on > github? > > On 8 October 2014 13:17, Erik de Hair <[email protected]> wrote: > > > 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 > > >
