Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

component-scan of class in separate jar causes repeated tomcat redeply to fail in its attempt to remove the jar [SPR-10582] #15211

Closed
spring-projects-issues opened this issue May 24, 2013 · 3 comments
Labels
in: web status: bulk-closed

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented May 24, 2013

Lennart Enström opened SPR-10582 and commented

Se Reference URL for code. Note that there are technically 2 maven projects

  • SPR-10582-referenced (jar) contains class org.springframework.issues.Foo. Foo need not have any references to spring.

  • #15211 (war) has:

    1. a maven dependency to SPR-10582-referenced

    <component scan base-package="org.springframework.issues"/>

  • Upon redeployment of war, tomcat is unable to remove the file SPR-10582-referenced.....jar causing redeployment to fail.

  • Removing component-scan makes redeployment work.

Steps to reproduce:
The code contains two projects: SPR-10582-referenced and #15211

  1. In dir SPR-10582-referenced: mvn install
  2. In dir #15211: mvn package
  3. Copy #15211....war to tomcat webapps dir
  4. Undeploy (using e.g. tomcat manager)
  5. Copy again

Further notes:

  • I have not executed any profiling-tool to see what is leaking or holding the reference to SPR-10582-referenced.
  • Tomcat 7.0.26 on Windows7

I have not found any workaround yet. Tried:

  • <context:exclude-filter type="regex" expression="org.springframework.issues..*"/>
    without success
  • Also tried to declare Foo and Bar as @Component

Affects: 3.2.2

Reference URL: https://github.com/SpringSource/spring-framework-issues

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 27, 2013

Phil Webb commented

File locking issues on Windows can be particularly problematic. Have you tried using the antiJARLocking configuration option in Tomcat [1]?

[1] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 29, 2013

Lennart Enström commented

Thanks a lot. I tried antiJARLocking now and it is not enough although the antiResourceLocking is! According to the docs this latter option is rather brute though with side-effects.

@spring-projects-issues spring-projects-issues added type: bug status: waiting-for-triage in: web and removed type: bug labels Jan 11, 2019
@rstoyanchev rstoyanchev added status: bulk-closed and removed status: waiting-for-triage labels Jan 11, 2019
@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 12, 2019

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web status: bulk-closed
Projects
None yet
Development

No branches or pull requests

2 participants