Skip to content
CCPEDIAby Unity Nodes
App Development

Built a groovy/gradle version of the PingPong app but I have some questions

3 posts335 views3 likesLast activity Apr 2021

  1. amiracamOP 1

    hi , if somebody could expedite

    As I said I have converted the project to be Groovy on Gradle.
    I have started the project i.e. daml start
    I run into an error , see stack below,

    fyi:
    Current package ids: io.reactivex.internal.operators.flowable.FlowableFlattenIterable@74cec793

    also even though I can “run” PingPongReactiveMain , trying to “debug” will not stop at the breakpoints, perhaps something different that I must do i.e. the default debug generated configuration does not work , even though I do see
    Disconnected from the target VM, address: ‘127.0.0.1:45097’, transport: ‘socket’
    evidence that the debugger was engaged

    I’m on JDK 15, using Groovy 3.0.7 , on the latest Intellij IDEA build

    thanks for the help

    STACK:

    Module PingPong is not available on the ledger
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
    at examples.pingpong.reactive.PingPongReactiveMain.detectPingPongPackageId(PingPongReactiveMain.groovy:140)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:149)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:100)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:231)
    at examples.pingpong.reactive.PingPongReactiveMain.main(PingPongReactiveMain.groovy:56)

  2. Gary_Verhaegen 1

    Hi @amiracam,

    That stack trace is hard to read as it seems to consist mostly of Groovy reflection errors. Would you mind sharing the code around this line? Maybe there will be a clue there.

    examples.pingpong.reactive.PingPongReactiveMain.detectPingPongPackageId(PingPongReactiveMain.groovy:140)
    
  3. amiracam 1

    Gary:

    sorry for the late reply, I’ve been swamped and swamped right now but thought I jump in here and acknowledge your feedback.

    Yes , with Groovy and JRuby , you get to see a lot of the intervening reflection calls but you will notice down the stack where the issue emanates from PingPongReactiveMain.groovy line 140,

    this is a conversion , i.e it basically looks like the Java program , simplly at line 140 there’s an explicit throw of RuntimeException due to the fact that a previous query to find the packageId fails.

    I’ll provide a better breakdown with code later today hopefully. I recalll inspecting the “packageService.listPackages()” and not finding what I expected, somewhere in “containsPingPongModule” its failing to match of the package modulesList.