gpt4 book ai didi

java - Thingsboard Windows 安装错误

转载 作者:行者123 更新时间:2023-12-02 11:05:21 26 4
gpt4 key购买 nike

当我在 Windows 7 计算机上运行 install.bat 文件时。我收到以下错误:

Detecting Java version installed. Detecting if it is 64 bit machine CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8 Java 1.8 found! Installing thingsboard ... Error: Could not find or load main class Files\thingsboard\lib\thingsboard.jar ThingsBoard installation failed!

我认为它错误地读取了 BASE 文件目录。所以我将其设置为绝对目录位置,如下所示:

SET BASE="C:\Program Files\thingsboard"
SET LOADER_PATH=%BASE%\conf,%BASE%\extensions
SET SQL_DATA_FOLDER=%BASE%\data\sql
SET jarfile=%BASE%\lib\thingsboard.jar
SET installDir=%BASE%\data

我收到以下错误:

Detecting Java version installed. Detecting if it is 64 bit machine CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8 Java 1.8 found! Installing thingsboard ... Logging system failed to initialize using configuration from 'C:\Program Files\thingsboard\install\logback.xml' java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - Failed to create parent directories for [C:\ Program Files\thingsboard\conf\"C:\Program Files\thingsboard"\logs\install.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - openFile("C:\Program Files\thingsboard"\logs /install.log,true) call failed. java.io.FileNotFoundException: "C:\Program Files\thingsboard"\logs\install.log (The file name, directory name, or volume label syntax is incorrect) at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:161 ) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.jav a:57) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:47) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:114) at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java: 304) at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:272) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingAppl icationListener.java:235) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.jav a:208) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMult icaster.java:166) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult icaster.java:138) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult icaster.java:121) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListe ner.java:68) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java :54) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:521) java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - Failed to create parent directories for [C:\ Program Files\thingsboard\conf\"C:\Program Files\thingsboard"\logs\install.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - openFile("C:\Program Files\thingsboard"\logs /install.log,true) call failed. java.io.FileNotFoundException: "C:\Program Files\thingsboard"\logs\install.log (The file name, directory name, or volume label syntax is incorrect) ThingsBoard installation failed!

我做错了什么?

最佳答案

引号似乎有问题。

C:\ Program Files\thingsboard\conf\"C:\Program Files\thingsboard"\logs\install.log java.io.FileNotFoundException: "C:\Program Files\thingsboard"\logs\install.log

您是否尝试过使用 SET BASE=%ProgramFiles%\thingsboard或使用 ^ SET BASE=C:\Program^ Files\thingsboard 转义路径中的空格?

编辑:

问题是因为安装目录中有空间。

我尝试将其安装在“c:\test 文件夹”中,但遇到了同样的问题。安装在“c:\test”这样没有空间的文件夹中没有问题

我更改了 install.bat 文件中的以下部分,并且能够将其安装在带有空格的文件夹中。

SET "BASE=%~dp0"
SET "LOADER_PATH=%BASE%conf,%BASE%extensions"
SET "SQL_DATA_FOLDER=%BASE%data\sql"
SET "jarfile=%BASE%lib\thingsboard.jar"
SET "installDir=%BASE%data"

PUSHD %BASE%conf

java -cp "%jarfile%" -Dloader.main=org.thingsboard.server.ThingsboardInstallApplication "-Dinstall.data_dir=%installDir%" -Dinstall.load_demo=%loadDemo% -Dspring.jpa.hibernate.ddl-auto=none -Dinstall.upgrade=false "-Dlogging.config=%BASE%install\logback.xml" org.springframework.boot.loader.PropertiesLauncher

if errorlevel 1 (
@echo ThingsBoard installation failed!
POPD
exit /b %errorlevel%
)
POPD

"%BASE%thingsboard.exe" install

关于java - Thingsboard Windows 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51009714/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com