Skip to content
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

Error: Injection of remote EJB into a MDB in clustered mode #2763

Closed
LumnitzF opened this issue May 24, 2018 · 7 comments
Closed

Error: Injection of remote EJB into a MDB in clustered mode #2763

LumnitzF opened this issue May 24, 2018 · 7 comments

Comments

@LumnitzF
Copy link

Description


I have a MDB, which uses a remote EJB. The remote EJB can easily be injected when running as standalone, however in clustered mode, an Exception occurs.

Expected Outcome

The remote EJB gets in injected.

Current Outcome

An IllegalStateException is thrown, as result of a LinkageError.
Here is the full stack trace.

However I think this is the important part:
java.lang.LinkageError: loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate class definition for name: "com/sun/ejb/codegen/GenericEJBHome_Generated"

or

java.lang.LinkageError: loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate class definition for name: "fmg/stp/backendservices/push/api/_PushServiceRemote_Remote"

where PushServiceRemote is the remote interface.

Both Exceptions occur multiple times, and I can't really say how they connect.

Samples

I've included the classes.
RequiredClasses.zip

Environment

  • Payara Version: 4.1.2.174
  • Edition: Full
  • JDK Version: OpenJDK Runtime Environment (build 1.8.0_161-b14)
  • Operating System: Linux
@smillidge
Copy link
Contributor

Can you build a test case that demonstrates the issue. Perhaps as a simple maven project on GitHub?

@smillidge smillidge added the PR: TESTS REQUIRED PR Requires Tests to be merged label May 24, 2018
@lprimak
Copy link
Contributor

lprimak commented May 25, 2018

Also, what is "clustered mode" you are referring to? This statement is too broad / generic.
We cannot proceed with this unless we can reproduce it

@LumnitzF
Copy link
Author

OK, I'll try to provide an example for you

@lprimak
Copy link
Contributor

lprimak commented May 31, 2018

Also, have you tried this on .181 version? Please do that as a first step as well

@LumnitzF
Copy link
Author

LumnitzF commented Jun 7, 2018

So I digged into this a bit more.

I've created a test case for this: link

In order to reproduce:

  1. asadmin start-domain domain1
  2. create a new config from default-config. I've named it cluster-config
  3. create a new cluster:
    3.1 goto "clusters"
    3.2 "New..."
    3.3 enter a cluster name and use the previously created config as config (referenced)
    3.4 create two new instances with equal weight
    3.5 "OK"
  4. Start the created cluster
  5. Create a JMS TopicConnectionFactory "jms/LogToInfoTopicConnectionFactory" and enable it on the cluster
  6. Create a new JMS Topic "jms/LogToInfoTopic" and enable it on the cluster
    6.1 Note: When I create the Topic and set the cluster as target in the creation mask, the Topic will get enabled on "server" and not on the selected cluster. I have to manually change the target afterwards. Another bug?
  7. On test repo: mvn clean install
  8. deploy "remote-ejb" on cluster
  9. deploy "mdb" on cluster
  10. deploy "webapp" on cluster
  11. Open in browser: "localhost:28080/webapp-1.0-SNAPSHOT/jms"
  12. See the instance logs

By default 10 messages will be sent to the jms queue.
The bug only occurs when multiple messages are sent very fast successively (like the for clause)

The bug occurs on .174 and .181. I have not tested any other release

@smillidge smillidge added try to reproduce and removed PR: TESTS REQUIRED PR Requires Tests to be merged labels Jun 14, 2018
@smillidge
Copy link
Contributor

Thanks for the test case we will try to reproduce

@LumnitzF
Copy link
Author

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants