Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2607

Roo shell does not start after project creation

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.9.1.RELEASE
    • Fix Version/s: None
    • Component/s: ROO
    • Labels:
      None

      Description

      Steps to reproduce:

      • start STS with a fresh workspace
      • create a Roo project
      • delete the created Roo project (also delete the content on disk in the delete dialog)
      • create a new Roo project with the same name

      The wizard doesn't complain about anything, since there is no project in the workspace or on disc with the name. The project is then created correctly, but the Roo Shell doesn't open correctly. It stays in the mode "please standby..."

        Activity

        Hide
        Leo Dos Santos (c) added a comment -

        I think this is the same problem we used to have when you could only create one Roo project per session because of an Apache Felix deadlock. We implemented a workaround so that a separate STS/Roo cache was created per project, as opposed to having a global cache. But the problem still arises that the Roo shell will hang when (re)creating particular projects. Now I've found this reference to a deadlock fix in Felix: https://issues.apache.org/jira/browse/FELIX-3393 and I'm wondering if upgrading the Felix framework might finally fix this problem for us.

        Show
        Leo Dos Santos (c) added a comment - I think this is the same problem we used to have when you could only create one Roo project per session because of an Apache Felix deadlock. We implemented a workaround so that a separate STS/Roo cache was created per project, as opposed to having a global cache. But the problem still arises that the Roo shell will hang when (re)creating particular projects. Now I've found this reference to a deadlock fix in Felix: https://issues.apache.org/jira/browse/FELIX-3393 and I'm wondering if upgrading the Felix framework might finally fix this problem for us.
        Hide
        Martin Lippert (c) added a comment -

        Roo itself is still using Apache Felix 3.2.2, but we should try to use the latest Apache Felix 4.0.3 version to see if that helps with this.

        Show
        Martin Lippert (c) added a comment - Roo itself is still using Apache Felix 3.2.2, but we should try to use the latest Apache Felix 4.0.3 version to see if that helps with this.
        Hide
        Leo Dos Santos (c) added a comment -

        ERROR: Error creating bundle cache. (java.lang.Exception: Unable to lock bundle cache: java.nio.channels.OverlappingFileLockException)
        java.lang.Exception: Unable to lock bundle cache: java.nio.channels.OverlappingFileLockException
        at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:176)
        at org.apache.felix.framework.Felix.init(Felix.java:629)
        at org.springframework.roo.shell.eclipse.Main.start(Main.java:251)
        at org.springframework.roo.shell.eclipse.Bootstrap.start(Bootstrap.java:165)
        at org.springframework.ide.eclipse.roo.ui.internal.RooShellTab$8.run(RooShellTab.java:431)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        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:634)
        at org.springframework.roo.shell.eclipse.Main.start(Main.java:251)
        at org.springframework.roo.shell.eclipse.Bootstrap.start(Bootstrap.java:165)
        at org.springframework.ide.eclipse.roo.ui.internal.RooShellTab$8.run(RooShellTab.java:431)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        Caused by: java.lang.Exception: Unable to lock bundle cache: java.nio.channels.OverlappingFileLockException
        at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:176)
        at org.apache.felix.framework.Felix.init(Felix.java:629)
        ... 4 more

        Show
        Leo Dos Santos (c) added a comment - ERROR: Error creating bundle cache. (java.lang.Exception: Unable to lock bundle cache: java.nio.channels.OverlappingFileLockException) java.lang.Exception: Unable to lock bundle cache: java.nio.channels.OverlappingFileLockException at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:176) at org.apache.felix.framework.Felix.init(Felix.java:629) at org.springframework.roo.shell.eclipse.Main.start(Main.java:251) at org.springframework.roo.shell.eclipse.Bootstrap.start(Bootstrap.java:165) at org.springframework.ide.eclipse.roo.ui.internal.RooShellTab$8.run(RooShellTab.java:431) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 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:634) at org.springframework.roo.shell.eclipse.Main.start(Main.java:251) at org.springframework.roo.shell.eclipse.Bootstrap.start(Bootstrap.java:165) at org.springframework.ide.eclipse.roo.ui.internal.RooShellTab$8.run(RooShellTab.java:431) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.Exception: Unable to lock bundle cache: java.nio.channels.OverlappingFileLockException at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:176) at org.apache.felix.framework.Felix.init(Felix.java:629) ... 4 more
        Hide
        Martin Lippert (c) added a comment -

        Anything we can do about this?

        Show
        Martin Lippert (c) added a comment - Anything we can do about this?
        Hide
        Leo Dos Santos (c) added a comment -

        I've been diving deeper into Roo lately and I have the Felix source code to look at, so I'll revisit on Monday.

        Show
        Leo Dos Santos (c) added a comment - I've been diving deeper into Roo lately and I have the Felix source code to look at, so I'll revisit on Monday.
        Hide
        Leo Dos Santos (c) added a comment -

        When we initialize Felix, we can set the property "felix.cache.locking" to false, which will allow concurrent access to the bundle cache. Not sure how risky that is, but it's something we could consider for M2.

        I briefly considered the possibility to share one instance of the Felix framework for all of our Roo tabs/applications, but we have to seed Felix with the "roo.working.directory" property in order for Roo to know the project working directory when launched from STS.

        Show
        Leo Dos Santos (c) added a comment - When we initialize Felix, we can set the property "felix.cache.locking" to false, which will allow concurrent access to the bundle cache. Not sure how risky that is, but it's something we could consider for M2. I briefly considered the possibility to share one instance of the Felix framework for all of our Roo tabs/applications, but we have to seed Felix with the "roo.working.directory" property in order for Roo to know the project working directory when launched from STS.
        Hide
        Emre Tetik added a comment -

        How can we set the property "felix.cache.locking" to false ?

        Show
        Emre Tetik added a comment - How can we set the property "felix.cache.locking" to false ?
        Hide
        Leo Dos Santos (c) added a comment -

        You can add the property to your <roo.home>/conf/config.properties. I don't know what impact it has if you're running 2 or more Roo projects at the same time in STS, so I haven't enabled it for STS yet. It would be nice if you let could let us know how it works for you.

        Show
        Leo Dos Santos (c) added a comment - You can add the property to your <roo.home>/conf/config.properties. I don't know what impact it has if you're running 2 or more Roo projects at the same time in STS, so I haven't enabled it for STS yet. It would be nice if you let could let us know how it works for you.

          People

          • Assignee:
            Leo Dos Santos (c)
            Reporter:
            Martin Lippert (c)
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              First Response Date: