Jump to content
We've recently updated our Privacy Statement, available here ×

Error installing JasperReports Server as non-root user


Recommended Posts

I am trying to install jasper reports server on a RHEL 5 machine as a non-root user.

I am getting a lot of errors that look like the following,

Caused by: org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'dataSnapshotCachingService' defined infile[/home/josesm/jasperreports-server-cp-5.5.0/buildomatic/conf_source/ieCe/applicationContext-data-snapshots.xml]:Cannot create inner bean'org.springframework.cache.ehcache.EhCacheFactoryBean#43b12dbb' of type[org.springframework.cache.ehcache.EhCacheFactoryBean] while settingbean property 'contentsCache'; nested exception isorg.springframework.beans.factory.BeanCreationException: Error creatingbean with name'org.springframework.cache.ehcache.EhCacheFactoryBean#43b12dbb' definedin file[/home/josesm/jasperreports-server-cp-5.5.0/buildomatic/conf_source/ieCe/applicationContext-data-snapshots.xml]:Invocation of init method failed; nested exception isnet.sf.ehcache.CacheException: java.io.IOException: Permission denied[java] atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)[java] atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[java] atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)[java] atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)[java] atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)[java] atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)[java] atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)[java] ... 160 more [java] Caused by:org.springframework.beans.factory.BeanCreationException: Error creatingbean with name'org.springframework.cache.ehcache.EhCacheFactoryBean#43b12dbb' definedin file[/home/josesm/jasperreports-server-cp-5.5.0/buildomatic/conf_source/ieCe/applicationContext-data-snapshots.xml]:Invocation of init method failed; nested exception isnet.sf.ehcache.CacheException: java.io.IOException: Permission denied[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[java] atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)[java] ... 170 more [java] Caused by: net.sf.ehcache.CacheException:java.io.IOException: Permission denied [java] atnet.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:331)[java] atnet.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:145)[java] atnet.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)[java] atnet.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)[java] atnet.sf.ehcache.store.disk.DiskStorageFactory.<init>(DiskStorageFactory.java:125)[java] atnet.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:156) [java] atnet.sf.ehcache.store.DiskBackedMemoryStore.createDiskStore(DiskBackedMemoryStore.java:61)[java] atnet.sf.ehcache.store.DiskBackedMemoryStore.create(DiskBackedMemoryStore.java:49)[java] at net.sf.ehcache.Cache.initialise(Cache.java:1097) [java] atnet.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1298)[java] atnet.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1329)[java] at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1227)[java] atorg.springframework.cache.ehcache.EhCacheFactoryBean.afterPropertiesSet(EhCacheFactoryBean.java:332)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)[java] atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)[java] ... 173 more [java] Caused by: java.io.IOException: Permissiondenied [java] at java.io.UnixFileSystem.createFileExclusively(NativeMethod) [java] at java.io.File.createNewFile(File.java:947) [java] atnet.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:322)[java] ... 187 more[/code]

 

I have seen several posts pointing to this link as as solution, http://community.jaspersoft.com/wiki/javaioioexception-permission-denied-when-running-js-export-non-root-user

This information does not seem to help me.  I tried creating a directory /temp and gave it permissions 777 but the errors continue.

The file specified is buildomatic/conf_source/iePro/applicationContext-web-services.xml but I am not using the Pro version.  The file buildomatic/conf_source/ieCe/applicationContext-web-services.xml does not exist.  I found a file by same name in WEB-INF which does have a tempFolder property.  I tried changing it from temp to tmp and ran <js-install>/js-install-ce.sh but the errors still exist.

Does anyone know what else could be wrong or have an advice on something I may be overlooking?   Thanks!

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

You should install JRS as a non-root user. To achieve the aim of non-root execution of the tomcat process, our in house installation expert has suggested the following approach:

 

1) login as a non-root user (ie testuser)

 

2) run through the standard installer screens (the default install location /opt would normally have enough permissions to allow the testuser to install)

 

3) start JRS after the install

(<js-install-dir>/ctlscript.sh start

 

Now, the user will see two processes:

testuser apache-tomcat process

postgres postgres database process

 

Postgresql is a little unusual in that it actually creates a user named "postgres" when it installs and initializes itself. And then the process runs under this user. But apache tomcat is more simple and simply runs under the user who starts the process. So, the point is to *not* install as the root user.[/code]

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...