This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch tomee-9.x in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/tomee-9.x by this push: new 5d7d2c54aa feat(#TOMEE-4281): Try to also catch the getClasses from application 5d7d2c54aa is described below commit 5d7d2c54aa19ab3df74c264c63acfdf0808fac7a Author: Jean-Louis Monteiro <jlmonte...@tomitribe.com> AuthorDate: Wed Nov 22 13:04:01 2023 +0100 feat(#TOMEE-4281): Try to also catch the getClasses from application --- .../main/java/org/apache/openejb/config/AnnotationDeployer.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java b/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java index 1f5beda408..903f67a605 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java @@ -2251,11 +2251,10 @@ public class AnnotationDeployer implements DynamicDeployer { } else { addRestClassesToScannedClasses(webModule, classes, classLoader); } - } catch (final RuntimeException npe) { - if (app == null) { - throw npe; - } - // if app depends on cdi no need to do it + } catch (final NoClassDefFoundError e) { + logger.debug("Could not load REST classes for application {1} for module {2} / {3}", + application, webModule.getJarLocation(), webModule.getFile().getName()); + throw new OpenEJBException("Unable to load REST classes for application: " + application, e); } } catch (final InstantiationException e) { throw new OpenEJBException("Unable to instantiate Application class: " + application, e);