You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Guus der Kinderen <gu...@gmail.com> on 2021/08/04 14:48:56 UTC

MINA and JMX: MemberAccess implementation must be provided

I'm trying the register and use the MINA-provided MBeans, following the
guide provided at
https://mina.apache.org/mina-project/userguide/ch16-jmx-support/ch16-jmx-support.html

Compile-time, everything is OK, and runtime, the beans appear to be
registered properly. However, whenever someone tries to access attributes
of one of the registered beans, this fails. Server-sided, this exception is
logged.

021.08.04 15:49:41 WARN  [Jetty-QTP-BOSH-95]:
org.apache.mina.integration.jmx.ObjectMBean - Unexpected exception.
java.lang.RuntimeException: MemberAccess implementation must be provided!
        at ognl.OgnlContext.<init>(OgnlContext.java:140)
~[ognl-3.2.10.jar:?]
        at ognl.OgnlContext.<init>(OgnlContext.java:110)
~[ognl-3.2.10.jar:?]
        at ognl.Ognl.createDefaultContext(Ognl.java:159)
~[ognl-3.2.10.jar:?]
        at
org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:646)
~[mina-integration-jmx-2.1.3.jar:?]
        at
org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:186)
~[mina-integration-jmx-2.1.3.jar:?]
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
~[?:1.8.0_292]

I'm not sure exactly how to interpret this. One possibility that I
considered was that I was missing concrete implemenations, so, in addition
to the dependencies:

- org.apache.mina:mina-core
- org.apache.mina:mina-integration-jmx

I experimented with adding:

- org.apache.mina:mina-integration-beans
- org.apache.mina:mina-integration-ognl

Sadly, that didn't make a difference. Do I need another dependency, or am I
looking at this entirely wrong?

Kind regards,

  Guus

Re: MINA and JMX: MemberAccess implementation must be provided

Posted by Emmanuel Lécharny <el...@gmail.com>.
Never mindd, found it (3.2.10). And it was a typo in my mail (IGNL 
instead of OGNL. Blame my MAC crappy keyboard...)

 From the stack trace, it may be an OGNL bug:

     public static Map createDefaultContext(Object root)
     {
         return addDefaultContext(root, null, null, null, new 
OgnlContext(null, null, null));        <------- member access null ???
     }

and :

     public OgnlContext(ClassResolver classResolver, TypeConverter 
typeConverter, MemberAccess memberAccess)
     {
         // No 'values' map has been specified, so we create one of the 
default size: 23 entries
         this(memberAccess, classResolver, typeConverter, new HashMap(23));
     }

and

     public OgnlContext(MemberAccess memberAccess, ClassResolver 
classResolver, TypeConverter typeConverter, Map values)
     {
         super();

...

         if (memberAccess != null) { <---- Obviosuly, memberAccss is null
             this._memberAccess = memberAccess;
         } else {
             throw new RuntimeException("MemberAccess implementation 
must be provided!");
         }


I wonder if this piece of code ever worked...

On 06/08/2021 08:16, Guus der Kinderen wrote:
> Hi Emmanuel,
> 
> I'm not sure that I'm using any? Grepping through my dependency list for 
> 'ignl' does not yield any results. I've attached the output of mvn 
> dependency:list as a dependency for good measure (ANSI warning: use 
> 'less -r' for proper rendering).
> 
> What is this beast anyway? Trying to Google for "ignl" or "ignl mina" 
> does not give me any useful hints, and the mvnrepository.com 
> <http://mvnrepository.com/> search index does not show any artifacts by 
> that name either.
> 
> Kind regards,
> 
>    Guus
> 
> On Fri, 6 Aug 2021 at 06:17, Emmanuel Lécharny <elecharny@gmail.com 
> <ma...@gmail.com>> wrote:
> 
>     Hi,
> 
>     which version of the IGNL lib are you using ?
> 
>     On 04/08/2021 16:48, Guus der Kinderen wrote:
>      > I'm trying the register and use the MINA-provided MBeans,
>     following the
>      > guide provided at
>      >
>     https://mina.apache.org/mina-project/userguide/ch16-jmx-support/ch16-jmx-support.html
>     <https://mina.apache.org/mina-project/userguide/ch16-jmx-support/ch16-jmx-support.html>
>      >
>      > Compile-time, everything is OK, and runtime, the beans appear to be
>      > registered properly. However, whenever someone tries to access
>     attributes
>      > of one of the registered beans, this fails. Server-sided, this
>     exception is
>      > logged.
>      >
>      > 021.08.04 15:49:41 WARN  [Jetty-QTP-BOSH-95]:
>      > org.apache.mina.integration.jmx.ObjectMBean - Unexpected exception.
>      > java.lang.RuntimeException: MemberAccess implementation must be
>     provided!
>      >          at ognl.OgnlContext.<init>(OgnlContext.java:140)
>      > ~[ognl-3.2.10.jar:?]
>      >          at ognl.OgnlContext.<init>(OgnlContext.java:110)
>      > ~[ognl-3.2.10.jar:?]
>      >          at ognl.Ognl.createDefaultContext(Ognl.java:159)
>      > ~[ognl-3.2.10.jar:?]
>      >          at
>      >
>     org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:646)
>      > ~[mina-integration-jmx-2.1.3.jar:?]
>      >          at
>      >
>     org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:186)
>      > ~[mina-integration-jmx-2.1.3.jar:?]
>      >          at
>      >
>     com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
>      > ~[?:1.8.0_292]
>      >
>      > I'm not sure exactly how to interpret this. One possibility that I
>      > considered was that I was missing concrete implemenations, so, in
>     addition
>      > to the dependencies:
>      >
>      > - org.apache.mina:mina-core
>      > - org.apache.mina:mina-integration-jmx
>      >
>      > I experimented with adding:
>      >
>      > - org.apache.mina:mina-integration-beans
>      > - org.apache.mina:mina-integration-ognl
>      >
>      > Sadly, that didn't make a difference. Do I need another
>     dependency, or am I
>      > looking at this entirely wrong?
>      >
>      > Kind regards,
>      >
>      >    Guus
>      >
> 
>     -- 
>     *Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
>     T. +33 (0)4 89 97 36 50
>     P. +33 (0)6 08 33 32 61
>     emmanuel.lecharny@busit.com <ma...@busit.com>
>     https://www.busit.com/ <https://www.busit.com/>
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@mina.apache.org
>     <ma...@mina.apache.org>
>     For additional commands, e-mail: users-help@mina.apache.org
>     <ma...@mina.apache.org>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@mina.apache.org
> For additional commands, e-mail: users-help@mina.apache.org
> 

-- 
*Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
T. +33 (0)4 89 97 36 50
P. +33 (0)6 08 33 32 61
emmanuel.lecharny@busit.com https://www.busit.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@mina.apache.org
For additional commands, e-mail: users-help@mina.apache.org


Re: MINA and JMX: MemberAccess implementation must be provided

Posted by Guus der Kinderen <gu...@gmail.com>.
Hi Emmanuel,

I'm not sure that I'm using any? Grepping through my dependency list for
'ignl' does not yield any results. I've attached the output of mvn
dependency:list as a dependency for good measure (ANSI warning: use 'less
-r' for proper rendering).

What is this beast anyway? Trying to Google for "ignl" or "ignl mina" does
not give me any useful hints, and the mvnrepository.com search index does
not show any artifacts by that name either.

Kind regards,

  Guus

On Fri, 6 Aug 2021 at 06:17, Emmanuel Lécharny <el...@gmail.com> wrote:

> Hi,
>
> which version of the IGNL lib are you using ?
>
> On 04/08/2021 16:48, Guus der Kinderen wrote:
> > I'm trying the register and use the MINA-provided MBeans, following the
> > guide provided at
> >
> https://mina.apache.org/mina-project/userguide/ch16-jmx-support/ch16-jmx-support.html
> >
> > Compile-time, everything is OK, and runtime, the beans appear to be
> > registered properly. However, whenever someone tries to access attributes
> > of one of the registered beans, this fails. Server-sided, this exception
> is
> > logged.
> >
> > 021.08.04 15:49:41 WARN  [Jetty-QTP-BOSH-95]:
> > org.apache.mina.integration.jmx.ObjectMBean - Unexpected exception.
> > java.lang.RuntimeException: MemberAccess implementation must be provided!
> >          at ognl.OgnlContext.<init>(OgnlContext.java:140)
> > ~[ognl-3.2.10.jar:?]
> >          at ognl.OgnlContext.<init>(OgnlContext.java:110)
> > ~[ognl-3.2.10.jar:?]
> >          at ognl.Ognl.createDefaultContext(Ognl.java:159)
> > ~[ognl-3.2.10.jar:?]
> >          at
> >
> org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:646)
> > ~[mina-integration-jmx-2.1.3.jar:?]
> >          at
> >
> org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:186)
> > ~[mina-integration-jmx-2.1.3.jar:?]
> >          at
> >
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
> > ~[?:1.8.0_292]
> >
> > I'm not sure exactly how to interpret this. One possibility that I
> > considered was that I was missing concrete implemenations, so, in
> addition
> > to the dependencies:
> >
> > - org.apache.mina:mina-core
> > - org.apache.mina:mina-integration-jmx
> >
> > I experimented with adding:
> >
> > - org.apache.mina:mina-integration-beans
> > - org.apache.mina:mina-integration-ognl
> >
> > Sadly, that didn't make a difference. Do I need another dependency, or
> am I
> > looking at this entirely wrong?
> >
> > Kind regards,
> >
> >    Guus
> >
>
> --
> *Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
> T. +33 (0)4 89 97 36 50
> P. +33 (0)6 08 33 32 61
> emmanuel.lecharny@busit.com https://www.busit.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@mina.apache.org
> For additional commands, e-mail: users-help@mina.apache.org
>
>

Re: MINA and JMX: MemberAccess implementation must be provided

Posted by Emmanuel Lécharny <el...@gmail.com>.
Hi,

which version of the IGNL lib are you using ?

On 04/08/2021 16:48, Guus der Kinderen wrote:
> I'm trying the register and use the MINA-provided MBeans, following the
> guide provided at
> https://mina.apache.org/mina-project/userguide/ch16-jmx-support/ch16-jmx-support.html
> 
> Compile-time, everything is OK, and runtime, the beans appear to be
> registered properly. However, whenever someone tries to access attributes
> of one of the registered beans, this fails. Server-sided, this exception is
> logged.
> 
> 021.08.04 15:49:41 WARN  [Jetty-QTP-BOSH-95]:
> org.apache.mina.integration.jmx.ObjectMBean - Unexpected exception.
> java.lang.RuntimeException: MemberAccess implementation must be provided!
>          at ognl.OgnlContext.<init>(OgnlContext.java:140)
> ~[ognl-3.2.10.jar:?]
>          at ognl.OgnlContext.<init>(OgnlContext.java:110)
> ~[ognl-3.2.10.jar:?]
>          at ognl.Ognl.createDefaultContext(Ognl.java:159)
> ~[ognl-3.2.10.jar:?]
>          at
> org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:646)
> ~[mina-integration-jmx-2.1.3.jar:?]
>          at
> org.apache.mina.integration.jmx.ObjectMBean.getAttribute(ObjectMBean.java:186)
> ~[mina-integration-jmx-2.1.3.jar:?]
>          at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
> ~[?:1.8.0_292]
> 
> I'm not sure exactly how to interpret this. One possibility that I
> considered was that I was missing concrete implemenations, so, in addition
> to the dependencies:
> 
> - org.apache.mina:mina-core
> - org.apache.mina:mina-integration-jmx
> 
> I experimented with adding:
> 
> - org.apache.mina:mina-integration-beans
> - org.apache.mina:mina-integration-ognl
> 
> Sadly, that didn't make a difference. Do I need another dependency, or am I
> looking at this entirely wrong?
> 
> Kind regards,
> 
>    Guus
> 

-- 
*Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
T. +33 (0)4 89 97 36 50
P. +33 (0)6 08 33 32 61
emmanuel.lecharny@busit.com https://www.busit.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@mina.apache.org
For additional commands, e-mail: users-help@mina.apache.org