Nacos 启动问题 Failed to create database ’D:\nacos\nacos\data\derby-data’

复制代码
Caused by: java.sql.SQLException: Failed to start database 'D:\nacos\nacos\data\derby-data' with class loader org.springframework.boot.loader.LaunchedURLClassLoader@5e8c92f4, see the next exception for details.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
        at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
        at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
        at org.apache.derby.jdbc.InternalDriver$LoginCallable.call(Unknown Source)
        at org.apache.derby.jdbc.InternalDriver$LoginCallable.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.derby.iapi.error.StandardException: Failed to start database 'D:\nacos\nacos\data\derby-data' with class loader org.springframework.boot.loader.LaunchedURLClassLoader@5e8c92f4, see the next exception for details.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown Source)
        ... 15 common frames omitted
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.derby.impl.store.raw.data.BasePage.preDirty()" because "<local3>" is null
        at org.apache.derby.impl.store.raw.data.LogicalPageOperation.generateUndo(Unknown Source)
        at org.apache.derby.impl.store.raw.data.InsertOperation.generateUndo(Unknown Source)
        at org.apache.derby.impl.store.raw.log.FileLogger.undo(Unknown Source)
        at org.apache.derby.impl.store.raw.xact.Xact.abort(Unknown Source)
        at org.apache.derby.impl.store.raw.xact.XactFactory.rollbackAllTransactions(Unknown Source)
        at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown Source)
        at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
        at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
        at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
        at org.apache.derby.impl.store.access.RAMAccessManager$5.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        at org.apache.derby.impl.store.access.RAMAccessManager.bootServiceModule(Unknown Source)
        at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
        at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknown Source)
        at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
        at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown Source)
        at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
        at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
        at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unknown Source)
        ... 12 common frames omitted

解决方案

直接删:

复制代码
D:\nacos\nacos\data\

不是只删除derby-data文件,而是data整个文件

然后重新启动 Nacos。

相关推荐
Bruce_Liuxiaowei10 分钟前
Python 实例赋值遮蔽类属性:一个从不报错的静默陷阱
开发语言·python·语法糖
做运维的阿瑞18 分钟前
Python 标准库汇总:分类速览与常用模块清单
linux·运维·python
fd320020 分钟前
达梦数据库更新统计信息后仍走旧执行计划解决方案
数据库
why-geo24 分钟前
Hermes Agent 与 Python 的会产生什么样的碰撞
人工智能·python·ai编程
正经教主31 分钟前
【FDE系列】阶段2:Day 29:FastAPI 进阶 — Pydantic 模型与完整 CRUD 实战
人工智能·python·fde
gCode Teacher 格码致知35 分钟前
Pandas教学-6:coerce详解
python·pandas
梦在远山后39 分钟前
Electron 与 FastAPI 如何完成流式 Agent 对话
python·langchain·agent
华章酱1 小时前
MySQL幻读是怎么出现的
数据库·mysql·幻读
大衛說1 小时前
12 · 文件 I/O 与序列化
python
小静AI工程实验室1 小时前
Python 爬虫中文乱码排查:严格解码、UTF-8 BOM 与 JSON 转义的 12 项实验
字符编码·爬虫·python