其他分享
首页 > 其他分享> > Expected com.facebook.presto.$gen.SliceStateSerializer_20221228_121841_10‘s classloader to be of ty

Expected com.facebook.presto.$gen.SliceStateSerializer_20221228_121841_10‘s classloader to be of ty

作者:互联网

1.出现的异常为:

Caused by: java.lang.BootstrapMethodError: call site initialization exception
at java.lang.invoke.CallSite.makeSite(CallSite.java:341)
at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307)
at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297)
at com.facebook.presto. g e n . S l i c e S t a t e S e r i a l i z e r 2 022122 8 1 2184 1 1 0. g e t S e r i a l i z e d T y p e ( U n k n o w n S o u r c e ) a t c o m . f a c e b o o k . p r e s t o . o p e r a t o r . a g g r e g a t i o n . P a r a m e t r i c A g g r e g a t i o n . s p e c i a l i z e ( P a r a m e t r i c A g g r e g a t i o n . j a v a : 115 ) a t c o m . f a c e b o o k . p r e s t o . m e t a d a t a . B u i l t I n F u n c t i o n N a m e s p a c e M a n a g e r . l a m b d a gen.SliceStateSerializer_20221228_121841_10.getSerializedType(Unknown Source) at com.facebook.presto.operator.aggregation.ParametricAggregation.specialize(ParametricAggregation.java:115) at com.facebook.presto.metadata.BuiltInFunctionNamespaceManager.lambda gen.SliceStateSerializer2​02212281​218411​0.getSerializedType(UnknownSource)atcom.facebook.presto.operator.aggregation.ParametricAggregation.specialize(ParametricAggregation.java:115)atcom.facebook.presto.metadata.BuiltInFunctionNamespaceManager.lambdanew 1 ( B u i l t I n F u n c t i o n N a m e s p a c e M a n a g e r . j a v a : 419 ) a t c o m . g o o g l e . c o m m o n . c a c h e . C a c h e L o a d e r 1(BuiltInFunctionNamespaceManager.java:419) at com.google.common.cache.CacheLoader 1(BuiltInFunctionNamespaceManager.java:419)atcom.google.common.cache.CacheLoaderFunctionToCacheLoader.load(CacheLoader.java:165)
at com.google.common.cache.LocalCache L o a d i n g V a l u e R e f e r e n c e . l o a d F u t u r e ( L o c a l C a c h e . j a v a : 3528 ) a t c o m . g o o g l e . c o m m o n . c a c h e . L o c a l C a c h e LoadingValueReference.loadFuture(LocalCache.java:3528) at com.google.common.cache.LocalCache LoadingValueReference.loadFuture(LocalCache.java:3528)atcom.google.common.cache.LocalCacheSegment.loadSync(LocalCache.java:2277)
at com.google.common.cache.LocalCache S e g m e n t . l o c k e d G e t O r L o a d ( L o c a l C a c h e . j a v a : 2154 ) a t c o m . g o o g l e . c o m m o n . c a c h e . L o c a l C a c h e Segment.lockedGetOrLoad(LocalCache.java:2154) at com.google.common.cache.LocalCache Segment.lockedGetOrLoad(LocalCache.java:2154)atcom.google.common.cache.LocalCacheSegment.get(LocalCache.java:2044)
… 37 more
Caused by: java.lang.IllegalArgumentException: Expected com.facebook.presto.$gen.SliceStateSerializer_20221228_121841_10’s classloader to be of type com.facebook.presto.bytecode.DynamicClassLoader
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:440)
at com.facebook.presto.sql.gen.Bootstrap.bootstrap(Bootstrap.java:47)
at java.lang.invoke.CallSite.makeSite(CallSite.java:294)
… 47 more

2.我的解决方案是
原本我的IDEA里面的pom.xml中的配置是

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

<groupId>com.qf.bigdata</groupId>
<artifactId>presto</artifactId>
<version>1.0</version>

<properties>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <jdk-version>1.8</jdk-version>
    <presto.version>0.236</presto.version>
    <!--<scope.type>provided</scope.type>-->
    <maven-assembly-plugin.version>2.6</maven-assembly-plugin.version>
</properties>

<dependencies>
    <dependency>
        <groupId>io.airlift</groupId>
        <artifactId>slice</artifactId>
        <version>0.38</version>
    </dependency>

    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>26.0-jre</version>
    </dependency>

    <dependency>
        <groupId>com.facebook.presto</groupId>
        <artifactId>presto-spi</artifactId>
        <version>${presto.version}</version>
        <!--<scope>${scope.type}</scope>-->
    </dependency>

    <dependency>
        <groupId>com.facebook.presto</groupId>
        <artifactId>presto-main</artifactId>
        <version>${presto.version}</version>
        <!--<scope>${scope.type}</scope>-->
    </dependency>

</dependencies>
<repositories>
    <repository>
        <id>ali-maven</id>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>ali-maven</id>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </pluginRepository>
</pluginRepositories>
<build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>${maven-assembly-plugin.version}</version>
            <configuration>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
            <executions>
                <execution>
                    <id>make-assembly</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>${jdk-version}</source>
                <target>${jdk-version}</target>
                <encoding>UTF-8</encoding>
                <showWarnings>true</showWarnings>
            </configuration>
        </plugin>
    </plugins>
</build>

解决:把pom.xml里面的全部注释去掉重新打包即可!

标签:10,google,java,20221228,presto,facebook,com,LocalCache
来源: https://blog.csdn.net/qq_45259296/article/details/122202523