Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
TIBCO Spotfire Statistics Services (TSSS) server configured to use open-source R engine fails to start with error "java.lang.IllegalStateException: Required R executable file is not found" in SplusServer.log
Solution:
TIBCO Spotfire Statistics Services (TSSS) instance configured to use open-source R engine fails to start, with the following error in SplusServer.log :
java.lang.IllegalStateException: Required R executable file is not found: C:/Program Files/R/R-3.5.2/bin/bin/R.exe
The SplusServer.log will have the following log entries when the service fails to start:
2019-11-20 16:06:05,197 | ERROR | | ContextLoader | Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clusterMessageListener' defined in class path resource [applicationContextClusterAdmin.xml]: Cannot resolve reference to bean 'jobService' while setting bean property 'jobQueuer'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobService' defined in class path resource [applicationContext-job-execution.xml]: Cannot resolve reference to bean 'jobExecutionThreadPool' while setting bean property 'jobExecutionThreadPool'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'splusMessageServerInitializer' defined in class path resource [applicationContext-job-execution.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Required R executable file is not found: C:/Program Files/R/R-3.5.2/bin/bin/R.exe
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:638)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobService' defined in class path resource [applicationContext-job-execution.xml]: Cannot resolve reference to bean 'jobExecutionThreadPool' while setting bean property 'jobExecutionThreadPool'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'splusMessageServerInitializer' defined in class path resource [applicationContext-job-execution.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Required R executable file is not found: C:/Program Files/R/R-3.5.2/bin/bin/R.exe
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 28 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'splusMessageServerInitializer' defined in class path resource [applicationContext-job-execution.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Required R executable file is not found: C:/Program Files/R/R-3.5.2/bin/bin/R.exe
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 38 more
Caused by: java.lang.IllegalStateException: Required R executable file is not found: C:/Program Files/R/R-3.5.2/bin/bin/R.exe
at com.insightful.splusserver.engine.support.r.REngineSupport.checkIsValidRHomeDir(REngineSupport.java:65)
at com.insightful.splusserver.engine.support.r.REngineSupport.getRHomeDirectory(REngineSupport.java:23)
at com.insightful.splusserver.engine.support.r.REngineSupport.getEngineHomeDirectory(REngineSupport.java:206)
at com.insightful.splusserver.engine.splusengine.SplusMessageServerInitializer.checkPreconditions(SplusMessageServerInitializer.java:71)
at com.insightful.splusserver.engine.splusengine.SplusMessageServerInitializer.init(SplusMessageServerInitializer.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
The reason for this error is because the path to the open-source R installation is configured incorrectly in TSSS. It is always required to use the path of the open-source R installation, up to the level of its version number.
For example :
On Windows OS, if open-source R version 3.5.2 is installed in "C:\Program Files\R\R-3.5.2" folder location, this entire path needs to be configured in TSSS.
There is no need to configure the path to the R executable (i.e., C:\Program Files\R\R-3.5.2\bin\R.exe) as TSSS automatically appends the string "\bin\R.exe" to the configured R path. This is as designed. Configuring the R path up to the level of its version number (C:\Program Files\R\R-3.5.2) will allow TSSS to read the R executable path correctly as C:\Program Files\R\R-3.5.2\bin\R.exe
Configuring the path incorrectly will not allow TSSS to read R executable path correctly. For example, in the above log example the path was configured as 'C:\Program Files\R\R-3.5.2\bin' due to which TSSS reads the R executable path as 'C:/Program Files/R/R-3.5.2/bin/bin/R.exe' which was an incorrect location.
To resolve, ensure that the open-source R engine path has been configured correctly up to its version number.
For example, if open-source R version 3.5.2 has been installed in "C:\Program Files\R\R-3.5.2" folder location on Windows, use the path as it is to configure in TSSS as shown in below image.
On Windows, the open-source R path needs to be configured for java property 'Dspserver.rhome' (as shown in the above image).
Note that any extra characters (even a space at the very end of the line) will break the java property specification and make it throw an error.
On Linux, the path must be be configured for property 'SPSERVER_RHOME' in the SPSERVER_HOME/init.d/spserver file.
For detailed instructions on configuring an open-source R engine, refer to the TSSS installation manual here
Note: Open-source R is available under separate open source software license terms and is not part of the TIBCO Spotfire product line. As such, R is not within the scope of your license for any TIBCO Spotfire product. R is not supported, maintained, or warranted in any way by TIBCO Software Inc. Download and use of R is solely at your own discretion and subject to the free open source license terms applicable to R.
Doc : System requirement page to know the tested open-source R versions for given TSSS versions: Doc : Configuring an open-source R engine:
Comments
0 comments
Article is closed for comments.