Antti-Kaikkonen commented on issue #5350: Pulsar can't load the customized SerDe URL: https://github.com/apache/pulsar/issues/5350#issuecomment-590038153 @sijie @wolfstudy I'm getting the same error when using --custom-serde-inputs: ``` ./pulsar-admin functions create --jar test-functions/PulsarPOJOFunction-1.0-SNAPSHOT-jar-with-dependencies.jar --classname com.example.pulsartest.PojoFunction --name pojo-function --inputs user --output user2 --custom-serde-inputs "{"user":"com.example.pulsartest.UserSerDe"}" ``` Error found in logs: ``` 09:48:40.471 [public/default/pojo-function-0] ERROR org.apache.pulsar.functions.instance.JavaInstanceRunnable - [public/default/pojo-function8:0] Uncaught exception in Java Instance java.lang.RuntimeException: User class must be in class path at org.apache.pulsar.functions.utils.Reflections.createInstance(Reflections.java:67) ~[org.apache.pulsar-pulsar-functions-utils-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.instance.InstanceUtils.createInstance(InstanceUtils.java:84) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.instance.InstanceUtils.initializeSerDe(InstanceUtils.java:43) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.source.TopicSchema.newSchemaInstance(TopicSchema.java:202) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.source.TopicSchema.newSchemaInstance(TopicSchema.java:210) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.source.TopicSchema.lambda$getSchema$0(TopicSchema.java:66) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at java.util.HashMap.computeIfAbsent(HashMap.java:1133) ~[?:?] at org.apache.pulsar.functions.source.TopicSchema.getSchema(TopicSchema.java:66) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.source.PulsarSource.lambda$setupConsumerConfigs$5(PulsarSource.java:163) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at java.util.TreeMap.forEach(TreeMap.java:1002) ~[?:?] at org.apache.pulsar.functions.source.PulsarSource.setupConsumerConfigs(PulsarSource.java:160) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.source.PulsarSource.open(PulsarSource.java:66) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupInput(JavaInstanceRunnable.java:732) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupJavaInstance(JavaInstanceRunnable.java:215) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at org.apache.pulsar.functions.instance.JavaInstanceRunnable.run(JavaInstanceRunnable.java:244) ~[org.apache.pulsar-pulsar-functions-instance-2.5.0.jar:2.5.0] at java.lang.Thread.run(Thread.java:834) ~[?:?] Caused by: java.lang.ClassNotFoundException: com.example.pulsartest.UserSerDe at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?] at java.lang.Class.forName0(Native Method) ~[?:?] at java.lang.Class.forName(Class.java:398) ~[?:?] at org.apache.pulsar.functions.utils.Reflections.createInstance(Reflections.java:65) ~[org.apache.pulsar-pulsar-functions-utils-2.5.0.jar:2.5.0] ... 15 more ``` But com.example.pulsartest.UserSerDe exists in my jar. Pulsar is is 2.5.0 standalone.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
