java.lang.RuntimeException: Failed to access the view

Spring JIRA | deepak vohra | 3 years ago
  1. 0

    The other methods in CrudRepository do not generate an exception , but the findAll(Iterable<ID> ids) method generates the following exception with the example from https://github.com/spring-projects/spring-data-couchbase Exception in thread "main" java.lang.RuntimeException: Failed to access the view at com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:759) at org.springframework.data.couchbase.core.CouchbaseTemplate$5.doInBucket(CouchbaseTemplate.java:196) at org.springframework.data.couchbase.core.CouchbaseTemplate$5.doInBucket(CouchbaseTemplate.java:192) at org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:234) at org.springframework.data.couchbase.core.CouchbaseTemplate.queryView(CouchbaseTemplate.java:192) at org.springframework.data.couchbase.core.CouchbaseTemplate.findByView(CouchbaseTemplate.java:179) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findAll(SimpleCouchbaseRepository.java:143) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.data.couchbase.repository.support.ViewPostProcessor$ViewInterceptor.invoke(ViewPostProcessor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy13.findAll(Unknown Source) at service.CatalogService.findAllDocumentsByCollection(CatalogService.java:103) at service.CatalogService.main(CatalogService.java:62) Caused by: java.util.concurrent.ExecutionException: OperationException: SERVER: bad_request Reason: invalid UTF-8 JSON: {{error,{2,"lexical error: invalid char in json text.\n"}}, "[catalog:engineering-as-a-service, catalog:quintessential-and-collaborative]"} at com.couchbase.client.internal.HttpFuture.waitForAndCheckOperation(HttpFuture.java:98) at com.couchbase.client.internal.ViewFuture.get(ViewFuture.java:65) at com.couchbase.client.internal.ViewFuture.get(ViewFuture.java:49) at com.couchbase.client.internal.HttpFuture.get(HttpFuture.java:72) at com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:752) ... 21 more Caused by: OperationException: SERVER: bad_request Reason: invalid UTF-8 JSON: {{error,{2,"lexical error: invalid char in json text.\n"}}, "[catalog:engineering-as-a-service, catalog:quintessential-and-collaborative]"} at com.couchbase.client.protocol.views.DocsOperationImpl.parseError(DocsOperationImpl.java:105) at com.couchbase.client.protocol.views.ViewOperationImpl.handleResponse(ViewOperationImpl.java:68) at com.couchbase.client.ViewNode$MyHttpRequestExecutionHandler.handleResponse(ViewNode.java:225) at org.apache.http.nio.protocol.AsyncNHttpClientHandler.processResponse(AsyncNHttpClientHandler.java:417) at org.apache.http.nio.protocol.AsyncNHttpClientHandler.inputReady(AsyncNHttpClientHandler.java:242) at com.couchbase.client.http.AsyncConnectionManager$ManagedClientHandler.inputReady(AsyncConnectionManager.java:249) at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:172) at org.apache.http.impl.nio.DefaultClientIOEventDispatch.inputReady(DefaultClientIOEventDispatch.java:155) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:161) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:335) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:542) at java.lang.Thread.run(Thread.java:722)

    Spring JIRA | 3 years ago | deepak vohra
    java.lang.RuntimeException: Failed to access the view
  2. 0

    The other methods in CrudRepository do not generate an exception , but the findAll(Iterable<ID> ids) method generates the following exception with the example from https://github.com/spring-projects/spring-data-couchbase Exception in thread "main" java.lang.RuntimeException: Failed to access the view at com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:759) at org.springframework.data.couchbase.core.CouchbaseTemplate$5.doInBucket(CouchbaseTemplate.java:196) at org.springframework.data.couchbase.core.CouchbaseTemplate$5.doInBucket(CouchbaseTemplate.java:192) at org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:234) at org.springframework.data.couchbase.core.CouchbaseTemplate.queryView(CouchbaseTemplate.java:192) at org.springframework.data.couchbase.core.CouchbaseTemplate.findByView(CouchbaseTemplate.java:179) at org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findAll(SimpleCouchbaseRepository.java:143) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.data.couchbase.repository.support.ViewPostProcessor$ViewInterceptor.invoke(ViewPostProcessor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy13.findAll(Unknown Source) at service.CatalogService.findAllDocumentsByCollection(CatalogService.java:103) at service.CatalogService.main(CatalogService.java:62) Caused by: java.util.concurrent.ExecutionException: OperationException: SERVER: bad_request Reason: invalid UTF-8 JSON: {{error,{2,"lexical error: invalid char in json text.\n"}}, "[catalog:engineering-as-a-service, catalog:quintessential-and-collaborative]"} at com.couchbase.client.internal.HttpFuture.waitForAndCheckOperation(HttpFuture.java:98) at com.couchbase.client.internal.ViewFuture.get(ViewFuture.java:65) at com.couchbase.client.internal.ViewFuture.get(ViewFuture.java:49) at com.couchbase.client.internal.HttpFuture.get(HttpFuture.java:72) at com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:752) ... 21 more Caused by: OperationException: SERVER: bad_request Reason: invalid UTF-8 JSON: {{error,{2,"lexical error: invalid char in json text.\n"}}, "[catalog:engineering-as-a-service, catalog:quintessential-and-collaborative]"} at com.couchbase.client.protocol.views.DocsOperationImpl.parseError(DocsOperationImpl.java:105) at com.couchbase.client.protocol.views.ViewOperationImpl.handleResponse(ViewOperationImpl.java:68) at com.couchbase.client.ViewNode$MyHttpRequestExecutionHandler.handleResponse(ViewNode.java:225) at org.apache.http.nio.protocol.AsyncNHttpClientHandler.processResponse(AsyncNHttpClientHandler.java:417) at org.apache.http.nio.protocol.AsyncNHttpClientHandler.inputReady(AsyncNHttpClientHandler.java:242) at com.couchbase.client.http.AsyncConnectionManager$ManagedClientHandler.inputReady(AsyncConnectionManager.java:249) at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:172) at org.apache.http.impl.nio.DefaultClientIOEventDispatch.inputReady(DefaultClientIOEventDispatch.java:155) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:161) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:335) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:542) at java.lang.Thread.run(Thread.java:722)

    Spring JIRA | 3 years ago | deepak vohra
    java.lang.RuntimeException: Failed to access the view
  3. 0

    Set complex key for Couchbase in java code

    Stack Overflow | 2 years ago | slogan
    java.lang.RuntimeException: Failed to access the view
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Couchbase - getting "view_undefined" after accessing a newly created Production View

    Stack Overflow | 2 years ago | Eyal Katz
    java.lang.RuntimeException: Failed to access the view

  1. jedcua 3 times, last 4 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.concurrent.ExecutionException

    OperationException: SERVER: bad_request Reason: invalid UTF-8 JSON: {{error,{2,"lexical error: invalid char in json text.\n"}}, "[catalog:engineering-as-a-service, catalog:quintessential-and-collaborative]"}

    at com.couchbase.client.internal.HttpFuture.waitForAndCheckOperation()
  2. Couchbase Java SDK
    CouchbaseClient.query
    1. com.couchbase.client.internal.HttpFuture.waitForAndCheckOperation(HttpFuture.java:98)
    2. com.couchbase.client.internal.ViewFuture.get(ViewFuture.java:65)
    3. com.couchbase.client.internal.ViewFuture.get(ViewFuture.java:49)
    4. com.couchbase.client.internal.HttpFuture.get(HttpFuture.java:72)
    5. com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:752)
    5 frames
  3. Spring Data Couchbase
    SimpleCouchbaseRepository.findAll
    1. org.springframework.data.couchbase.core.CouchbaseTemplate$5.doInBucket(CouchbaseTemplate.java:196)
    2. org.springframework.data.couchbase.core.CouchbaseTemplate$5.doInBucket(CouchbaseTemplate.java:192)
    3. org.springframework.data.couchbase.core.CouchbaseTemplate.execute(CouchbaseTemplate.java:234)
    4. org.springframework.data.couchbase.core.CouchbaseTemplate.queryView(CouchbaseTemplate.java:192)
    5. org.springframework.data.couchbase.core.CouchbaseTemplate.findByView(CouchbaseTemplate.java:179)
    6. org.springframework.data.couchbase.repository.support.SimpleCouchbaseRepository.findAll(SimpleCouchbaseRepository.java:143)
    6 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  5. Spring Data Core
    RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
    1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344)
    2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329)
    2 frames
  6. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    1 frame
  7. Spring Data Couchbase
    ViewPostProcessor$ViewInterceptor.invoke
    1. org.springframework.data.couchbase.repository.support.ViewPostProcessor$ViewInterceptor.invoke(ViewPostProcessor.java:80)
    1 frame
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    4 frames
  9. com.sun.proxy
    $Proxy13.findAll
    1. com.sun.proxy.$Proxy13.findAll(Unknown Source)
    1 frame
  10. service
    CatalogService.main
    1. service.CatalogService.findAllDocumentsByCollection(CatalogService.java:103)
    2. service.CatalogService.main(CatalogService.java:62)
    2 frames