java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • from the console: testfun <- function(df){ somevar1 <- max(df[,4]) } ^^ works testfun <- function(df){ somevar1 <- max(df[,4]) somevar2 <- min(df[,4]) } fails EDIT: NB, we need to accept functions w/ newlines in them 02:47:45.980 # Session ERRR WATER: + java.lang.IllegalArgumentException: Missing '}' + testfun <- function(df){ + + somevar1 <- max(df[,4]) + somevar2 <- min(df[,4])} + ^-------------------------------------^ + + at water.exec.Exec2.throwErr(Exec2.java:217) + at water.exec.Exec2.xpeek(Exec2.java:154) + at water.exec.ASTFunc.parseFcn(ASTFunc.java:51) + at water.exec.ASTOp.parse(ASTOp.java:226) + at water.exec.AST.parseVal(AST.java:39) + at water.exec.ASTApply.parsePrefix(AST.java:114) + at water.exec.ASTSlice.parse(AST.java:205) + at water.exec.ASTApply.parseInfix(AST.java:156) + at water.exec.AST.parseCXExpr(AST.java:22) + at water.exec.ASTAssign.parseNew(AST.java:402) + at water.exec.AST.parseCXExpr(AST.java:23) + at water.exec.ASTStatement.parse(AST.java:59) + at water.exec.Exec2.parse(Exec2.java:130) + at water.exec.Exec2.exec(Exec2.java:103) + at water.api.Exec2.serve(Exec2.java:34) + at water.api.Request.serveGrid(Request.java:129) + at water.Request2.superServeGrid(Request2.java:472) + at water.api.Exec2.serveGrid(Exec2.java:71) + at water.api.Request.serve(Request.java:108) + at water.api.RequestServer.serve(RequestServer.java:315) + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421) + at java.lang.Thread.run(Thread.java:724)
    via by Earl Hathaway,
  • I create Result3 as the copy of a data frame I do a column assign then I assign a scalar exec result to it. Normally scalars are not preserved when you leave exec When I then assign to Result3 col 1 in the next exec, exec says Result3 no longer exists I don't know what's the definition of correct here or how it affects h2o use in R (and python?) here's the sequence c.hex is a parsed data frame 2014-07-27 10:42:21.811949 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3 = c.hex 2014-07-27 10:42:23.918369 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 2014-07-27 10:42:24.372282 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3 = min(c.hex[,35]) 2014-07-27 10:42:24.548722 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 10:42:24.559 # Session ERRR WATER: + java.lang.IllegalArgumentException: Unknown var Result3 + Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 + ^------^ + + at water.exec.Exec2.throwErr(Exec2.java:262) + at water.exec.ASTAssign.parseNew(AST.java:435) + at water.exec.AST.parseCXExpr(AST.java:26) + at water.exec.ASTStatement.parse(AST.java:72) + at water.exec.Exec2.parse(Exec2.java:137) + at water.exec.Exec2.exec(Exec2.java:111) + at water.api.Exec2.serve(Exec2.java:35) + at water.api.Request.serveGrid(Request.java:168) + at water.Request2.superServeGrid(Request2.java:495) + at water.api.Exec2.serveGrid(Exec2.java:78) + at water.api.Request.serve(Request.java:145) + at water.api.RequestServer.serve(RequestServer.java:553) + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:425) + at java.lang.Thread.run(Thread.java:744)
    via by Kevin Normoyle,
  • from the console: testfun <- function(df){ somevar1 <- max(df[,4]) } ^^ works testfun <- function(df){ somevar1 <- max(df[,4]) somevar2 <- min(df[,4]) } fails EDIT: NB, we need to accept functions w/ newlines in them 02:47:45.980 # Session ERRR WATER: + java.lang.IllegalArgumentException: Missing '}' + testfun <- function(df){ + + somevar1 <- max(df[,4]) + somevar2 <- min(df[,4])} + ^-------------------------------------^ + + at water.exec.Exec2.throwErr(Exec2.java:217) + at water.exec.Exec2.xpeek(Exec2.java:154) + at water.exec.ASTFunc.parseFcn(ASTFunc.java:51) + at water.exec.ASTOp.parse(ASTOp.java:226) + at water.exec.AST.parseVal(AST.java:39) + at water.exec.ASTApply.parsePrefix(AST.java:114) + at water.exec.ASTSlice.parse(AST.java:205) + at water.exec.ASTApply.parseInfix(AST.java:156) + at water.exec.AST.parseCXExpr(AST.java:22) + at water.exec.ASTAssign.parseNew(AST.java:402) + at water.exec.AST.parseCXExpr(AST.java:23) + at water.exec.ASTStatement.parse(AST.java:59) + at water.exec.Exec2.parse(Exec2.java:130) + at water.exec.Exec2.exec(Exec2.java:103) + at water.api.Exec2.serve(Exec2.java:34) + at water.api.Request.serveGrid(Request.java:129) + at water.Request2.superServeGrid(Request2.java:472) + at water.api.Exec2.serveGrid(Exec2.java:71) + at water.api.Request.serve(Request.java:108) + at water.api.RequestServer.serve(RequestServer.java:315) + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421) + at java.lang.Thread.run(Thread.java:724)
    via by Earl Hathaway,
  • I create Result3 as the copy of a data frame I do a column assign then I assign a scalar exec result to it. Normally scalars are not preserved when you leave exec When I then assign to Result3 col 1 in the next exec, exec says Result3 no longer exists I don't know what's the definition of correct here or how it affects h2o use in R (and python?) here's the sequence c.hex is a parsed data frame 2014-07-27 10:42:21.811949 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3 = c.hex 2014-07-27 10:42:23.918369 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 2014-07-27 10:42:24.372282 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3 = min(c.hex[,35]) 2014-07-27 10:42:24.548722 -- Start http://192.168.0.34:54321/2/Exec2.json?str=Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 10:42:24.559 # Session ERRR WATER: + java.lang.IllegalArgumentException: Unknown var Result3 + Result3[,1] = (c.hex[,2]==0) ? 54321 : 54321 + ^------^ + + at water.exec.Exec2.throwErr(Exec2.java:262) + at water.exec.ASTAssign.parseNew(AST.java:435) + at water.exec.AST.parseCXExpr(AST.java:26) + at water.exec.ASTStatement.parse(AST.java:72) + at water.exec.Exec2.parse(Exec2.java:137) + at water.exec.Exec2.exec(Exec2.java:111) + at water.api.Exec2.serve(Exec2.java:35) + at water.api.Request.serveGrid(Request.java:168) + at water.Request2.superServeGrid(Request2.java:495) + at water.api.Exec2.serveGrid(Exec2.java:78) + at water.api.Request.serve(Request.java:145) + at water.api.RequestServer.serve(RequestServer.java:553) + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:425) + at java.lang.Thread.run(Thread.java:744)
    via by Kevin Normoyle,
    • java.lang.IllegalArgumentException: Assigning a ary into 'aa' which is a dbl + func11 = function(x,y,z,rhex){ a0=aa=!0; x=!0; + a1=x=!0; !x+2; + a2=rhex[,1]; + a3=1.23; + a4=rhex-rhex; + a5=x=0; x+2; + a6=1.23<!2.34; + a7=sum(1,rhex,3); + a8=rhex-rhex; + a9=rhex[nrow(rhex)-1,ncol(rhex)-1]; + a10=max(1,23); + a11=aa=c(11,22,33,44,55,66); aa[c(2,6,1),]; + }(0,0,0,rhex) + ^--------------------^ + at water.exec.Exec2.throwErr(Exec2.java:262) at water.exec.ASTAssign.parse(AST.java:414) at water.exec.AST.parseCXExpr(AST.java:27) at water.exec.ASTAssign.parseNew(AST.java:437)
    No Bugmate found.