-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment of EAR with Remote EJBs doesn't work #25054
Comments
Hi, @chicko12345. Could you please provide the stack traces from the Thanks. |
Hi, @avpinchuk, sorry for the very late answer. Other projects + wanted to create an example to provide something reproducible without the copy of productive code :-D. https://github.com/chicko12345/remote-ejb-test.git The problem seems to be related to the signing of packages. if <jarsigner.skip>false</jarsigner.skip> the resulting ear cannot be deployed to glassfish. The log contains in case of failed deployment: `[#|2024-11-05T13:58:20.681333Z|SEVERE|GF 7.0.15|jakarta.enterprise.system.core|_ThreadID=55;_ThreadName=admin-listener(5);_LevelValue=1000;| [#|2024-11-05T13:58:20.702327Z|SEVERE|GF 7.0.15|jakarta.enterprise.system.core|_ThreadID=55;_ThreadName=admin-listener(5);LevelValue=1000;|
Caused by: java.lang.reflect.InvocationTargetException Hope, it is enough to understand our problem. Kind Regards |
Deployment of EAR with Remote EJBs doesn't work
Hello Community,
first of all - thank you for your work. Since the glassfish AS development was moved to Eclipse, the progress is on another level. Kudos to you!
Environment Details
Problem Description
We're trying to migrate our application from glassfish 5.1.0 to the current version (7.0.15)
Unfortunately the deployment of our EAR fails because several Remote EJBs cannot be found by the ejb-container.
We've tried to track the problem down and found the commit, which has changed the behaviour of the ejb-container in such way, that the deployment fails:
Commit HASH: 6fbf895
Commit Message: Fixes generated EJB remote interfaces loading
Class com.sun.ejb.codegen.ClassGenerator
Just one code line was replaced by this commit in the method:
private static boolean useMethodHandles(final ClassLoader loader, final Class<?> anchorClass,
final String targetPackageName)
old version:
return Objects.equals(targetPackageName, anchorClass.getPackageName());
new version:
return Objects.equals(anchorClass.getPackage(), loader.getDefinedPackage(targetPackageName));
To be sure, that was the only cause, we've reverted this commit, built the ejb-container locally and the application can be deployed without any further problems.
Our Remote EJB Interfaces and the corresponding implementations are parts of different jars within the EAR. The package names of the Remote EJB Interfaces and their implementation can also differ. The partition is done to provide Remote EJB Interface definitions to other remote service consumer applications in the minimal way.
Kind Regards
The text was updated successfully, but these errors were encountered: