NPE when creating MedRecSampleAuthenticator using JMX - Weblogic

This is a discussion on NPE when creating MedRecSampleAuthenticator using JMX - Weblogic ; Hi, I'm getting a NPE when creating the MedRecSampleAuthenticator using the JMX interface. My codes are below: try { CommoMBeanServer mbs = Config.getMBeanServer(adminServerName, url, user, pwd); // create your authenticator instance ObjectInstance oi = mbs.createMBean(Commo.getTypeObjectName("com.bea.medrec.security.MedRecSampleAuthenticator"), new ObjectName("Security:Name=myrealmMedRecSampleAuthenticator")); AuthenticationProviderMBean authenticator = ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: NPE when creating MedRecSampleAuthenticator using JMX

  1. NPE when creating MedRecSampleAuthenticator using JMX

    Hi,

    I'm getting a NPE when creating the MedRecSampleAuthenticator using the JMX interface. My codes are below:

    try {
    CommoMBeanServer mbs = Config.getMBeanServer(adminServerName, url, user, pwd);

    // create your authenticator instance
    ObjectInstance oi = mbs.createMBean(Commo.getTypeObjectName("com.bea.medrec.security.MedRecSampleAuthenticator"),
    new ObjectName("Security:Name=myrealmMedRecSampleAuthenticator"));

    AuthenticationProviderMBean authenticator = (AuthenticationProviderMBean)mbs.getMBean(oi.getOb jectName());
    }
    catch (Exception ex) {
    ex.printStackTrace();
    }

    Is is the a bug or am I doing something wrong? How can I get around this?

    Thank you,
    Hung

  2. Re: NPE when creating MedRecSampleAuthenticator using JMX

    Hello hung,
    Add the MedrecAuth*.jar that is in the server/lib/mbeantypes directory
    to your client classpath and you should be all set.
    Thanks,
    -satya

    Hung Nguyen wrote:
    > Hi,
    >
    > I'm getting a NPE when creating the MedRecSampleAuthenticator using the JMX interface. My codes are below:
    >
    > try {
    > CommoMBeanServer mbs = Config.getMBeanServer(adminServerName, url, user, pwd);
    >
    > // create your authenticator instance
    > ObjectInstance oi = mbs.createMBean(Commo.getTypeObjectName("com.bea.medrec.security.MedRecSampleAuthenticator"),
    > new ObjectName("Security:Name=myrealmMedRecSampleAuthenticator"));
    >
    > AuthenticationProviderMBean authenticator = (AuthenticationProviderMBean)mbs.getMBean(oi.getOb jectName());
    > }
    > catch (Exception ex) {
    > ex.printStackTrace();
    > }
    >
    > Is is the a bug or am I doing something wrong? How can I get around this?
    >
    > Thank you,
    > Hung



+ Reply to Thread