[jboss-jira] [JBoss JIRA] Commented: (JBAS-3431) AuthorizationInterceptor throwing ArrayIndexOutOfBoundsException

Javier Toyos (JIRA) jira-events at lists.jboss.org
Thu Feb 15 09:59:30 EST 2007


    [ http://jira.jboss.com/jira/browse/JBAS-3431?page=comments#action_12353203 ] 
            
Javier Toyos commented on JBAS-3431:
------------------------------------

hello,

i have this same problem with jboss 4.0.5 GA:

...

env.put(Context.SECURITY_CREDENTIALS, pass);
env.put(Context.SECURITY_PRINCIPAL, user);

...

MBeanServerConnection mbsc = (MBeanServerConnection) context.lookup("jmx/invoker/RMIAdaptor");

ObjectName dynMBeanName = new ObjectName("com.jboss.jmx.xmbeans:service=XFormatDateActually");

mbsc.setAttribute(dynMBeanName,  new Attribute("Format", "DD/MM/YY"));
...

and the error is:

java.lang.ClassCastException: javax.management.Attribute
	at org.jboss.jmx.connector.invoker.AuthorizationInterceptor.invoke(AuthorizationInterceptor.java:110)
	at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:108)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
...

thanks

> AuthorizationInterceptor throwing ArrayIndexOutOfBoundsException
> ----------------------------------------------------------------
>
>                 Key: JBAS-3431
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3431
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Security, JMX
>    Affects Versions: JBossAS-4.0.4.GA
>            Reporter: Anil Saldhana
>         Assigned To: Anil Saldhana
>             Fix For: JBossAS-5.0.0.Beta1, JBossAS-4.0.5.GA
>
>
> As Originally reported in JBJMX-97, the user says:
> ==========================================================================================
> I have secured the jmx-invoker-service using JAAS and the standard UsersRolesLoginModule. I am able to authenticate (basic authentication) through the web UI and manage the console using the same login config.
> I am getting a remote connection to the JMX server from an InitialContext that is populated with the user name and password:
> env.put(Context.SECURITY_PRINCIPAL, userName);
> env.put(Context.SECURITY_CREDENTIALS, password);
> Then I look up the MBeanServerConnection and try to get the MBeanInfo
>         MBeanServerConnection server = lookup("jmx/invoker/RMIAdaptor", MBeanServerConnection.class);
>         ObjectName name = new ObjectName(theName);
>         MBeanInfo info = server.getMBeanInfo(name);
> At this point the server throws an ArrayIndexOutOfBoundsException from org.jboss.jmx.connector.invoker.AuthorizationInterceptor line 107.
> If I try and set an attribute:
>         server.setAttribute(name, new Attribute("searchText", searchText));
> I get instead at the same line:
> java.lang.ClassCastException: javax.management.Attribute
> at org.jboss.jmx.connector.invoker.AuthorizationInterceptor.invoke(AuthorizationInterceptor.java:107)
> at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:108)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> ==========================================================================================

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list