2

I had been dealing with a deployment issue in a recent TomEE version (8.0.11) that I could not make sense of, to which I finally found a workaround but not quite sure about the integrity of the solution.

Before getting into details, I'd like to state that I tried to open an issue in the official repo but it seems they accept only pull requests and since I am not quite sure about the drill, I figured I'd just report it here for some visibility until a PR is made, if necessary.

So during a traditional EJB deployment I got a ClassNotFoundException which suggests some incorrect packaging:

java.lang.ClassNotFoundException: org.apache.webbeans.el.el22.EL22Adaptor not found

After digging out the offending row by the source code, I found out that the class FQN is obtained from the file META-INF/openwebbeans/openwebbeans.properties file that ships within the openejb-core archive.

...
################################### Default EL Adaptor ####################################
#Default implementation oforg.apache.webbeans.spi.adaptor.ELAdaptor
org.apache.webbeans.spi.adaptor.ELAdaptor=org.apache.webbeans.el.el22.EL22Adaptor
################################################################################################
...

But the class FQN org.apache.webbeans.el.el22.EL22Adaptor is nowhere to be found in the tomee project.

The only org.apache.webbeans.spi.adaptor.ELAdaptor implementation in the openwebbeans project is org.apache.webbeans.el22.EL22Adaptor that is, without the 'el' package in the middle.

The same problem is present in the openejb repository at below link as well: https://github.com/apache/openejb/blob/trunk/openejb/container/openejb-core/src/main/resources/META-INF/openwebbeans/openwebbeans.properties

However, when I check the current openwebbeans repo in github, it does not seem to have the typo: https://github.com/apache/openwebbeans/blob/master/webbeans-el22/src/main/resources/META-INF/openwebbeans/openwebbeans.properties

It booted up as expected after I modified the openejb-core.jar inside under tomee/lib directory, but this is not future proof obviously.

I am wondering if this is an honest mistake or a packaging error, but I sure hope that it will be fixed soon.

alegria
  • 931
  • 2
  • 10
  • 25
  • TomEE uses jira.apache.org as bug tracker. – rzo1 Oct 25 '22 at 20:12
  • Most probably it was forgotten to be adjusted on our side but needs a careful look. A Jira issue would help to track and we can ensure to have a look :) – rzo1 Oct 25 '22 at 20:14
  • In addition, the link points to an old repository, which isn't maintained/used anymore. The code ist located here https://github.com/apache/tomee/tree/tomee-8.x – rzo1 Oct 25 '22 at 20:20
  • I'd love to open a jira issue at the said tracker. Thanks for the pointer @rzo1 ! – alegria Oct 25 '22 at 20:34
  • 1
    An issue is created in the related tracker: https://issues.apache.org/jira/browse/TOMEE-4101 – alegria Oct 25 '22 at 20:48
  • 1
    @rzo1 Created a PR with id https://github.com/apache/tomee/pull/951 – alegria Oct 27 '22 at 09:10

0 Answers0