java.lang.ClassCastException: water.rapids.ValId cannot be cast to water.rapids.ValFrame

JIRA | Kevin Normoyle | 2 years ago
  1. 0

    maybe my case below has other issues, but here's my thinking/questions: I would think a function result i..e (fcn ...) should be able to go to a lhs frame using assign (= ..) if not, that means there has to be datatype tracking by the thing that generates rapids strings...i.e. scalar vs frame? not part of this but a related thought: I don't like the idea that rapids output has two types: key vs scalar. I end up putting lhs scalars in keys if rapids didn't just to eliminate that special case. t0 didn't exist as a key before I did this: { "ast": "(= ([ !t0 \"null\" \"null\") (+ (* #2 #2) (* #5 #5)))" } got exception: "water.rapids.ValId cannot be cast to water.rapids.ValFrame" ====================================================================== ERROR: test_rapids_colons_basic (__main__.Basic) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_rapids_colons_basic.py", line 102, in tearDown h2o.check_sandbox_for_errors() File "../h2o_test.py", line 198, in check_sandbox_for_errors python_test_name=python_test_name) File "../h2o_sandbox.py", line 281, in check_sandbox_for_errors raise Exception(errorMessage) Exception: check_sandbox_for_errors: Errors in sandbox stdout or stderr (or R stdout/stderr). Could have occurred at any prior time 12-03 22:25:33.741 192.168.0.34:54333 14666 # Session ERRR: java.lang.ClassCastException: water.rapids.ValId cannot be cast to water.rapids.ValFrame java.lang.ClassCastException: water.rapids.ValId cannot be cast to water.rapids.ValFrame at water.rapids.Env.peekAry(Env.java:142) at water.rapids.ASTAssign.exec(AST.java:874) at water.rapids.AST.treeWalk(AST.java:68) at water.rapids.Exec.exec(Exec.java:74) at water.api.RapidsHandler.exec(RapidsHandler.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at water.api.Handler.handle(Handler.java:55) at water.api.RequestServer.handle(RequestServer.java:479) at water.api.RequestServer.serve(RequestServer.java:457) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:432) at java.lang.Thread.run(Thread.java:745) --------------------------------------------------------------

    JIRA | 2 years ago | Kevin Normoyle
    java.lang.ClassCastException: water.rapids.ValId cannot be cast to water.rapids.ValFrame
  2. 0

    maybe my case below has other issues, but here's my thinking/questions: I would think a function result i..e (fcn ...) should be able to go to a lhs frame using assign (= ..) if not, that means there has to be datatype tracking by the thing that generates rapids strings...i.e. scalar vs frame? not part of this but a related thought: I don't like the idea that rapids output has two types: key vs scalar. I end up putting lhs scalars in keys if rapids didn't just to eliminate that special case. t0 didn't exist as a key before I did this: { "ast": "(= ([ !t0 \"null\" \"null\") (+ (* #2 #2) (* #5 #5)))" } got exception: "water.rapids.ValId cannot be cast to water.rapids.ValFrame" ====================================================================== ERROR: test_rapids_colons_basic (__main__.Basic) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_rapids_colons_basic.py", line 102, in tearDown h2o.check_sandbox_for_errors() File "../h2o_test.py", line 198, in check_sandbox_for_errors python_test_name=python_test_name) File "../h2o_sandbox.py", line 281, in check_sandbox_for_errors raise Exception(errorMessage) Exception: check_sandbox_for_errors: Errors in sandbox stdout or stderr (or R stdout/stderr). Could have occurred at any prior time 12-03 22:25:33.741 192.168.0.34:54333 14666 # Session ERRR: java.lang.ClassCastException: water.rapids.ValId cannot be cast to water.rapids.ValFrame java.lang.ClassCastException: water.rapids.ValId cannot be cast to water.rapids.ValFrame at water.rapids.Env.peekAry(Env.java:142) at water.rapids.ASTAssign.exec(AST.java:874) at water.rapids.AST.treeWalk(AST.java:68) at water.rapids.Exec.exec(Exec.java:74) at water.api.RapidsHandler.exec(RapidsHandler.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at water.api.Handler.handle(Handler.java:55) at water.api.RequestServer.handle(RequestServer.java:479) at water.api.RequestServer.serve(RequestServer.java:457) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:432) at java.lang.Thread.run(Thread.java:745) --------------------------------------------------------------

    JIRA | 2 years ago | Kevin Normoyle
    java.lang.ClassCastException: water.rapids.ValId cannot be cast to water.rapids.ValFrame
  3. 0

    I think the output of mean should be able to go into a key (cA_35) regardless of what's there already...I shouldn't have to do anything special for mean..i.e. it should act like sum and be able to go into any key.. here you can see I'm just putting mean into a key ca_35 didn't exist already.. I grep to show that kevin@Kevin-Ubuntu3:~/h2o-dev/py2/testdir_single_jvm/sandbox$ grep cA_35 * commands.log:2014-12-06 23:26:28.260990 -- Start http://192.168.0.34:54321/Rapids.json # {'funs': None, 'ast': '(= !cA_35 (mean ([ $cA_2 #0 #0) #0 $FALSE))'}; local-h2o-0.stdout.F5m68S.log:12-06 23:26:28.262 192.168.0.34:54321 1482 # Session INFO: Path: /2/Rapids, route: ^(/v?\d+)?/Rapids, parms: {ast=(= !cA_35 (mean ([ $cA_2 #0 #0) #0 $FALSE))} here's the error in stdout 12-06 23:26:28.262 192.168.0.34:54321 1482 # Session INFO: Path: /2/Rapids, route: ^(/v?\d+)?/Rapids, parms: {ast=(= !cA_35 (mean ([ $cA_2 #0 #0) #0 $FALSE))} 12-06 23:26:28.264 192.168.0.34:54321 1482 # Session ERRR: java.lang.ClassCastException: water.rapids.ValNum cannot be cast to water.rapids.ValFrame in stderr java.lang.ClassCastException: water.rapids.ValNum cannot be cast to water.rapids.ValFrame at water.rapids.Env.pop0Ary(Env.java:144) at water.rapids.ASTNcol.apply(ASTOp.java:474) at water.rapids.AST.treeWalk(AST.java:41) at water.rapids.AST.treeWalk(AST.java:65) at water.rapids.Exec.exec(Exec.java:74) at water.api.RapidsHandler.exec(RapidsHandler.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at water.api.Handler.handle(Handler.java:55) at water.api.RequestServer.handle(RequestServer.java:479) at water.api.RequestServer.serve(RequestServer.java:457) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:432) at java.lang.Thread.run(Thread.java:745)

    JIRA | 2 years ago | Kevin Normoyle
    java.lang.ClassCastException: water.rapids.ValNum cannot be cast to water.rapids.ValFrame
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Something like this: scale(iris[,1:4],center=c(4,3,2,1), scale=c(1,1,1,1)) gives this: /99/Rapids, route: /99/Rapids, parms: {ast=(= !nary_op_10 (scale ([ %file4b3c3d449a_csv_6.hex_7 () (: #0 #3)) (llist #4 #3 #2 #1) (llist #1 #1 #1 #1)))} java.lang.ClassCastException: water.rapids.ASTLongList cannot be cast to water.rapids.ASTId at water.rapids.ASTScale.parseArg(ASTOp.java:931) at water.rapids.ASTScale.parse_impl(ASTOp.java:916) at water.rapids.ASTScale.parse_impl(ASTOp.java:906) at water.rapids.Exec.parse(Exec.java:101) at water.rapids.ASTAssign.parse_impl(AST.java:701) at water.rapids.ASTAssign.parse_impl(AST.java:672) at water.rapids.Exec.parse(Exec.java:101) at water.rapids.Exec.exec(Exec.java:64) at water.api.RapidsHandler.exec(RapidsHandler.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at water.api.Handler.handle(Handler.java:56) at water.api.RequestServer.handle(RequestServer.java:677) at water.api.RequestServer.serve(RequestServer.java:614) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:438) at java.lang.Thread.run(Thread.java:745) java.lang.IllegalArgumentException: Expected %TRUE or %FALSE. Got: class java.lang.ClassCastException at water.rapids.ASTScale.parseArg(ASTOp.java:934) at water.rapids.ASTScale.parse_impl(ASTOp.java:916) at water.rapids.ASTScale.parse_impl(ASTOp.java:906) at water.rapids.Exec.parse(Exec.java:101) at water.rapids.ASTAssign.parse_impl(AST.java:701) at water.rapids.ASTAssign.parse_impl(AST.java:672) at water.rapids.Exec.parse(Exec.java:101) at water.rapids.Exec.exec(Exec.java:64) at water.api.RapidsHandler.exec(RapidsHandler.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at water.api.Handler.handle(Handler.java:56) at water.api.RequestServer.handle(RequestServer.java:677) at water.api.RequestServer.serve(RequestServer.java:614) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:438) at java.lang.Thread.run(Thread.java:745)

    JIRA | 1 year ago | Eric Eckstrand
    java.lang.ClassCastException: water.rapids.ASTLongList cannot be cast to water.rapids.ASTId

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      water.rapids.ValId cannot be cast to water.rapids.ValFrame

      at water.rapids.Env.peekAry()
    2. water.rapids
      Exec.exec
      1. water.rapids.Env.peekAry(Env.java:142)
      2. water.rapids.ASTAssign.exec(AST.java:874)
      3. water.rapids.AST.treeWalk(AST.java:68)
      4. water.rapids.Exec.exec(Exec.java:74)
      4 frames
    3. water.api
      RapidsHandler.exec
      1. water.api.RapidsHandler.exec(RapidsHandler.java:47)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    5. water.api
      RequestServer.serve
      1. water.api.Handler.handle(Handler.java:55)
      2. water.api.RequestServer.handle(RequestServer.java:479)
      3. water.api.RequestServer.serve(RequestServer.java:457)
      3 frames
    6. water
      NanoHTTPD$HTTPSession.run
      1. water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:432)
      1 frame
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame