Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3554

ERROR: Unable to create cache directory (felix bundle cache)... $ROO_HOME/cache not writeable ... should use $HOME/.roo/cache

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.2.5.RELEASE
    • Fix Version/s: None
    • Component/s: @ CORE
    • Labels:
      None

      Description

      when installing Roo with a shared account (soft, root..), and running it with another account, the startup of bin/roo.sh failed ... application is NOT usable at all !!

      $ roo.sh 
      ERROR: Unable to create cache directory: /opt/soft/spring-roo-1.2.5.RELEASE/cache
      ERROR: Error creating bundle cache. (java.lang.RuntimeException: Unable to create cache directory.)
      java.lang.RuntimeException: Unable to create cache directory.
      	at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:107)
      	at org.apache.felix.framework.Felix.init(Felix.java:599)
      	at org.springframework.roo.bootstrap.Main.main(Main.java:284)
      Could not create framework: org.osgi.framework.BundleException: Error creating bundle cache.
      org.osgi.framework.BundleException: Error creating bundle cache.
      	at org.apache.felix.framework.Felix.init(Felix.java:604)
      	at org.springframework.roo.bootstrap.Main.main(Main.java:284)
      Caused by: java.lang.RuntimeException: Unable to create cache directory.
      	at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:107)
      	at org.apache.felix.framework.Felix.init(Felix.java:599)
      	... 1 more
      

      A ugly but fully fonctionnal work-around found in some forums is to copy&paste roo into your own directory with your account (ROO_HOME becomes a writeable dir for you), but it is not practical for doing share installation.

      I have tried unsuccesfully to edit the file "conf/config.properties" to add "
      felix.cache.rootdir=${user.home}/.felix"
      and I have tried also unsuccesfully to change the bin/roo.sh startup script :
      ( the behavior is very strange : no log, no error, but nothing happens, all thread are waiting and nothing comes)

      ROO_OSGI_FRAMEWORK_STORAGE="$HOME/.roo/cache"
      # ... was before : ROO_OSGI_FRAMEWORK_STORAGE="$ROO_HOME/cache"
      # echo "ROO_OSGI_FRAMEWORK_STORAGE: $ROO_OSGI_FRAMEWORK_STORAGE"
      
      ROO_AUTO_DEPLOY_DIRECTORY="$HOME/.roo/bundle"
      # ... was before : ROO_AUTO_DEPLOY_DIRECTORY="$ROO_HOME/bundle"
      # echo "ROO_AUTO_DEPLOY_DIRECTORY: $ROO_AUTO_DEPLOY_DIRECTORY"
      

      Any idea for the best way to fix ?

        Attachments

          Activity

            People

            Assignee:
            jcgarcia Juan Carlos García del Canto
            Reporter:
            arnaud.nauwynck Arnaud Nauwynck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: