首页 > 编程语言 >SpringBoot启动项目报错:java.lang.UnsatisfiedLinkError: D:\files\software\jdk-15.0.1\jdk-17.0.3.1\bin

SpringBoot启动项目报错:java.lang.UnsatisfiedLinkError: D:\files\software\jdk-15.0.1\jdk-17.0.3.1\bin

时间:2024-01-27 10:34:38浏览次数:42  
标签:java jdk na jar springframework dll spring org bit

目录

问题描述

在运行向的时候出现报错:

java.lang.UnsatisfiedLinkError: D:\files\software\jdk-15.0.1\jdk-17.0.3.1\bin\tcnative-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) ~[na:na]
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) ~[na:na]
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) ~[na:na]
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) ~[na:na]
	at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315) ~[na:na]
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285) ~[na:na]
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2422) ~[na:na]
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) ~[na:na]
	at java.base/java.lang.System.loadLibrary(System.java:1989) ~[na:na]
	at org.apache.tomcat.jni.Library.<init>(Library.java:69) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
	at org.apache.tomcat.jni.Library.initialize(Library.java:206) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
	at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:193) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
	at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:102) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getDefaultLifecycleListeners(TomcatServletWebServerFactory.java:173) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.<init>(TomcatServletWebServerFactory.java:120) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration$EmbeddedTomcat.tomcatServletWebServerFactory(ServletWebServerFactoryConfiguration.java:76) ~[spring-boot-autoconfigure-2.5.0.jar:2.5.0]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.7.jar:5.3.7]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:217) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577) ~[spring-context-5.3.7.jar:5.3.7]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:337) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1336) ~[spring-boot-2.5.0.jar:2.5.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1325) ~[spring-boot-2.5.0.jar:2.5.0]
	at com.kailong.KaiLongBlogApplication.main(KaiLongBlogApplication.java:12) ~[classes/:na]

image
在网上查了之后有一个说是决定考与tomcat位数不一致:
原贴地址:https://www.cnblogs.com/yuxiaole/p/9247610.html
image
后检查jdk与tomcat
jdk检查命令:java -version
tomcat检查命令:catalina version输出信息中,Architecture:字段的值就是tomcat的位数
image
image
检查后发现均为64位
最后发现是idea的spring项目有默认的包路径 与实际的存在差异

解决方法:

image
image
加上-Djava.library.path=/usr/local/java/lib:/usr/local/hadoop/lib就好了
image

标签:java,jdk,na,jar,springframework,dll,spring,org,bit
From: https://www.cnblogs.com/kohler21/p/17991163

相关文章

  • 【板子】树状数组(BIT)
    //lg1908求逆序对//Copyrightyeyou26#include<bits/stdc++.h>usingnamespacestd;#definelllonglongconstintN=(int)1e6+6;llsum;intn;structData{intorigin;intls;intid;}data[N];boolcmporigin(Datax,Datay){r......
  • 1.JAVA基础-JDK的介绍
    Java语言语言:人与人交流沟通的表达方式。计算机语言:人与计算机之间进行信息交流沟通的一种特殊语言。Java语言是美国Sun公司(StanfordUniversityNetwork)在1995年推出的计算机语言。Java之父:詹姆斯·高斯林(JamesGosling)。Java语言的三个版本⚫JavaSE⚫JavaME......
  • centos openjdk 11 安装软件包获取方式
    centosopenjdk11安装软件包获取方式 1、openjdk 的官网在官网上可以看到openjdk11 本身最新版本为:(http://jdk.java.net/archive/) 可以看到最新版本为11GA(11+28)点击 Source 按钮(https://hg.openjdk.java.net/jdk/jdk11),可以看到jdk11 一直依赖的代码更新记录......
  • windows的bitlocker解密
    概念WindowsBitLocker驱动器加密通过加密Windows操作系统卷上存储的所有数据可以更好地保护计算机中的数据。BitLocker使用TPM(受信任的平台模块)帮助保护Windows操作系统和用户数据,并帮助确保计算机即使在无人参与、丢失或被盗的情况下也不会被篡改。 取证方法(目前想到的)想要......
  • nodejs消费rabbitmq队列消息
    index.jsvaramqp=require('amqplib/callback_api');constMyConsume=require('./MyConsume');amqp.connect('amqp://name:password!@localhost:5672/vhost',function(error0,connection){if(error0){throwerror......
  • 找不到*.dll问题
    首先,找到这个文件将这个路径添加到环境里 ......
  • 思考:JDK1.8之后HashMap为什么要加入红黑树
    在JDK1.7时如果构造1000w个哈希码相同的字符串,把他们全部插入HashMap中,这将导致严重的哈希冲突1000w个字符串全部挤入到一个哈希桶中,从而形成一个超长链表,这时候的HashMap的性能将从O(1)退化到O(n)为什么性能会退化到O(n)?因为在插入的时候要先比较这个节点是不是存在,因为每个......
  • 【UE插件DTRabbitMQ】 虚幻引擎蓝图连接RabbitMQ服务器使用插件说明
    本插件可以使用蓝图连接RabbitMQ服务器,并推送或者监听消息。下载地址地址在文章最后。 1.节点说明CreateRabbitMQClient-创建RabbitMQ客户端对象创建一个RabbitMQ客户端对象,返回的对象需要提升为变量,以后就是用这个对象去操作。Connect-链接服务器链接到Rabbit......
  • 【豆瓣8.4】《RabbitMQ实战指南》PDF
    内容简介《RabbitMQ实战指南》从消息中间件的概念和RabbitMQ的历史切入,主要阐述RabbitMQ的安装、使用、配置、管理、运维、原理、扩展等方面的细节。《RabbitMQ实战指南》大致可以分为基础篇、进阶篇和高阶篇三个部分。基础篇首先介绍RabbitMQ的基本安装及使用方式,方便零基础的读者......
  • RabbitMQ
    RabbitMQ1.安装教程windows平台Erlang安装:Erlang安装_erlang安装教程-CSDN博客Erlang和RabbitMQ版本兼容:windows安装rabbitmq和环境erlang(最详细版,包括对应关系,安装错误解决方法)_erlang和rabbitmq关系-CSDN博客linuxdocker平台安装rabbitmq:Linux平台使用Docke......