[ https://issues.apache.org/jira/browse/ISIS-1852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andi Huber updated ISIS-1852: ----------------------------- Fix Version/s: 2.0.0-M1 1.16.1 > Iterating over query result list with parallelStream produces next exception > ---------------------------------------------------------------------------- > > Key: ISIS-1852 > URL: https://issues.apache.org/jira/browse/ISIS-1852 > Project: Isis > Issue Type: Bug > Components: Core > Affects Versions: 1.15.1 > Reporter: Vladimir Nisevic > Priority: Major > Fix For: 1.16.1, 2.0.0-M1 > > > Given the the result from database, e.g. > {code:java} > final List<MobileDevice> devices = > repositoryService.allInstances(MobileDevice.class);{code} > When I iterate over list with parallelStream > {code:java} > filteredDevices.parallelStream().forEach(mobileDevice -> { > // my stuff here > });{code} > Then I get this exception > {code:java} > ... 134 more > Caused by: java.lang.IllegalStateException: No service of type class > org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault is > available on this > at > org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:217) > at > org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault_$$_jvstad5_7.postLoad(MetricsServiceDefault_$$_jvstad5_7.java) > at > org.datanucleus.api.jdo.JDOCallbackHandler.postLoad(JDOCallbackHandler.java:305) > at org.datanucleus.state.StateManagerImpl.postLoad(StateManagerImpl.java:4443) > at > org.datanucleus.state.StateManagerImpl.initialiseForCachedPC(StateManagerImpl.java:645) > at > org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForCachedPC(JDOStateManagerForIsis.java:112) > at > org.datanucleus.state.ObjectProviderFactoryImpl.newForCachedPC(ObjectProviderFactoryImpl.java:280) > at > org.datanucleus.ExecutionContextImpl.getObjectFromLevel2Cache(ExecutionContextImpl.java:5210) > at > org.datanucleus.ExecutionContextImpl.getObjectFromCache(ExecutionContextImpl.java:5101) > at > org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3048) > at > org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForDatastoreId(PersistentClassROF.java:460) > at > org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:385) > at > org.datanucleus.store.rdbms.scostore.CollectionStoreIterator.<init>(CollectionStoreIterator.java:100) > at > org.datanucleus.store.rdbms.scostore.FKSetStore.iterator(FKSetStore.java:1080) > at > org.datanucleus.store.types.wrappers.backed.Collection.loadFromStore(Collection.java:374) > at > org.datanucleus.store.types.java8.wrappers.backed.Collection.stream(Collection.java:70) > at > a1.guidedselling.offer.hardware.MobileDevice.referenceNextDevicePriceForTarifWithoutService(MobileDevice.java:195) > at > a1.guidedselling.templates.OfferTemplatesRepository.lambda$offerTemplatesFor$1(OfferTemplatesRepository.java:102) > at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) > at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) > at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) > at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) > at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) > at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) > at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) > at > java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157){code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)