Renjin 'IOException on Load Package on Elastic Beanstalk



我有一个依赖于Renjin + Forecast软件包的解决方案,该软件包可以在本地或亚马逊中的典型EC2服务器上工作。但是,在弹性 betalk 环境中部署相同的解决方案时,我在初始化预测包时收到以下错误:

private InstanciaRenjin() throws Exception {
RenjinScriptEngineFactory factory = new RenjinScriptEngineFactory();
engine = factory.getScriptEngine();
engine.eval("rm(list = ls())");
engine.eval("library(forecast)");
engine.eval("library(hts)");
engine.eval("library(rpart)");
}

当在本地/常规 EC2 服务器上调用第engine.eval("library(forecast)");行时,库将加载并正常运行。但是,在通过 64 位 Amazon Linux/2.7.5 为 Java 8 配置的 Elastic Beanstalk 上,我收到以下错误:

org.renjin.eval.EvalException: IOException while loading package org.renjin.cran:forecast: IOException while loading package org.renjin.cran:tseries: IOException while loading package org.renjin.cran:quantmod: IOException while loading package org.renjin.cran:TTR: IOException while loading package org.renjin.cran:curl: Could not replicate "file:///var/app/current/application.jar!/BOOT-INF/lib/renjin-core-0.9.2692.jar" as it does not exist.
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:224) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryGetNamespace(NamespaceRegistry.java:182) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:144) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:112) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.Packages.library(Packages.java:39) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.R$primitive$library.doApply(R$primitive$library.java:73) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.R$primitive$library.apply(R$primitive$library.java:34) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.special.InternalFunction.apply(InternalFunction.java:45) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:38) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:198) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.sexp.Closure.doApply(Closure.java:98) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.ClosureDispatcher.apply(ClosureDispatcher.java:80) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.ClosureDispatcher.applyClosure(ClosureDispatcher.java:51) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.sexp.Closure.apply(Closure.java:83) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateExpressionVector(Context.java:390) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:280) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:168) ~[renjin-script-engine-0.9.2692.jar!/:na]
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:127) ~[renjin-script-engine-0.9.2692.jar!/:na]
at com.opsfactor.planning.support.utility.InstanciaRenjin.<init>(InstanciaRenjin.java:47) ~[support-0.1.0.jar!/:na]
at com.opsfactor.planning.support.utility.InstanciaRenjin.getInstance(InstanciaRenjin.java:32) ~[support-0.1.0.jar!/:na]
at com.opsfactor.planning.routines.planning.demand.DemandPlanning.geraDemandPlanDFUAgregado(DemandPlanning.java:45) ~[routines-0.1.0.jar!/:na]
at com.opsfactor.planning.services.planning.DemandPlanningService.geraDemandPlanDFUAgregadoComForecast(DemandPlanningService.java:276) ~[services-0.1.0.jar!/:0.1.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:871) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:777) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:870) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855) [spring-webmvc-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-5.0.0.RC1.jar!/:5.0.0.RC1]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.1.RELEASE.jar!/:5.0.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_181]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.23.jar!/:8.5.23]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
Caused by: org.renjin.eval.EvalException: IOException while loading package org.renjin.cran:tseries: IOException while loading package org.renjin.cran:quantmod: IOException while loading package org.renjin.cran:TTR: IOException while loading package org.renjin.cran:curl: Could not replicate "file:///var/app/current/application.jar!/BOOT-INF/lib/renjin-core-0.9.2692.jar" as it does not exist.
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:224) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryGetNamespace(NamespaceRegistry.java:182) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:144) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:112) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.Namespace.initImports(Namespace.java:202) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:208) ~[renjin-core-0.9.2692.jar!/:na]
... 116 common frames omitted
Caused by: org.renjin.eval.EvalException: IOException while loading package org.renjin.cran:quantmod: IOException while loading package org.renjin.cran:TTR: IOException while loading package org.renjin.cran:curl: Could not replicate "file:///var/app/current/application.jar!/BOOT-INF/lib/renjin-core-0.9.2692.jar" as it does not exist.
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:224) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryGetNamespace(NamespaceRegistry.java:182) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:144) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:112) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.Namespace.initImports(Namespace.java:202) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:208) ~[renjin-core-0.9.2692.jar!/:na]
... 121 common frames omitted
Caused by: org.renjin.eval.EvalException: IOException while loading package org.renjin.cran:TTR: IOException while loading package org.renjin.cran:curl: Could not replicate "file:///var/app/current/application.jar!/BOOT-INF/lib/renjin-core-0.9.2692.jar" as it does not exist.
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:224) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryGetNamespace(NamespaceRegistry.java:182) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:144) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:112) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.Namespace.initImports(Namespace.java:202) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:208) ~[renjin-core-0.9.2692.jar!/:na]
... 126 common frames omitted
Caused by: org.renjin.eval.EvalException: IOException while loading package org.renjin.cran:curl: Could not replicate "file:///var/app/current/application.jar!/BOOT-INF/lib/renjin-core-0.9.2692.jar" as it does not exist.
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:224) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryGetNamespace(NamespaceRegistry.java:182) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:144) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.getNamespace(NamespaceRegistry.java:112) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.Namespace.initImports(Namespace.java:202) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:208) ~[renjin-core-0.9.2692.jar!/:na]
... 131 common frames omitted
Caused by: org.renjin.eval.EvalException: Could not replicate "file:///var/app/current/application.jar!/BOOT-INF/lib/renjin-core-0.9.2692.jar" as it does not exist.
at org.renjin.primitives.R$primitive$file$exists.apply(R$primitive$file$exists.java:46) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.special.InternalFunction.apply(InternalFunction.java:45) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:198) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.sexp.Closure.doApply(Closure.java:98) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.ClosureDispatcher.apply(ClosureDispatcher.java:80) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.ClosureDispatcher.applyClosure(ClosureDispatcher.java:51) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.sexp.Closure.apply(Closure.java:83) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.Comparison.and(Comparison.java:82) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.R$primitive$$amp$amp.doApply(R$primitive$$amp$amp.java:68) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.R$primitive$$amp$amp.apply(R$primitive$$amp$amp.java:29) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.special.IfFunction.apply(IfFunction.java:34) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.special.BeginFunction.apply(BeginFunction.java:38) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:198) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.sexp.Closure.doApply(Closure.java:98) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.ClosureDispatcher.apply(ClosureDispatcher.java:80) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.ClosureDispatcher.applyClosure(ClosureDispatcher.java:51) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.sexp.Closure.apply(Closure.java:83) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluateCall(Context.java:407) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:282) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.evaluate(Context.java:264) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.packaging.NamespaceRegistry.tryLoad(NamespaceRegistry.java:214) ~[renjin-core-0.9.2692.jar!/:na]
... 136 common frames omitted
Caused by: org.apache.commons.vfs2.FileSystemException: Could not replicate "file:///var/app/current/application.jar!/BOOT-INF/lib/renjin-core-0.9.2692.jar" as it does not exist.
at org.apache.commons.vfs2.provider.AbstractFileSystem.replicateFile(AbstractFileSystem.java:418) ~[commons-vfs2-2.0.jar!/:2.0]
at org.renjin.eval.vfs.FastJarFileSystem.<init>(FastJarFileSystem.java:55) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.vfs.FastJarFileProvider.doCreateFileSystem(FastJarFileProvider.java:68) ~[renjin-core-0.9.2692.jar!/:na]
at org.apache.commons.vfs2.provider.AbstractLayeredFileProvider.createFileSystem(AbstractLayeredFileProvider.java:89) ~[commons-vfs2-2.0.jar!/:2.0]
at org.apache.commons.vfs2.provider.AbstractLayeredFileProvider.findFile(AbstractLayeredFileProvider.java:63) ~[commons-vfs2-2.0.jar!/:2.0]
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:693) ~[commons-vfs2-2.0.jar!/:2.0]
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:649) ~[commons-vfs2-2.0.jar!/:2.0]
at org.renjin.eval.Session.resolveFile(Session.java:323) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.eval.Context.resolveFile(Context.java:459) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.files.Files.fileExists(Files.java:245) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.R$primitive$file$exists.doApply(R$primitive$file$exists.java:86) ~[renjin-core-0.9.2692.jar!/:na]
at org.renjin.primitives.R$primitive$file$exists.apply(R$primitive$file$exists.java:35) ~[renjin-core-0.9.2692.jar!/:na]
... 171 common frames omitted

应用程序正在部署为 Jar。我们为错误消息中引用的 R 包(tseries、ttr、quantmod、curl(提供了其他依赖项,但无济于事:

<dependency>
<groupId>org.renjin</groupId>
<artifactId>renjin-script-engine</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>forecast</artifactId>
<version>8.4-b25</version>
</dependency>
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>hts</artifactId>
<version>5.1.5-b5</version>
</dependency>
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>rpart</artifactId>
<version>4.1-13-b18</version>
</dependency>
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>tseries</artifactId>
<version>0.10-45-b13</version>
</dependency>
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>quantmod</artifactId>
<version>0.4-13-b23</version>
</dependency>
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>TTR</artifactId>
<version>0.23-3-b18</version>
</dependency>
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>curl</artifactId>
<version>2.7-renjin-b8</version>
</dependency>
<!-- FIM RENJIN E PACOTES R -->
</dependencies>
<repositories>
<repository>
<id>bedatadriven</id>
<name>bedatadriven public repo</name>
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
</repository>
</repositories>

jar 文件包括所有必要的库(renjin 和 R 包(和正确的版本。可能会发生什么?

这看起来像是 Renjin 中的一个错误,与在沙盒环境中访问包资源的方式有关。

我正在这里修复:

https://github.com/bedatadriven/renjin/tree/servlet-resources

带有此修复程序的版本应该很快就会推出。

最新更新