简体   繁体   中英

NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess

I have a maven project which downloads files from the google storage bucket, and I am getting this error:

java.lang.NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess

when the program is trying to use:

Blob blob = cloudStorage.get(BlobId.of(bucketName, file.getName()));

below is the pom.xml:

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>autotest_cloud_installation</artifactId>
<packaging>jar</packaging>


<dependencies>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>autotest_general_utils</artifactId>
        <version>${project.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-bundle</artifactId>
        <version>1.11.466</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.threeten/threetenbp -->
    <dependency>
        <groupId>org.threeten</groupId>
        <artifactId>threetenbp</artifactId>
        <version>1.4.4</version>
    </dependency>
    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-deploymentmanager</artifactId>
      <version>v2beta-rev20220908-2.0.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-compute -->
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-compute</artifactId>
        <version>v1-rev235-1.25.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-compute -->
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-compute</artifactId>
        <version>v1-rev20220918-2.0.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.google.cloud/google-cloud-storage -->
    <dependency>
        <groupId>com.google.cloud</groupId>
        <artifactId>google-cloud-storage</artifactId>
        <version>2.13.0</version>
    </dependency>

    

    
</dependencies>

<build>
    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings 
                only. It has no influence on the Maven build itself. -->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>com.jcabi</groupId>
                                    <artifactId>jcabi-maven-plugin</artifactId>
                                    <versionRange>[0.0,)</versionRange>
                                    <goals>
                                        <goal>ajc</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.jcabi</groupId>
                <artifactId>jcabi-maven-plugin</artifactId>
                <version>0.12</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>ajc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </pluginManagement>

</build>

I googled google util InternalFutureFailureAccess maven artifact and found this

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>failureaccess</artifactId>
    <version>1.0</version>
</dependency>

Maybe adding it to your pom will solve the problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM