java.lang.RuntimeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Maybe I'm to quick and SDN will only support 1.9 when its officially released, but I already gave the Neo4j 1.9.M05 a try. Everything seems to be compatible, except one thing. The following cypher query runs fine: {code} START entity=node:attach_content("content:*test*") MATCH (entity)<-[:ATTACHES]-(c) WHERE entity.visibility? ="VISIBLE" RETURN c ORDER BY id(c) DESCENDING {code} while this one, with DISTINCT, causes an exception: {code} START entity=node:attach_content("content:*test*") MATCH (entity)<-[:ATTACHES]-(c) WHERE entity.visibility? ="VISIBLE" RETURN DISTINCT c ORDER BY id(c) DESCENDING {code} When there is no result, everything runs fine, but when there's one or multiple results, it fails: {code} java.lang.RuntimeException: Cannot extract single value from Iterable with more than one elements. at org.springframework.data.neo4j.conversion.DefaultConverter.extractSingle(DefaultConverter.java:60) at org.springframework.data.neo4j.conversion.DefaultConverter.extractValue(DefaultConverter.java:51) at org.springframework.data.neo4j.conversion.DefaultConverter.convert(DefaultConverter.java:40) at org.springframework.data.neo4j.support.conversion.EntityResultConverter.convert(EntityResultConverter.java:99) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.convert(QueryResultBuilder.java:102) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.access$300(QueryResultBuilder.java:81) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1$1.underlyingObjectToObject(QueryResultBuilder.java:120) at org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47) at org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java:353) at org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java:370) at org.springframework.data.neo4j.conversion.ContainerConverter.toContainer(ContainerConverter.java:34) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.as(QueryResultBuilder.java:127) at org.springframework.data.neo4j.repository.AbstractGraphRepository.query(AbstractGraphRepository.java:442) at org.springframework.data.neo4j.repository.AbstractGraphRepository.query(AbstractGraphRepository.java:453) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) {code} I'm using a CypherDSLRepository to query a paged result.
    via by Timmy Storms,
  • Maybe I'm to quick and SDN will only support 1.9 when its officially released, but I already gave the Neo4j 1.9.M05 a try. Everything seems to be compatible, except one thing. The following cypher query runs fine: {code} START entity=node:attach_content("content:*test*") MATCH (entity)<-[:ATTACHES]-(c) WHERE entity.visibility? ="VISIBLE" RETURN c ORDER BY id(c) DESCENDING {code} while this one, with DISTINCT, causes an exception: {code} START entity=node:attach_content("content:*test*") MATCH (entity)<-[:ATTACHES]-(c) WHERE entity.visibility? ="VISIBLE" RETURN DISTINCT c ORDER BY id(c) DESCENDING {code} When there is no result, everything runs fine, but when there's one or multiple results, it fails: {code} java.lang.RuntimeException: Cannot extract single value from Iterable with more than one elements. at org.springframework.data.neo4j.conversion.DefaultConverter.extractSingle(DefaultConverter.java:60) at org.springframework.data.neo4j.conversion.DefaultConverter.extractValue(DefaultConverter.java:51) at org.springframework.data.neo4j.conversion.DefaultConverter.convert(DefaultConverter.java:40) at org.springframework.data.neo4j.support.conversion.EntityResultConverter.convert(EntityResultConverter.java:99) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.convert(QueryResultBuilder.java:102) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.access$300(QueryResultBuilder.java:81) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1$1.underlyingObjectToObject(QueryResultBuilder.java:120) at org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47) at org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java:353) at org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java:370) at org.springframework.data.neo4j.conversion.ContainerConverter.toContainer(ContainerConverter.java:34) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.as(QueryResultBuilder.java:127) at org.springframework.data.neo4j.repository.AbstractGraphRepository.query(AbstractGraphRepository.java:442) at org.springframework.data.neo4j.repository.AbstractGraphRepository.query(AbstractGraphRepository.java:453) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) {code} I'm using a CypherDSLRepository to query a paged result.
    via by Timmy Storms,
    • java.lang.RuntimeException: Cannot extract single value from Iterable with more than one elements. at org.springframework.data.neo4j.conversion.DefaultConverter.extractSingle(DefaultConverter.java:60) at org.springframework.data.neo4j.conversion.DefaultConverter.extractValue(DefaultConverter.java:51) at org.springframework.data.neo4j.conversion.DefaultConverter.convert(DefaultConverter.java:40) at org.springframework.data.neo4j.support.conversion.EntityResultConverter.convert(EntityResultConverter.java:99) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.convert(QueryResultBuilder.java:102) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.access$300(QueryResultBuilder.java:81) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1$1.underlyingObjectToObject(QueryResultBuilder.java:120) at org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:47) at org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java:353) at org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java:370) at org.springframework.data.neo4j.conversion.ContainerConverter.toContainer(ContainerConverter.java:34) at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.as(QueryResultBuilder.java:127) at org.springframework.data.neo4j.repository.AbstractGraphRepository.query(AbstractGraphRepository.java:442) at org.springframework.data.neo4j.repository.AbstractGraphRepository.query(AbstractGraphRepository.java:453) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    No Bugmate found.