Multiple WARs trying to load classes of each other

ear, glassfish, jakarta-ee, war

Solution

Seems like this is bug in GlassFish:

http://java.net/jira/browse/GLASSFISH-16249

Problem

I have a Java EE application deployed on GlassFish. This application has 2 web modules inside it: - 1st with some RESTful-services (business logic) - 2nd with a JSF application (admin console) When I deploy my application, all deploys ok, but I see many `ClassNotFound` warnings and exceptions in the log (from both of them, 1st war and 2nd war). 1st war: ``` SEVERE: Unable to load annotated class: com...web.admin.AdministrationBean SEVERE: java.lang.ClassNotFoundException: com...web.admin.AdministrationBean ``` 2nd war: ``` WARNING: WEB9052: Unable to load class com...web.rest.SomeResourse, reason: java.lang.ClassNotFoundException: com...rest.SomeResourse ``` Everything works and all, but those log warnings and errors are really annoying. Looks like there's something wrong in the application properties, but I checked them and all looks ok (when I try to deploy them separate from each other, all is ok). Maybe I need some `application.xml` settings for separate loading in GlassFish? I Googled it, but didn't find useful information.

Original source