首页 > 其他分享 >Idea 启动报错Error: A JNI error has occurred, please check your installation and try again Exception in

Idea 启动报错Error: A JNI error has occurred, please check your installation and try again Exception in

时间:2023-08-28 14:14:39浏览次数:42  
标签:lang again Exception java idea try 报错 JNI Class

idea运行程序的时候,出现Error: A JNI error has occurred, please check your installation and try again这个错误的话,抛出异常:

java.lang.NoClassDefFoundError: org/springframework/web/socket/server/standard/ServerEndpointExporter
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.springframework.web.socket.server.standard.ServerEndpointExporter
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" 
Process finished with exit code 1

  

即各种类找不到,出现这种错误的原因实际上就是pom文件中依赖的包在运行的时候没有被导入,此时对应导入的依赖的scope的标签值为provided,而在idea中如果不进行设置的话,idea默认是不加载provided的依赖的,因此需要在idea中进行设置,使idea能够加载该类型的依赖,设置的方式如下,即将红色圆圈中的选项勾上就可以解决问题了! 

 

参考https://www.syrr.cn/news/21139.html?action=onClick

 

标签:lang,again,Exception,java,idea,try,报错,JNI,Class
From: https://www.cnblogs.com/guoxinying/p/17662126.html

相关文章

  • java.sql.SQLException: 无法从套接字读取更多的数据
    本来订单的生成没有问题,但不知什么原因,报了一个这样的异常,致使订单不能生成[08-11-198:07:51:344CST]00000037JDBCExceptionEcouldnotinsert:[gmit.jzt.buying.databean.EOrderDO#122594][08-11-198:07:51:344CST]00000037JDBCExceptionE......
  • flutter使用腾讯IM插件tencent_cloud_chat_sdk打安卓报“从内部类中访问本地变量param
    使用tencent_cloud_chat_sdk5.2.0版本打包安卓flutterbuildapk报以下错误/Users/tanglin/Documents/flutter/.pub-cache/hosted/pub.flutter-io.cn/tencent_cloud_chat_sdk-5.2.0/android/src/main/java/com/qq/qcloud/tencent_im_sdk_plugin/util/CommonUtil.java:401:错误:......
  • 服务启动连接redis报错问题
    报错截图如下1,该报错为redis认证问题,也就是需要redis登录密码,需要在配置文件redis配置中,需填写密码2,对于redis的修改有一下操作 2.1,关闭redis的保护模式:打开redis的配置文件,redis.conf文件,找到protected-mode,改成no, 2.2,设置redis密码,requirepass***  到redis的......
  • 20230628 java.sql.SQLException
    介绍java.sql.SQLExceptionpublicclassSQLExceptionextendsjava.lang.ExceptionimplementsIterable每个SQLException都有一个由多个SQLException对象构成的链有大量的异常子类,按照树结构组织API构造器SQLException()SQLException(Stringreason)SQLExceptio......
  • 使用FinalShell 连接虚拟机(Ubuntu) ip报错解决方案
    问题描述使用FinalShell连接时报以下错误:进入虚拟机查看IP时出现以下信息,并没有发现其主机IP信息解决方案在虚拟机(Ubuntu)中运行以下命令sudodhclientens33再次查看其ip信息然后查看FinalShell中,发现连接成功,最终问题得以解决关于dhclient命令dhclient......
  • System.ArgumentNullException:“String 引用没有设置为 String 的实例。
      使用c#控制器,获取前端的字段值的时候出现该问题:System.ArgumentNullException:“String引用没有设置为String的实例。Arg_ParamName_Name” ......
  • 乌班图20.04版本下idea打开项目报错闪退(记录)ideaIU-2023.2.1.tar.gz
    [553960]WARN-#c.i.i.c.t.p.v.p.StateDatabaseParser-Nosuitabledriverfoundforjdbc:sqlite:/root/.config/Code/User/globalStorage/state.vscdbjava.sql.SQLException:Nosuitabledriverfoundforjdbc:sqlite:/root/.config/Code/User/globalStorage/stat......
  • gulimall-categoryController-NullPointerException
    NullPointerException环境在练习gulimall项目时,写到CategoryController时,本来正常运行的项目突然报空指针NullPointerException;@OverridepublicList<CategoryEntity>listWithTree(){//查询所有分类List<CategoryEntity>entities=baseMapper.selec......
  • Doris启动FE时报错:JAVA_HOME tset
    Doris启动FE时报错:JAVA_HOMEtset问题描述运行代码启动fe时报错./start_fe.sh--daemon错误信息Error:JAVA_HOMEisnotset.问题截图问题分析可能服务器环境里安装了多个jdk解决方案在start_fe.sh中输入以下代码,指定jdk即可exportJAVA_HOME=/data/soft/jdk1.8......
  • jetty报错: Open quote is expected for attribute "{1}" associated with an element
    这个错误是使用jetty作为容器,但是java代码中,servlet是使用注解的形式标记一个类为servlet的,可能是版本不兼容吧,会报这个莫名其妙的错,解决方法是将这个servlet类配置到web.xml文件中,不要用注解的形式。......