Stateful Functions: java.lang.IllegalStateException: There are no routers defined

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Stateful Functions: java.lang.IllegalStateException: There are no routers defined

Annemarie Burger
Hi,
I'm getting to know Stateful Functions and was trying to run the Harness
RunnerTest example. If I clone the  repository and open and execute the
project from there it works fine, but when I copy the code into my own
project, it keeps giving a "java.lang.IllegalStateException: There are no
routers defined. " I changed nothing about the code, so the Module and the
Router are both defined, and the dependencies are the same. Am I overlooking
something?
This is the full error:

Exception in thread "main" java.lang.IllegalStateException: There are no
routers defined.
        at
org.apache.flink.statefun.flink.core.StatefulFunctionsUniverseValidator.validate(StatefulFunctionsUniverseValidator.java:31)
        at
org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:66)
        at org.apache.flink.statefun.flink.harness.Harness.start(Harness.java:128)
        at gellyStreaming.gradoop.StatefulFunctions.Test.main(Test.java:17)

Process finished with exit code 1





--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Stateful Functions: java.lang.IllegalStateException: There are no routers defined

Igal Shilman
Hi!

Glad to see that you are trying out StateFun!

The exception means that in your application you are missing a router definition, this might happen if either:
1) indeed you did not bind any router 
2) just forgot to include the stateful functions module. If you have copied the code from an example, make sure also to include the file under META-INF/services/org.apache.flink.statefun.sdk.spi.StatefulFunctionModule [1] or annotate your Module with Autoservice (for example: [2])


Good luck,
Igal. 

On Thu, Apr 23, 2020 at 2:40 PM Annemarie Burger <[hidden email]> wrote:
Hi,
I'm getting to know Stateful Functions and was trying to run the Harness
RunnerTest example. If I clone the  repository and open and execute the
project from there it works fine, but when I copy the code into my own
project, it keeps giving a "java.lang.IllegalStateException: There are no
routers defined. " I changed nothing about the code, so the Module and the
Router are both defined, and the dependencies are the same. Am I overlooking
something?
This is the full error:

Exception in thread "main" java.lang.IllegalStateException: There are no
routers defined.
        at
org.apache.flink.statefun.flink.core.StatefulFunctionsUniverseValidator.validate(StatefulFunctionsUniverseValidator.java:31)
        at
org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:66)
        at org.apache.flink.statefun.flink.harness.Harness.start(Harness.java:128)
        at gellyStreaming.gradoop.StatefulFunctions.Test.main(Test.java:17)

Process finished with exit code 1





--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Stateful Functions: java.lang.IllegalStateException: There are no routers defined

Puneet Kinra-2
In reply to this post by Annemarie Burger
Hi All 

 I am facing the problem while running the Harness Runner Test.I have defined the AutoService annotation in the Function Module


java.lang.IllegalStateException: There are no routers defined.
at org.apache.flink.statefun.flink.core.StatefulFunctionsUniverseValidator.validate(StatefulFunctionsUniverseValidator.java:31)
at org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:71)
at org.apache.flink.statefun.flink.harness.Harness.start(Harness.java:127)
at org.apache.flink.statefun.examples.harness.RunnerTest.run(RunnerTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)

On Thu, Apr 23, 2020 at 6:10 PM Annemarie Burger <[hidden email]> wrote:
Hi,
I'm getting to know Stateful Functions and was trying to run the Harness
RunnerTest example. If I clone the  repository and open and execute the
project from there it works fine, but when I copy the code into my own
project, it keeps giving a "java.lang.IllegalStateException: There are no
routers defined. " I changed nothing about the code, so the Module and the
Router are both defined, and the dependencies are the same. Am I overlooking
something?
This is the full error:

Exception in thread "main" java.lang.IllegalStateException: There are no
routers defined.
        at
org.apache.flink.statefun.flink.core.StatefulFunctionsUniverseValidator.validate(StatefulFunctionsUniverseValidator.java:31)
        at
org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:66)
        at org.apache.flink.statefun.flink.harness.Harness.start(Harness.java:128)
        at gellyStreaming.gradoop.StatefulFunctions.Test.main(Test.java:17)

Process finished with exit code 1





--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


--
Cheers 

Puneet Kinra

Mobile:+918800167808 | Skype : [hidden email]

e-mail :[hidden email]