Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when specifying timestamp.field on a autogenerated schema #203

Open
pcasaretto opened this issue Aug 3, 2022 · 0 comments
Open

NPE when specifying timestamp.field on a autogenerated schema #203

pcasaretto opened this issue Aug 3, 2022 · 0 comments

Comments

@pcasaretto
Copy link

Library version: 2.0.64

Connector configuration:

{
        "connector.class": "com.github.jcustenborder.kafka.connect.spooldir.SpoolDirCsvSourceConnector",
        "topic": "transactions_spooldir_15",
        "input.path": "/data/unprocessed",
        "finished.path": "/data/processed",
        "error.path": "/data/error",
        "input.file.pattern": ".*\\.csv",
        "schema.generation.enabled":"true",
        "csv.first.row.as.header":"true",
        "transforms":"castTypes,castDate",
        "transforms.castTypes.type":"org.apache.kafka.connect.transforms.Cast$Value",
        "transforms.castTypes.spec":"outflow:float32,inflow:float32,cleared:boolean",
        "transforms.castDate.type":"org.apache.kafka.connect.transforms.TimestampConverter$Value",
        "transforms.castDate.target.type": "Timestamp",
        "transforms.castDate.field": "date",
        "transforms.castDate.format": "dd/MM/yyyy",
        "timestamp.mode":"FIELD",
        "timestamp.field": "date"
        }

Relevant logs:

kafka-connect    | [2022-08-03 19:21:10,355] TRACE [source-csv-spooldir-15|worker] ctor() - Looking for timestamp field 'DATE' (com.github.jcustenborder.kafka.connect.spoold
ir.AbstractSpoolDirSourceConnectorConfig:156)
kafka-connect    | [2022-08-03 19:21:10,356] ERROR [source-csv-spooldir-15|worker] WorkerConnector{id=source-csv-spooldir-15} Error while starting connector (org.apache.kafk
a.connect.runtime.WorkerConnector:192)
kafka-connect    | java.lang.NullPointerException
kafka-connect    |      at com.github.jcustenborder.kafka.connect.spooldir.AbstractSpoolDirSourceConnectorConfig.<init>(AbstractSpoolDirSourceConnectorConfig.java:157)
kafka-connect    |      at com.github.jcustenborder.kafka.connect.spooldir.SpoolDirCsvSourceConnectorConfig.<init>(SpoolDirCsvSourceConnectorConfig.java:125)
kafka-connect    |      at com.github.jcustenborder.kafka.connect.spooldir.SpoolDirCsvSourceConnector.config(SpoolDirCsvSourceConnector.java:46)
kafka-connect    |      at com.github.jcustenborder.kafka.connect.spooldir.SpoolDirCsvSourceConnector.config(SpoolDirCsvSourceConnector.java:27)
kafka-connect    |      at com.github.jcustenborder.kafka.connect.spooldir.AbstractSourceConnector.start(AbstractSourceConnector.java:33)
kafka-connect    |      at com.github.jcustenborder.kafka.connect.spooldir.AbstractSpoolDirSourceConnector.start(AbstractSpoolDirSourceConnector.java:51)
kafka-connect    |      at org.apache.kafka.connect.runtime.WorkerConnector.doStart(WorkerConnector.java:184)
kafka-connect    |      at org.apache.kafka.connect.runtime.WorkerConnector.start(WorkerConnector.java:209)
kafka-connect    |      at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:348)
kafka-connect    |      at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:331)
kafka-connect    |      at org.apache.kafka.connect.runtime.WorkerConnector.doRun(WorkerConnector.java:140)
kafka-connect    |      at org.apache.kafka.connect.runtime.WorkerConnector.run(WorkerConnector.java:117)
kafka-connect    |      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
kafka-connect    |      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
kafka-connect    |      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
kafka-connect    |      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
kafka-connect    |      at java.base/java.lang.Thread.run(Thread.java:829)

Could valueSchema be null here given I'm auto generating a schema?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant