问题
I registered the sink first as follows:
app register --name mysink --type sink --uri file:///Users/swatikaushik/Downloads/kafkaStreamDemo/target/kafkaStreamDemo-0.0.1-SNAPSHOT.jar
Then I created a stream
stream create --definition “:myKafkaTopic > mysink" --name myStreamName --deploy
I got the error
Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: File
/Users/swatikaushik/Downloads/kafkaStreamDemo/target/kafkaStreamDemo-0.0.1-SNAPSHOT.jar must exist
While the jar exists!!
回答1:
File permission is one thing - please double check as advised.
A few other ideas:
1) Run app info sink:mysink
. If the JAR is actually available, it should return with a list of Boot/Whitelisted properties of the Application.
2) Run the Jar standalone. Make sure it actually starts via java -jar....
.
3) The stream definition appear to include a special character (“:myKafkaTopic > mysink"
instead of ":myKafkaTopic > mysink"
- notice the “
character); it would fail in the Shell, but it looks like you were able to deploy it. A full stacktrace would help.
来源:https://stackoverflow.com/questions/49935235/jar-not-found-error-while-while-trying-to-deploy-scdf-stream