-
Notifications
You must be signed in to change notification settings - Fork 224
Closed
Labels
kind/bugSomething isn't workingSomething isn't working
Description
Expected Behavior
I would expect to have working pubsub example that I can follow without issues. I would not expect to see a Java exception.
Actual Behavior
The subscriber logs from the pubsub example throws a Java exception while following these instructions from the README.
I create the publisher as noted in the README with:
dapr run --components-path ./components/pubsub --app-id publisher -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.pubsub.Publisher
Then I run the subscriber as noted in the README with:
dapr run --components-path ./components/pubsub --app-id subscriber --app-port 3000 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.pubsub.Subscriber -p 3000
And I see the following from the subscriber logs:
...
== APP == Exception in thread "main" java.lang.reflect.InvocationTargetException
== APP == at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
== APP == at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
== APP == at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
== APP == at java.base/java.lang.reflect.Method.invoke(Method.java:566)
== APP == at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
== APP == at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
== APP == at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
== APP == at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
== APP == Caused by: java.lang.ClassNotFoundException: io.dapr.examples.pubsub.Subscriber
== APP == at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
== APP == at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
== APP == at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)
== APP == at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
== APP == at java.base/java.lang.Class.forName0(Native Method)
== APP == at java.base/java.lang.Class.forName(Class.java:315)
== APP == at io.dapr.examples.DaprMainApplication.main(DaprMainApplication.java:33)
== APP == ... 8 more
❌ The App process exited with error code: exit status 1
ℹ️ Updating metadata for appPID: 74424
ℹ️ Updating metadata for app command: java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.pubsub.Subscriber -p 3000
✅ You're up and running! Both Dapr and your app logs will appear here.
ℹ️
terminated signal received: shutting down
✅ Exited Dapr successfully
❌ Error exiting App: exit status 1
Key errs are below:
== APP == Exception in thread "main" java.lang.reflect.InvocationTargetException
== APP == Caused by: java.lang.ClassNotFoundException: io.dapr.examples.pubsub.Subscriber
Steps to Reproduce the Problem
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working