Studio tools BuildEAR command fails with java.io.IOException

Studio tools BuildEAR command fails with java.io.IOException

book

Article ID: KB0080143

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -

Description

When using Jenkins to build the BusinessEvents project and running the buildEAR using studio-tools below error occurs.
***  Error excerpt*****************
java.lang.RuntimeException: Error initializing storage.
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:77)
        at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:295)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.io.IOException: Permission denied
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createTempFile(File.java:2001)
        at org.eclipse.osgi.storagemanager.StorageManager.initializeInstanceFile(StorageManager.java:187)
        at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:707)
        at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:1747)
        at org.eclipse.osgi.storage.Storage.getInfoInputStream(Storage.java:1764)
        at org.eclipse.osgi.storage.Storage.<init>(Storage.java:124)
        at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:84)
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:75)
        ... 11 more

Issue/Introduction

Studio tools BuildEAR command fails with java.io.IOException

Environment

TIBCO BusinessEvents Enterprise Edition 5.x All Operating Systems

Resolution

During the studio-tools ear creation process , it will create temporary files in $BE_HOME/studio/bin/be directory.
If any other user who does not have sufficient permission to access this $BE_HOME/studio/bin/be directory then the ear creation will fail during the runtime.
please provide 777 to $BE_HOME/studio/bin directory and re-run the studio-tools buildEAR command.
        
Additionally the BusinessEvents eclipse storage is located in below directories  
+++
$BE_HOME\eclipse-platform\eclipse\configuration\org.eclipse.osgi
$BE_HOME\studio\workspace
+++
Verify the above locations also for any permission related issues and validate for correct username/usergroup.