Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalDeployerProperties fails on executing java on windows #225

Closed
pjreddy opened this issue Jul 6, 2017 · 2 comments
Closed

LocalDeployerProperties fails on executing java on windows #225

pjreddy opened this issue Jul 6, 2017 · 2 comments

Comments

@pjreddy
Copy link

pjreddy commented Jul 6, 2017

As part of an effort to setup and run Spring Cloud Dataflow (SCDF) local server as per the instructions provided at (http://cloud.spring.io/spring-cloud-dataflow/ precisely at step 2), I was running into an exception when starting the SCDF local server on my Windows 10 workstation. The server startup fails with an error that says .

"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:\Installed_software\java\jre-8u131' is not executable or does not exist. "

On further debugging the problem, it turned out that the method deduceJavaCommand(), in the class, org.springframework.cloud.deployer.spi.local.LocalDeployerProperties, has an assertion on
"javaExecutable.canExecute()" which fails on windows. This is because on Windows, the Java executable is named as "java.exe" but not "java".

A hack for this problem would be to create an empty file named "java" (no extensions) and run the jar. It would be great if someone can put in a fix for the issue. As the problem was discovered as part of local setup instructions, I felt that it would be great if someone from Pivotal can again verify the local setup instructions that are provided as part of such tutorials on Spring cloud. Thanks for your time!

-PJ.

@sabbyanandan
Copy link
Contributor

This issue was moved to spring-cloud/spring-cloud-deployer-local#60

@sabbyanandan
Copy link
Contributor

This is being addressed via: spring-cloud/spring-cloud-deployer-local#59.

corneil pushed a commit that referenced this issue Mar 22, 2023
corneil added a commit that referenced this issue Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants