Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Problems on deployment of OSGi hybrid bundles (ClassNotFoundException - IIOPSSLSocketFactory) #673

Closed
chrjohn opened this issue Feb 22, 2016 · 1 comment

Comments

@chrjohn
Copy link
Contributor

chrjohn commented Feb 22, 2016

Please see attached minimal MDB. Works on payara 4.1.152.1 but fails on 4.1.1.161
It works when deployed as normal JAR, but deployed as OSGi bundle there are exceptions thrown (same as in #516 and #535)

Deployment with:
asadmin deploy --type osgi payarabug-0.0.1-SNAPSHOT.jar

NB: it also works when first deploying as normal JAR, then undeploy, then deploy as OSGi bundle. So please deploy to a freshly started instance.

Prerequisites: you need to have a connection factory and test queue:
asadmin create-jms-resource --restype=javax.jms.QueueConnectionFactory --enabled=true ConnectionFactory
asadmin create-jms-resource --restype=javax.jms.Queue --enabled=true queue/test

The bean is just this:

package payarabug;

import javax.annotation.Resource;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.QueueConnectionFactory;

@MessageDriven( mappedName = "queue/test" )
public class PayaraBugMDB
    implements MessageListener {

    @Resource( name = "ConnectionFactory" )
    private QueueConnectionFactory queueConnectionFactory;



    public void onMessage( final Message msg ) {
        System.out.println( "XXX onMessage()" );
    }

}

Attached is the JAR file (renamed as ZIP).
payarabug-0.0.1-SNAPSHOT.zip

@smillidge
Copy link
Contributor

Confirmed this is caused by #552. #552 was to prevent classloader leaks when bootstrapping the ORB. ORB threads inherit the current context classloader.

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

No branches or pull requests

2 participants