You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/11/16 09:57:17 UTC
[GitHub] sijie opened a new issue #2996: [io] "User class must be in class
path" in pulsar io localrun
sijie opened a new issue #2996: [io] "User class must be in class path" in pulsar io localrun
URL: https://github.com/apache/pulsar/issues/2996
#### Expected behavior
localrun should pass with `file://` package url.
```
/data/pulsar/pulsar/bin/pulsar-admin source localrun --archive file:///data/pulsar/pulsar/pulsar-io/canal/target/pulsar-io-canal-2.3.0-SNAPSHOT.nar --classname org.apache.pulsar.io.canal.CanalSource --tenant public --namespace default --name canal2 --destination-topic-name my-topic --source-config-file /data/pulsar/canal-mysql-source-config.yaml --parallelism 1
```
#### Actual behavior
It fails with following error:
```
java.lang.RuntimeException: User class must be in class path
at org.apache.pulsar.functions.utils.Reflections.createInstance(Reflections.java:108) ~[java-instance.jar:2.3.0-SNAPSHOT]
at org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupInput(JavaInstanceRunnable.java:584) ~[java-instance.jar:2.3.0-SNAPSHOT]
at org.apache.pulsar.functions.instance.JavaInstanceRunnable.setupJavaInstance(JavaInstanceRunnable.java:180) ~[java-instance.jar:2.3.0-SNAPSHOT]
at org.apache.pulsar.functions.instance.JavaInstanceRunnable.run(JavaInstanceRunnable.java:206) [java-instance.jar:2.3.0-SNAPSHOT]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.ClassNotFoundException: org.apache.pulsar.io.canal.CanalSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_191]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_191]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_191]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_191]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_191]
at org.apache.pulsar.functions.utils.Reflections.createInstance(Reflections.java:106) ~[java-instance.jar:2.3.0-SNAPSHOT]
... 4 more
```
#### Get-around Fixes
remove `file://` from `--archive` argument and remove `--classname`.
so there seems to be a problem when these two parameters are used together.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services