tomee-commits mailing list archives

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

    [ https://issues.apache.org/jira/browse/TOMEE-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14239651#comment-14239651
] 

Romain Manni-Bucau commented on TOMEE-1475:
-------------------------------------------

Hi

can you try the snapshot? - 1.7.2-SNAPSHOT. think it is fixed since some weeks

> 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