Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1619

AbstractCouchbaseDataConfiguration - cannot be opened because it does not exist

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Critical
    • None
    • None
    • None
    • None
    • 1

    Description

      Seems like there is something missing in the latest spring-data-couchbase. I'm getting the following error:

       

       

      Caused by: java.io.FileNotFoundException: class path resource [org/springframework/data/couchbase/config/AbstractCouchbaseDataConfiguration.class] cannot be opened because it does not existCaused by: java.io.FileNotFoundException: class path resource [org/springframework/data/couchbase/config/AbstractCouchbaseDataConfiguration.class] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:50) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE]
      

       

       

      My project has just the following files:

       

      Config.java

      import org.springframework.context.annotation.Configuration;
      import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration;
       
      import java.util.Collections;
      import java.util.List;
       
      @Configuration
      public class Config extends AbstractCouchbaseConfiguration {
       
          @Override
          protected List<String> getBootstrapHosts() {
              return Collections.singletonList("127.0.0.1");
          }
       
          @Override
          protected String getBucketName() {
              return "test";
          }
       
          @Override
          protected String getBucketPassword() {
              return "couchbase";
          }
      }
      

       

      pom.xml

       <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.2.6.RELEASE</version>
            <relativePath/> <!-- lookup parent from repository -->
         </parent>
         <groupId>com.example</groupId>
         <artifactId>demo</artifactId>
         <version>0.0.1-SNAPSHOT</version>
         <name>demo</name>
         <description>Demo project for Spring Boot</description>
       
         <properties>
            <java.version>1.8</java.version>
         </properties>
       
         <dependencies>
            <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter</artifactId>
            </dependency>
       
            <dependency>
               <groupId>org.springframework.data</groupId>
               <artifactId>spring-data-couchbase</artifactId>
               <version>2.0.0.RELEASE</version>
            </dependency>
       
            <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-test</artifactId>
               <scope>test</scope>
               <exclusions>
                  <exclusion>
                     <groupId>org.junit.vintage</groupId>
                     <artifactId>junit-vintage-engine</artifactId>
                  </exclusion>
               </exclusions>
            </dependency>
         </dependencies>
       
         <build>
            <plugins>
               <plugin>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-maven-plugin</artifactId>
               </plugin>
            </plugins>
         </build>
       
      </project>
      
      

      DemoApplication.java

       

      @SpringBootApplication
      public class DemoApplication {
       
         public static void main(String[] args) {
            SpringApplication.run(DemoApplication.class, args);
         }
       
      }
      
      

       

      I tried to run this and other projects with previous versions and they worked fine.

       

       

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            daschl Michael Nitschinger
            denis.rosa Denis Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty