spring-data-flow 任务示例 [英] spring-data-flow task example

查看:51
本文介绍了spring-data-flow 任务示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 spring-cloud-dataflow 与 taskcloud 模块一起使用,但在容器中使用一个简单的示例时遇到了一些麻烦.小例子 6.3 写代码然后我已经部署了但是当我尝试执行它时给我一个

<块引用>

java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found在 org.springframework.util.Assert.notNull(Assert.java:134)在 org.springframework.cloud.task.listener.TaskLifecycleListener.doTaskStart(TaskLifecycleListener.java:200)

在我的评估中,我使用了 Spring 启动示例对于在 scd 中运行,我添加了 @EnableTask 并配置了广告 sqlserver 数据源,但它不起作用.

我坚持使用 spring 云数据流,因为我已经读到 spring 批处理管理已结束,但 2.0.0.BUILD-SNAPSHOT 有效好吧,一个小例子的工作原理与带有@task 注释的 spring 云数据流中发生的情况相反.

可能是我的误解,但你能不能给我一个小例子,或者告诉我一些网址?

解决方案

这个错误:

<块引用>

无效的任务执行,未找到 ID 1

可以是关于SCDF的数据源,一般情况下,SCDF在自己的数据库中找不到任务执行表,而不是应用程序数据库

您可以通过添加数据库驱动程序或修复 url 连接字符串来修复它,指向 SCDF 的数据库

下面的这个问题可能有帮助

如何正确编译/打包 Spring Cloud Data Flow 的任务

I'm using spring-cloud-dataflow with taskcloud module but I've some trouble to lunch a simple example in container. tiny example 6.3 writing code then I've deploy it but when I try to execute it throw me an

java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found
  at org.springframework.util.Assert.notNull(Assert.java:134)
  at org.springframework.cloud.task.listener.TaskLifecycleListener.doTaskStart(TaskLifecycleListener.java:200)

In my evaluation I've used Spring boot example and for run in scd I've add @EnableTask and configured ad sqlserver datasource but it doesn't works.

I'm insisting on using spring cloud data flow cause I've read that spring batch admin is at end-of-life, but 2.0.0.BUILD-SNAPSHOT works well and a tiny examples works as opposed to what happens in spring cloud data flow with @task annotation.

Probably is my misundestand but could you please provide me a tiny example where or address me some url ?

解决方案

This error:

Invalid TaskExecution, ID 1 not found

Can be about the SCDF's datasource, in general, SCDF cannot find the Task Execution table in its own database, not application database

You might fix it by adding database driver or fixing url connection string, point to SCDF's database

This issue below might help

How to properly compile/package a Task for Spring Cloud Data Flow

这篇关于spring-data-flow 任务示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆