You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2016/06/28 11:52:57 UTC

[jira] [Resolved] (TOMEE-1475) Annotated WebListener not found if TomEE is started from symlinked directory

     [ https://issues.apache.org/jira/browse/TOMEE-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau resolved TOMEE-1475.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.7.2

> Annotated WebListener not found if TomEE is started from symlinked directory
> ----------------------------------------------------------------------------
>
>                 Key: TOMEE-1475
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1475
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>         Environment: Linux
>            Reporter: Thorsten Meinl
>             Fix For: 1.7.2
>
>
> I have a TomEE installation /opt/apache-tomee-plus-1.7.1. There is a symlink /opt/apache-tomee pointing to that directory. TomEE is started using this symlink as CATALINA_HOME and CATALINA_BASE. Then I have a webapp with an annotated WebListener. The class is inside the webapps WEB-INF/classes directory. However, the init listener never gets called in this scenario. If I set CATALINA_HOME/BASE to the "real" directory it works.
> I did a bit of debugging and the cause is the check in org.apache.tomee.catalina.OpenEJBContextConfig.internalProcessAnnotations, line 573. The "webAnnotated.name" contains the symlink in the path whereas "currentUrlAsFile" is the canonical path. The canonical path is not a part of the symlinked path and therefore the listeners does not get added.
> The root cause is probably org.apache.openejb.loader.JarLocation.jarLocation(Class). It should also return canonical paths to be consistent.
> This bug is pretty nasty because without hours of debugging you won't find the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)