Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-19885: [Bug] Function Java Instance failed to infer type class name #5642

Open
2 tasks done
sijie opened this issue Mar 22, 2023 · 0 comments
Open
2 tasks done

Comments

@sijie
Copy link
Member

sijie commented Mar 22, 2023

Original Issue: apache#19885


Search before asking

  • I searched in the issues and found nothing similar.

Version

2.11.0

Minimal reproduce step

  1. start a pulsar docker container:
docker run -td --name temp apachepulsar/pulsar-all:2.11.0 bin/pulsar standalone
  1. start java instance directly
docker exec -it temp bash

java -cp /pulsar/instances/java-instance.jar -Dpulsar.functions.instance.classpath=/pulsar/lib/* -Dlog4j.configurationFile=/pulsar/conf/java-log/java_instance_log4j.xml -Dpulsar.function.log.dir=logs/functions -Dpulsar.function.log.file=function-download-sample-inferring-type-0  -Xmx1G  org.apache.pulsar.functions.instance.JavaInstanceMain --jar examples/api-examples.jar --instance_id 0 --function_id 0-cb240a82-ebaa-46b7-9357-199867704176 --function_version 0 --function_details '{"tenant":"public","namespace":"default","name":"function-download-sample-inferring-type","className":"org.apache.pulsar.functions.api.examples.ExclamationFunction","logTopic":"persistent://public/default/logging-function-logs","secretsMap":"{\"name\":{\"path\":\"test-secret\",\"key\":\"username\"},\"pwd\":{\"path\":\"test-secret\",\"key\":\"password\"}}","autoAck":true,"parallelism":1,"source":{"inputSpecs":{"persistent://public/default/input-download-java-topic":{}},"subscriptionPosition":"EARLIEST"},"sink":{"topic":"persistent://public/default/output-download-java-topic","forwardSourceMessageProperty":true},"resources":{"cpu":1,"ram":"1000000000"},"componentType":"FUNCTION"}' --pulsar_serviceurl pulsar://localhost:6650 --max_buffered_tuples 100 --port 9093 --metrics_port 9094 --expected_healthcheck_interval -1 --cluster_name test --use_tls false --secrets_provider org.apache.pulsar.functions.secretsprovider.EnvironmentBasedSecretsProvider --pending_async_requests 1000

What did you expect to see?

instance start successfully

What did you see instead?

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.apache.pulsar.functions.instance.JavaInstanceMain.main(JavaInstanceMain.java:104)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.containsKey(Object)" because "userConfigs" is null
	at org.apache.pulsar.functions.runtime.JavaInstanceStarter.inferringMissingTypeClassName(JavaInstanceStarter.java:313)
	at org.apache.pulsar.functions.runtime.JavaInstanceStarter.start(JavaInstanceStarter.java:178)
	... 5 more

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@sijie sijie added the type/bug label Mar 22, 2023
@sijie sijie added the Stale label Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant