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。

相关推荐
金銀銅鐵1 小时前
[Python] 从《千字文》中随机挑选汉字
后端·python
cup116 小时前
[技术复盘] Windows Python 打包实战:Nuitka 环境踩坑总结与 CI 自动化构建全指南
python·ai·环境变量·ci·nuitka·skill
aqi008 小时前
15天学会AI应用开发(七)有了大模型为什么还要引入RAG
人工智能·python·大模型·ai编程·ai应用
金銀銅鐵10 小时前
用 Python 实现 Take-Away 游戏
python·游戏
copyer_xyf10 小时前
Agent 流程编排
后端·python·agent
copyer_xyf11 小时前
Agent RAG
后端·python·agent
copyer_xyf11 小时前
【RAG】向量数据库:milvus
后端·python·agent
copyer_xyf11 小时前
Agent 记忆管理
后端·python·agent
星云穿梭1 天前
用Python写一个带图形界面的学生管理系统——完整教程
python