简体   繁体   中英

java null pointer exception while running select query in kafka KSQL engine

Steps :

  1. We have created a Kafka topic called pgsqlcountry which has all the streaming data from postgreSQL DB.

  2. we created a stream called country for processing the topic into a table.

  3. stream was created successfully.

-

ksql> describe country;

Field      | Type
------------------------------
ROWTIME    | BIGINT
ROWKEY     | VARCHAR(STRING)
ID         | BIGINT
COUNTRY    | VARCHAR(STRING)
CREATED_AT | BIGINT
UPDATED_AT | BIGINT

-

  1. we run the SQL command "select * from country"

  2. we get error as below

-

ksql> select * from country;

null | null | null | null | null | null
Exception in thread "ksql_query_1-8f1f36a7-e83c-476d-8561-98fe9ed8866b-StreamThread-2" java.lang.NullPointerException

Please find my stacktrace in this screenshot

When I had java.lang.NullPointerException , I had incompatible versions of the ksqldb images.

There appears to be the cp prefix images, eg

Don't mix and match with these images (try to stick with one group or the other):

You can run some other commands (eg SHOW PROPERTIES; ) and see if this also gives the same error of java.lang.NullPointerException . If it does, it probably is the image.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM