freeznet opened a new issue, #18110:
URL: https://github.com/apache/pulsar/issues/18110

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   2.8.3
   
   ### Minimal reproduce step
   
   Manually start pulsar function with java command directly without 
`typeClassName` provided in `function_details`, like 
   
   ```
   java -cp /pulsar/instances/java-instance.jar:/pulsar/instances/deps/* 
-Dpulsar.functions.extra.dependencies.dir=/pulsar/instances/deps 
-Dpulsar.functions.instance
   .classpath=/pulsar/conf:::/pulsar/lib/*: 
-Dlog4j.configurationFile=/pulsar/conf/functions_log4j2.xml 
-Dpulsar.function.log.dir=logs//functions/public/default/example 
-Dpulsar.function.log.fil
   e=example-0 -Dio.netty.tryReflectionSetAccessible=true -Xmx1073741824 
org.apache.pulsar.functions.instance.JavaInstanceMain --jar 
/pulsar/download/pulsar_functions/public/default/example/0/ap
   i-examples.jar --instance_id 0 --function_id 
7fcdb3b3-79f7-4c1e-a100-96b3cc32c958 --function_version 
f879debb-6698-4ecb-9a04-c9fc1d2a0c6b --function_details 
'{"tenant":"public","namespace":"d
   
efault","name":"example","className":"org.apache.pulsar.functions.windowing.WindowFunctionExecutor","logTopic":"log_topic","userConfig":"{\"PublishTopic\":\"test_result\",\"__WINDOWCONFIGS__\
   
":{\"windowLengthCount\":10,\"slidingIntervalCount\":5,\"actualWindowFunctionClassName\":\"org.apache.pulsar.functions.api.examples.window.LoggingWindowFunction\"}}","parallelism":1,"source":
   
{"inputSpecs":{"test_src":{}},"cleanupSubscription":true},"sink":{"topic":"test_result","forwardSourceMessageProperty":true
   
},"resources":{"cpu":1.0,"ram":"1073741824","disk":"10737418240"},"componentType":"FUNCTION"}'
 --pulsar_serviceurl pulsar://localhost:6650 --max_buffered_tuples 1024 --port 
42223 --metrics_po
   rt 42623 --pending_async_requests 1000 --state_storage_serviceurl 
bk://127.0.0.1:4181 --expected_healthcheck_interval 30 --secrets_provider 
org.apache.pulsar.functions.secretsprovider.ClearTe
   xtSecretsProvider --cluster_name standalone --nar_extraction_directory /tmp
   ```
   
   ### What did you expect to see?
   
   Function Run as normal
   
   ### What did you see instead?
   
   ```
   2022-10-19T09:27:58,276+0000 [public/default/example-0] ERROR 
org.apache.pulsar.functions.instance.JavaInstanceRunnable - Source open 
produced uncaught exception:
   java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.StringLatin1.charAt(StringLatin1.java:47) ~[?:?]
        at java.lang.String.charAt(String.java:693) ~[?:?]
        at 
org.apache.pulsar.common.util.Reflections.loadClass(Reflections.java:306) 
~[io.streamnative-pulsar-common-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.source.SingleConsumerPulsarSource.open(SingleConsumerPulsarSource.java:64)
 ~[io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupInput(JavaInstanceRunnable.java:755)
 [io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setup(JavaInstanceRunnable.java:232)
 [io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.instance.JavaInstanceRunnable.run(JavaInstanceRunnable.java:260)
 [io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at java.lang.Thread.run(Thread.java:829) [?:?]
   2022-10-19T09:27:58,286+0000 [public/default/example-0] ERROR 
org.apache.pulsar.functions.instance.JavaInstanceRunnable - 
[public/default/example:0] Uncaught exception in Java Instance
   java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.StringLatin1.charAt(StringLatin1.java:47) ~[?:?]
        at java.lang.String.charAt(String.java:693) ~[?:?]
        at 
org.apache.pulsar.common.util.Reflections.loadClass(Reflections.java:306) 
~[io.streamnative-pulsar-common-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.source.SingleConsumerPulsarSource.open(SingleConsumerPulsarSource.java:64)
 ~[io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupInput(JavaInstanceRunnable.java:755)
 ~[io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.instance.JavaInstanceRunnable.setup(JavaInstanceRunnable.java:232)
 ~[io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at 
org.apache.pulsar.functions.instance.JavaInstanceRunnable.run(JavaInstanceRunnable.java:260)
 [io.streamnative-pulsar-functions-instance-2.9.2.23.jar:2.9.2.23]
        at java.lang.Thread.run(Thread.java:829) [?:?]
   ```
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to