Announcement Announcement Module
Collapse
No announcement yet.
New install of STS 3.2.0/Grails 2.2.1. May be locked by another process Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • New install of STS 3.2.0/Grails 2.2.1. May be locked by another process

    Please advise if this should be in another location on the forum...

    I have recently reinstalled STS 3.2.0 with the Grails 2.2.1 extension. When I try to deploy my basic grails project it does not fully publish on the provided app server in STS. When I deploy my spring application which uses a JDBC interface it works fine, but when I remove it I get an unregistered error. I have installed STS with a Grails extension on a clean VM and all is fine, but it is not my primary development environment.

    The following are some of the errors I am seeing and would like some insight if possible on how to resolve this. I have searched the forum with no success.

    WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.grails.ide.eclipse.runonserver.GrailsAppModul eFactory:collab-todo' did not find a matching property.

    My spring app I created earlier works fine except when I remove it from the app server. I get the following error along with noticing when I add and remove my spring app the grails app goes through a repeat cycle of:


    Loading Grails 2.2.1
    | Environment set to production.....
    | Packaging Grails application....
    | Compiling 1 source files.....
    | Compiling 3 GSP files for package [collabTodo]..
    | Compiling 4 GSP files for package [databaseMigration]..
    | Building WAR file.....

    This is a larger list when I try to remove my Spring MVC app:

    Publishing failed with multiple errors
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\aopalliance-1.0.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\aspectjrt-1.6.10.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\db2jcc4.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\db2jcc_license_cisuz.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\db2jcc_license_cu.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\javax.inject-1.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\jcl-over-slf4j-1.6.6.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\jstl-1.2.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\log4j-1.2.15.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\pmrExample-0.0.1-SNAPSHOT.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\slf4j-api-1.6.6.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\slf4j-log4j12-1.6.6.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-aop-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-asm-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-beans-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-context-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-context-support-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-core-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-data-jdbc-core-1.0.0.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-expression-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-jdbc-3.0.7.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-retry-1.0.0.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-tx-3.0.7.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-web-3.1.1.RELEASE.jar. May be locked by another process.
    Could not delete C:\springsource\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\pmrMVC\WEB-INF\lib\spring-webmvc-3.1.1.RELEASE.jar. May be l

  • #2
    1) About the WAR build cycles.

    If you have server/IDE setup to automatically update apps on the server then a war build may be triggered for some changes in the grails app that we can't handle 'incrementally'. Maybe the detected changes are spurious and not real changes (i.e. some resource in the workspace changed but it isn't really something that should triggere a build / redeploy).

    We (STS developers) can probably do something about that if it is the case. I.e. if you didn't make changes that should warrant a redploy of your app to bring it up-to-date then it should be considered a bug. I can probably fix it provided I have some way to reproduce it. I need to determine what spurrious change event triggers it and then add some logic to ignore those events.

    As a workaround. You can also avoid these builds by disabling the 'auto refresh' if they are annoying to you rather than helpful:

    - double click server in the servers view
    - Expand the 'Publishing' section
    - Select 'Never Publish Automatically' option.

    2) About the locked jars.

    I haven't seen that problem before in this context. But I have seen similar errors before. On Windows unfortunately Java classloaders lock the jar files when they load classes from them. Once opened they don't close the jars. In Windows this locks the files so the jars can't be deleted. That is probably what is going on.

    What I don't understand however is why we have not had reports about this from other Windows users. So I don't know why your case would be different than other Windows users using the server deploy support in STS for Grails apps.

    Potential workaround: I think you probably will not get these errors if you stop the server before trying to remove the app. When the server is stopped, the process holding the locks will be gone. I.e. I think indirectly the server process is where your grails app is running, and its the grails app classloading from those jars that is causing them to be locked. So the locks should be released when server is stopped thus leaving STS able to delete them.

    Comment

    Working...
    X