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,
  • I wasn't sure if this exception was the right one for unsupported operations..it seemed different than the other exceptions exec_query parameters: {'str': 'z.hex=r1.hex = r1.hex + r2.hex[1,];'} [2014-02-14 20:20:15.700311] ERROR 08:20:17.468 # Session ERRR WATER: [2014-02-14 20:20:17.472303] + java.lang.IllegalArgumentException: Arrays must be same size: {Year,Month,DayofMonth,DayOfWeek,DepTime,CRSDepTime,ArrTime,CRSArrTime,UniqueCarrier,FlightNum,TailNum,ActualElapsedTime,CRSElapsedTime,AirTime,ArrDelay,DepDelay,Origin,Dest,Distance,TaxiIn,TaxiOut,Cancelled,CancellationCode,Diverted,CarrierDelay,WeatherDelay,NASDelay,SecurityDelay,LateAircraftDelay,IsArrDelayed,IsDepDelayed}, 132.5 MB [2014-02-14 20:20:17.472502] + Chunk starts: {0,40173,80095,120177,160150,200453,240974,281324,321737,361707,401883,442600,483233,523722,563651,603745,643779,683999,724440,764818,805288,845254,885590,926432,966986,1007384,1047200,1087259,1127321,1167374,1207739,1248219,1288593,1329059,1368947,1409135,1449864,1490301,1530804,1571050,1610899,1651019,1690955,1731171,1771516,1811975,1852389,1892497,1932569,1973004,2013530,2054029,2094443,2134203,2174353,2214465,2254582,2294946,2335503,2375811,2416250,2456056,2496287,2536969,2577397,2617844,2658012,2697848,2737902,2777734,2817831,2858125,2898543,2938819,2979092,3018852,3058985,3099683,3140100,3180426,3220430,3260429,3300375,3340209,3380342,3420600,3461083,3501400,3541664,3581396,3621500,3662182,} vs {Year,Month,DayofMonth,DayOfWeek,DepTime,CRSDepTime,ArrTime,CRSArrTime,UniqueCarrier,FlightNum,TailNum,ActualElapsedTime,CRSElapsedTime,AirTime,ArrDelay,DepDelay,Origin,Dest,Distance,TaxiIn,TaxiOut,Cancelled,CancellationCode,Diverted,CarrierDelay,WeatherDelay,NASDelay,SecurityDelay,LateAircraftDelay,IsArrDelayed,IsDepDelayed}, 2.4 KB [2014-02-14 20:20:17.472691] + Chunk starts: {0,} [2014-02-14 20:20:17.472747] + at water.exec.ASTBinOp.apply(ASTOp.java:509) [2014-02-14 20:20:17.472791] + at water.exec.ASTApply.exec(AST.java:193) [2014-02-14 20:20:17.472840] + at water.exec.ASTAssign.exec(AST.java:415) [2014-02-14 20:20:17.472886] + at water.exec.ASTAssign.exec(AST.java:415) [2014-02-14 20:20:17.472932] + at water.exec.ASTStatement.exec(AST.java:72) [2014-02-14 20:20:17.472978] + at water.exec.Exec2.exec(Exec2.java:100) [2014-02-14 20:20:17.473024] + at water.api.Exec2.serve(Exec2.java:34) [2014-02-14 20:20:17.473069] + at water.api.Request.serveGrid(Request.java:129) [2014-02-14 20:20:17.473116] + at water.Request2.superServeGrid(Request2.java:466) [2014-02-14 20:20:17.473163] + at water.api.Exec2.serveGrid(Exec2.java:71) [2014-02-14 20:20:17.473208] + at water.api.Request.serve(Request.java:108) [2014-02-14 20:20:17.473253] + at water.api.RequestServer.serve(RequestServer.java:315) [2014-02-14 20:20:17.473301] + at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421) [2014-02-14 20:20:17.473348] + at java.lang.Thread.run(Thread.java:744) [2014-02-14 20:20:17.473394] ERROR
    via by Kevin Normoyle,
    • java.lang.IllegalArgumentException: Unknown var c.hex + Result0.hex = c.hex[,c(1)] + ^----^ + at water.exec.Exec2.throwErr(Exec2.java:216) at water.exec.ASTAssign.parseNew(AST.java:397) at water.exec.AST.parseCXExpr(AST.java:23) 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:129) at water.exec.Exec2.exec(Exec2.java:102) 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:317) at water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:421) at java.lang.Thread.run(Thread.java:744)
    No Bugmate found.