西湖的水儿 2022-06-05 09:45
浏览 259
已结题

网络爬虫spider-flow无法运行

gitee上的spider-flow,SpiderApplication应用程序run的时候报错:

2022-06-05 09:27:18.999 [main] INFO  org.spiderflow.SpiderApplication - Starting SpiderApplication on DESKTOP-QF0SV5V with PID 480 (C:\Users\zhanglei\IdeaProjects\spider-flow\spider-flow-web\target\classes started by zhanglei in C:\Users\zhanglei\IdeaProjects\spider-flow)  
2022-06-05 09:27:19.003 [main] INFO  org.spiderflow.SpiderApplication - The following profiles are active: dev  
2022-06-05 09:27:19.054 [main] INFO  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@68c9133c: startup date [Sun Jun 05 09:27:19 CST 2022]; root of context hierarchy  
2022-06-05 09:27:19.896 [main] ERROR org.springframework.boot.SpringApplication - Application run failed  
java.lang.IllegalStateException: Cannot load configuration class: org.spiderflow.SpiderApplication
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:414)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:254)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:282)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:126)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:692)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230)
    at org.spiderflow.SpiderApplication.main(SpiderApplication.java:24)
Caused by: java.lang.ExceptionInInitializerError: null
    at org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122)
    at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:403)
    ... 12 common frames omitted
Caused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @4eb7f003
    at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)
    at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)
    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)
    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)
    at org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
    at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)
    at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)
    at org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)
    at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:174)
    at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:153)
    at org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73)
    ... 15 common frames omitted
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @4eb7f003
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
    at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:200)
    at java.base/java.lang.reflect.Method.setAccessible(Method.java:194)
    at org.springframework.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at org.springframework.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52)
    at org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)
    at org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
    at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)
    ... 27 common frames omitted
2022-06-05 09:27:19.898 [main] INFO  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@68c9133c: startup date [Sun Jun 05 09:27:19 CST 2022]; root of context hierarchy  

Process finished with exit code 1 

spider-flow-web下面的pom.xml文件内容如下:

<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.spiderflow</groupId>
        <artifactId>spider-flow</artifactId>
        <version>0.5.0</version>
    </parent>
    <artifactId>spider-flow-web</artifactId>
    <name>spider-flow-web</name>
    <url>https://gitee.com/jmxd/spider-flow/tree/master/spider-flow-web</url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.spiderflow</groupId>
            <artifactId>spider-flow-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.spiderflow</groupId>
            <artifactId>spider-flow-selenium</artifactId>
        </dependency>
        <!-- 以引入mongodb插件为例 -->
        <dependency>
            <groupId>org.spiderflow</groupId>
            <artifactId>spider-flow-mongodb</artifactId>
            <version>0.0.1</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <finalName>spider-flow</finalName>
                    <mainClass>org.spiderflow.SpiderApplication</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


  • 写回答

1条回答 默认 最新

  • 西湖的水儿 2022-06-05 10:49
    关注
    问题已解决,PRoject settings里的sdk 版本换成corretto-1.8就好了
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 6月13日
  • 已采纳回答 6月5日
  • 创建了问题 6月5日

悬赏问题

  • ¥20 数据结构—复杂度分析
  • ¥15 如何使用单链表编写学生信息管理系统?
  • ¥15 完成课题以及ppt 在21号之前完成
  • ¥15 懂的来,你应该知道我在说什么,我需要你的帮助
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 maccms影视模板 制作影视网站失败 求
  • ¥15 stm32按键设置闹钟数进退位不正常
  • ¥15 自己写的测试驱动程序无法启动
  • ¥15 三电平逆变器中点电位平衡问题
  • ¥20 这怎么写啊 java课设