spring-cloud-task icon indicating copy to clipboard operation
spring-cloud-task copied to clipboard

An exception is thrown when trying to run partition batch sample

Open cppwfs opened this issue 7 years ago • 5 comments
trafficstars

14:29:19.343 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed
java.lang.IllegalArgumentException: Invalid argument syntax: --sun.cpu.isalist=
	at org.springframework.core.env.SimpleCommandLineArgsParser.parse(SimpleCommandLineArgsParser.java:75)
	at org.springframework.core.env.SimpleCommandLinePropertySource.<init>(SimpleCommandLinePropertySource.java:89)
	at org.springframework.boot.DefaultApplicationArguments$Source.<init>(DefaultApplicationArguments.java:76)
	at org.springframework.boot.DefaultApplicationArguments.<init>(DefaultApplicationArguments.java:42)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233)
	at io.spring.PartitionedBatchJobApplication.main(PartitionedBatchJobApplication.java:14)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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.JarLauncher.main(JarLauncher.java:51)

cppwfs avatar Jan 05 '18 19:01 cppwfs

After further investigation the upgrade to the latest Spring-Cloud-Deployer-Local caused the issue. The current deployer adds all environment variables to the command line args, when running from the command line. https://github.com/spring-cloud/spring-cloud-deployer-local/issues/88 has been logged on the deployer on this issue.

cppwfs avatar Jan 18 '18 14:01 cppwfs

We need to update the SimpleEnvironmentVariablesProvider to either set environment variables into the SPRING_APPLICATION_JSON. Or update the documentation to let the user's know that they should use SPRING_APPLICATION_JSON.

cppwfs avatar Feb 15 '18 17:02 cppwfs

When PR https://github.com/spring-cloud/spring-cloud-task/pull/402 is merged this issue will be resolved.
Refer to https://github.com/spring-cloud/spring-cloud-task/issues/401

cppwfs avatar Mar 07 '18 20:03 cppwfs

@cppwfs - I just hit this issue on K8s.

dturanski avatar Jan 08 '20 14:01 dturanski

Just ran into this on k8s

Berky115 avatar Aug 04 '22 00:08 Berky115

PR has been merged and test case is resolved.

cppwfs avatar Jan 04 '24 14:01 cppwfs