[
https://issues.apache.org/jira/browse/TOMEE-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved TOMEE-1616.
------------------------------------
Resolution: Auto Closed
Hi there!
We wanted to reach out and let you know that we're currently working on
cleaning up open issues in Jira that specifically impact unsupported versions,
including 1.7.x, 7.0.x, and 7.1.x.
If you had previously reported this issue on one of these unsupported versions,
we kindly ask you to check if the problem still persists and can be reproduced
on a supported version such as 8.0.x or 9.0.x. If you find that it is indeed
reproducible on a supported version, you're more than welcome to re-open this
issue.
Thanks!
> EJBs cannot be found in InitialContext with custom WebappLoader
> ---------------------------------------------------------------
>
> Key: TOMEE-1616
> URL: https://issues.apache.org/jira/browse/TOMEE-1616
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 1.7.2
> Environment: Linux and Windows
> Reporter: Anne Stellingwerf
> Priority: Major
> Attachments: tomee172loaderBug.jar, tomee172loaderBug.log,
> tomee172loaderbug.war
>
>
> Since TomEE 1.7.2, I am unable to locate my EJB in an InitialContext when I
> use a custom loader. My real loader has more logic, among which is adding a
> custom class loader. But for the sake of this ticket, I've created a
> WebappLoader which does nothing, except subclassing {{WebappLoader}}.
> Then I have a EJB, and a JAX RS service that is looking up that bean:
> {code}Context context = new InitialContext();
> GreetingServiceEjb greetingServiceEjb = (GreetingServiceEjb)
> context.lookup("java:global/tomee172loaderbug/GreetingServiceEjb");
> return greetingServiceEjb.getGreeting();{code}
> This is working fine in TomEE 1.7.1 but works no longer in 1.7.2.
> PFA:
> * {{tomee172loaderBug.jar}}, containing class and source files for the Loader
> * {{tomee172loaderbug.war}}, containing class and source files for the bean
> and JAX RS service, and context.xml for choosing the custom loader
> * {{tomee172loaderBug.log}}, with the full stack trace
> STR:
> # Copy {{tomee172loaderBug.jar}} into {{TomEE 1.7.1 home/lib/}}
> # Copy {{tomee172loaderbug.war}} into {{TomEE 1.7.1 home/webapps/}}
> # Start TomEE
> # In a browser, navigate to {{http://localhost/tomee172loaderbug/hello}}
> #* Note that the response equals "Hello !!"
> # Repeat these steps, but now on TomEE 1.7.2
> #* Instead of Hello, an HTTP 500 is thrown: {{HTTP Status 500 - Error
> processing webservice request}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)