0
votes

I am new to Spring Cloud Data Flow. Just trying to follow the official demo HTTP to MySQL I created a MySQL database (ds_dev) and a table (names) with:

create table names
(
  name  varchar(255) null
);

I followed the instructions to create a stream with:

stream create --name mysqlstream --definition "http --server.port=9010 | jdbc --tableName=names --columns=name --spring.datasource.driver-class-name=org.mariadb.jdbc.Driver --spring.datasource.url='jdbc:mysql://host.docker.internal:3306/ds_dev' --spring.datasource.username=root --spring.datasource.password='rootpw'" --deploy

Then I tried to post some requests with :

http post --contentType 'application/json' --target http://172.18.0.5:9010 --data "{\"name\": \"Foo\"}"

However, instead of having a new entry "Foo" inserted into the table, I got a Null value inserted instead. The jdbc log is like this:

2019-08-06 19:10:10.838  INFO 598 --- [container-0-C-1] o.s.c.s.a.j.sink.JdbcSinkConfiguration   : Could not find value for column 'name': EL1008E: Property or field 'name' cannot be found on object of type 'byte[]' - maybe not public or not valid?

Any suggestions? Thanks in advance!

1

1 Answers

1
votes

What you see in the sample, though, it, unfortunately, points to an older release. It is pointing to a link that results in 404 as well - sorry about that.

Please clean-slate the demo environment and retry with the latest Einstein apps. We have had some issue on the JDBC-sink after Spring Cloud Stream 2.x upgrade, and that has been resolved in the recent releases.

Latest Einstein Apps for Kafka: http://dataflow.spring.io/kafka-maven-latest

(more details in the reference guide)

We will fix the bogus URIs in the samples via: spring-cloud/spring-cloud-dataflow-samples#117.