简体   繁体   English

Spring Cloud DataFlow Local-Server 1.2.2无法在Windows 10上启动

[英]Spring Cloud DataFlow Local-Server 1.2.2 fails to startup on Windows 10

I'm attempting to follow the spring cloud data flow tutorial at this link http://cloud.spring.io/spring-cloud-dataflow/#quick-start . 我正在尝试通过此链接http://cloud.spring.io/spring-cloud-dataflow/#quick-start上的Spring Cloud数据流教程。

When at Step 2, executing the following line 在步骤2时,执行以下行

java -jar spring-cloud-dataflow-server-local-1.2.2.RELEASE.jar

Results in the following exception: 导致以下异常:

2017-07-01 16:21:00.218 WARN 3224 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'taskService' defined in class path resource [org/springframework/cloud/dataflow/server/config/features/TaskConfiguration.class]: Unsatisfied dependency expressed through method 'taskService' parameter 5; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'taskLauncher' defined in class path resource [org/springframework/cloud/deployer/spi/local/LocalDeployerAutoConfiguration.class]: Unsatisfied dependency expressed through method 'taskLauncher' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.cloud.deployer.local-org.springframework.cloud.deployer.spi.local.LocalDeployerProperties': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.deployer.spi.local.LocalDeployerProperties]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Java executable discovered via 'java.home' system property 'C:\\Program Files\\Java\\jdk1.8.0_131\\jre' is not executable or does not exist.

I think the key is the 'c:\\program files\\java\\jdk1.8.0_131\\jre' appears to be the wrong path to the java binaries. 我认为关键是'c:\\ program files \\ java \\ jdk1.8.0_131 \\ jre'似乎是Java二进制文件的错误路径。 I would expect this to be the %JRE_HOME%\\bin directory. 我希望这是%JRE_HOME%\\ bin目录。

I wrote a small program to dump the system properties which produced the following: 我编写了一个小程序来转储产生以下内容的系统属性:

java.home: C:\\Program Files\\Java\\jdk1.8.0_131\\jre

My JAVA_HOME, JRE_HOME, CLASSPATH and JDK_HOME environment variables are set as following 我的JAVA_HOME,JRE_HOME,CLASSPATH和JDK_HOME环境变量设置如下

JAVA_HOME C:\Program Files\Java\jdk1.8.0_131
JDK_HOME %JAVA_HOME%
JRE_HOME %JAVA_HOME%\jre
CLASSPATH .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib

The PATH variable is set to %JAVA_HOME%\\bin PATH变量设置为%JAVA_HOME%\\ bin

I have restarted my command prompt several times. 我已经多次重启命令提示符。

When I run the following command for the 1.1.4 version, the server starts up without error: 当我为1.1.4版本运行以下命令时,服务器启动时没有错误:

java -jar spring-cloud-dataflow-server-local-1.1.4.RELEASE.jar

I have tried to remove the JRE_HOME variable and have CLASSPATH set to . 我试图删除JRE_HOME变量并将CLASSPATH设置为。

Update: Adding output of dir c:\\java.exe /s /b 更新:添加dir c:\\ java.exe / s / b的输出

c:\Program Files\Java\jdk1.8.0_131\bin\java.exe
c:\Program Files\Java\jdk1.8.0_131\jre\bin\java.exe
c:\Program Files\Java\jre1.8.0_131\bin\java.exe
c:\Program Files (x86)\Java\jre1.8.0_131\bin\java.exe
c:\ProgramData\Oracle\Java\javapath\java.exe
c:\ProgramData\Oracle\Java\javapath_target_260505593\java.exe
c:\Users\All Users\Oracle\Java\javapath\java.exe
c:\Users\All Users\Oracle\Java\javapath_target_260505593\java.exe

This is a bug: (impacts 1.2.2.RELEASE only and is fixed by 1.2.3.RELEASE) 这是一个错误:(仅影响1.2.2RELEASE,并由1.2.3RELEASE修复)

https://github.com/spring-cloud/spring-cloud-deployer-local/issues/58 https://github.com/spring-cloud/spring-cloud-deployer-local/issues/58

"Work around" solution is to goto the JRE path of java on your system and to run the following command “解决方法”解决方案是转到系统上Java的JRE路径并运行以下命令

(note to other users to find your java path type echo %JAVA_HOME% in command prompt window, if there is a 'jdk' in the java home path make sure to alter it to 'jre' for the 'cd' command below. We need to navigate to the jre dir not jdk we also appended '\\bin') (请注意其他用户在命令提示符窗口中找到您的Java路径类型echo %JAVA_HOME% ,如果Java主目录路径中存在“ jdk”,请确保将以下“ cd”命令将其更改为“ jre”。我们需要导航到jre目录而不是jdk,我们还附加了'\\ bin')

  1. Navigate to the JRE's bin directory 导航到JRE的bin目录

cd C:\\Program Files\\Java\\jre1.8.0_131\\bin (notice: in the path "jre1.8" not jdk ) cd C:\\ Program Files \\ Java \\ jre1.8.0_131 \\ bin (notice: in the path "jre1.8" not jdk

  1. Make a copy of 'java.exe' called 'java' in this this same directory 在同一目录中复制名为“ java”的“ java.exe”

copy java.exe java 复制java.exe java

Summary of Bug/Workaround: 错误/解决方法摘要:

the bug is basically... the developers were expecting the java executable to be called java and not java.exe as it is named on Windows OS. 该错误基本上是...开发人员期望Java可执行文件名为java而不是Windows操作系统上命名的java.exe So the workaround is to make a copy of java.exe and name it java in that JRE's bin directory... 因此,解决方法是制作一个java.exe副本并将其在该JRE的bin目录中命名为java ...

not sure how something like this makes it to production release though... :/ 不知道这样的事情如何使其进入生产版本...:/

此错误已在1.2.3版本中修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring Cloud Dataflow Local Server是否需要连接Zookeeper? - Does Spring Cloud Dataflow Local Server need to connect zookeeper? OKD 中的 Spring Cloud Dataflow/SCDF 2.8.0 失败 - Spring Cloud Dataflow/SCDF 2.8.0 in OKD fails Spring Cloud Dataflow Local Using dockerized Task - Spring Cloud Dataflow Local Using dockerized Task 如何在 Spring Cloud Dataflow “Cloudfoundry”服务器启动时引用本地 Kafka 和 Zookeeper 配置 - How to reference local Kafka and Zookeeper config on Spring Cloud Dataflow “Cloudfoundry” server start Spring Cloud 数据流服务器自定义构建 2.6.1 - Spring cloud dataflow server Custom Build 2.6.1 无法将 Spring 云配置服务器连接到本地存储库 windows - Unable to connect Spring cloud config server to local Repository windows 如果配置包含加密条目,则嵌入式自配置Spring-Cloud-Config服务器启动失败 - Embedded self-configuring Spring-Cloud-Config server startup fails if configuration contains encrypted entries 使用gradle 3和java 7的spring boot在服务器启动时失败 - spring boot with gradle 3 and java 7 fails at server startup 自定义实体不会在Spring Cloud Dataflow Server中加载 - Custom entities do not load within a Spring Cloud Dataflow Server 在数据流服务器中运行时出现spring cloud task taskLifecycleListener错误 - spring cloud task taskLifecycleListener error when running in dataflow server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM