tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thorsten Meinl (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TOMEE-1475) Annotated WebListener not found if TomEE is started from symlinked directory
Date Tue, 09 Dec 2014 16:59:12 GMT
Thorsten Meinl created TOMEE-1475:
-------------------------------------

             Summary: 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


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)

Mime
View raw message