On 02/08/2010 12:51 AM, Jiiindo wrote: > > Hello all, > (Thank for your reply) > I have a web-application in Apache Tomcat, when i start R in this > application, > I used packe RSJava > Code > ROmegahatInterpreter interp; > String [] rargs = {"--no-save"}; > REvaluator e; > interp = new ROmegahatInterpreter ( > ROmegahatInterpreter.fixArgs(rargs),false ); > e =new REvaluator (); > > > Errors > ================ > R version 2.10.1 (2009-12-14) > Copyright (C) 2009 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > > Natural language support but running in an English locale > > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R or R packages in publications. > > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > > > *** caught segfault *** > address 0x4, cause 'memory not mapped' > Warning: stack imbalance in 'if', 153 then 154
> Warning: stack imbalance in '{', 151 then 152 Probably additional information is needed. What version of SJava? In an R session: > library(SJava) > sessionInfo() Try to start R with fewer packages (and more quietly) with String rargs[] = {"--quiet", "--vanilla"}; Can you get as far as String [] rargs = {"--quiet", "--vanilla"}; ROmegahatInterpreter interp = new ROmegahatInterpreter ( ROmegahatInterpreter.fixArgs(rargs),false ); REvaluator e =new REvaluator (); tryCatch({ e.voidEval("library(SJava)"); e.voidEval("print(sessionInfo())"); } catch (Exception ex) { e.printStackTrack(); } ? Martin > Warning: stack imbalance in '<-', 145 then 146 > Warning: stack imbalance in 'if', 143 then 145 > Warning: stack imbalance in '{', 141 then 142 > Warning: stack imbalance in '<-', 135 then 137 > Warning: stack imbalance in 'if', 146 then 148 > Warning: stack imbalance in 'is.list', 163 then 164 > Warning: stack imbalance in '{', 144 then 145 > Warning: stack imbalance in '<-', 138 then 139 > Warning: stack imbalance in 'if', 136 then 143 > Warning: stack imbalance in 'lazyLoadDBfetch', 140 then 138 > Warning: stack imbalance in '{', 147 then 146 > Warning: stack imbalance in '||', 140 then 139 > Warning: stack imbalance in 'if', 138 then 137 > Warning: stack imbalance in '{', 133 then 135 > Warning: stack imbalance in 'if', 127 then 129 > Warning: stack imbalance in '{', 125 then 127 > Warning: stack imbalance in '[', 142 then 146 > Warning: stack imbalance in 'lazyLoadDBfetch', 128 then 138 > Warning: stack imbalance in 'lazyLoadDBfetch', 87 then 88 > Warning: stack imbalance in 'if', 112 then 111 > Warning: stack imbalance in 'inherits', 122 then 121 > Warning: stack imbalance in '.Internal', 121 then 120 > Warning: stack imbalance in 'if', 111 then 110 > Warning: stack imbalance in 'match', 110 then 108 > Warning: stack imbalance in '.Internal', 109 then 107 > Warning: stack imbalance in '<-', 103 then 100 > Warning: stack imbalance in '>', 109 then 110 > Warning: stack imbalance in '&&', 102 then 103 > Warning: stack imbalance in 'if', 100 then 101 > Warning: stack imbalance in '{', 101 then 98 > Warning: stack imbalance in 'if', 99 then 97 > Warning: stack imbalance in '<-', 84 then 85 > Warning: stack imbalance in '{', 82 then 84 > Warning: stack imbalance in 'if', 80 then 82 > > Traceback: > 1: .getClassFromCache(Class, where) > 2: getClassDef(cl) > 3: methods:::is(genfun, "genericFunction") > 4: registerS3methods(nsInfo$S3methods, package, env) > 5: loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = > keep.source) > 6: doTryCatch(return(expr), name, parentenv, handler) > 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 8: tryCatchList(expr, classes, parentenv, handlers) > 9: tryCatch(expr, error = function(e) { call <- conditionCall(e) if > (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) > > call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- > paste("Error in", dcall, ": ") LONG <- 75L msg <- > conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + > nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) > > w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = > "b") if (w > LONG) prefix <- paste(prefix, "\n ", sep = > "") } else prefix <- "Error : " msg <- paste(prefix, > conditionMessage(e), "\n", sep = "") .Internal(seterrmessage(msg[1L])) > if (!silent && identical(getOption("show.error.messages"), TRUE)) { > > cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } > invisible(structure(msg, class = "try-error"))}) > 10: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc), > keep.source = keep.source) dataPath <- file.path(which.lib.loc, package, > "data") env <- attachNamespace(ns, pos = pos, dataPath = dataPath)}) > 11: library(package, lib.loc = lib.loc, character.only = TRUE, > logical.return = TRUE, warn.conflicts = warn.conflicts, keep.source = > keep.source) > 12: require(pkg, quietly = TRUE, warn.conflicts = FALSE, character.only = > TRUE, save = FALSE) > 13: .First.sys() > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > > *** caught segfault *** > address 0x4, cause 'memory not mapped' > > Traceback: > 1: nchar(dcall, type = "w") > 2: value[[3L]](cond) > 3: tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 4: tryCatchList(expr, classes, parentenv, handlers) > 5: tryCatch(expr, error = function(e) { call <- conditionCall(e) if > (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) > > call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- > paste("Error in", dcall, ": ") LONG <- 75L msg <- > conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + > nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) > > w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = > "b") if (w > LONG) prefix <- paste(prefix, "\n ", sep = > "") } else prefix <- "Error : " msg <- paste(prefix, > conditionMessage(e), "\n", sep = "") .Internal(seterrmessage(msg[1L])) > if (!silent && identical(getOption("show.error.messages"), TRUE)) { > > cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } > invisible(structure(msg, class = "try-error"))}) > 6: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc), > keep.source = keep.source) dataPath <- file.path(which.lib.loc, package, > "data") env <- attachNamespace(ns, pos = pos, dataPath = dataPath)}) > 7: library(package, lib.loc = lib.loc, character.only = TRUE, > logical.return = TRUE, warn.conflicts = warn.conflicts, keep.source = > keep.source) > 8: require(pkg, quietly = TRUE, warn.conflicts = FALSE, character.only = > TRUE, save = FALSE) > 9: .First.sys() > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > Error in get(Info[i, 1], envir = env) : invalid 'inherits' argument > During startup - Warning message: > package stats in options("defaultPackages") was not found > Selection: readline: readline_callback_read_char() called with no handler! > 1 > bash: 1: command not found > -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.