geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anita kulshreshtha <a_kuls...@yahoo.com>
Subject Re: NPE in o.a.g.conn.JCAResourceImpl.getAdminObjects
Date Sun, 08 Oct 2006 03:23:53 GMT

A patch to fix this is attached.

Thanks
Anita

----- Original Message ----
From: anita kulshreshtha <a_kulshre@yahoo.com>
To: dev@geronimo.apache.org
Sent: Saturday, October 7, 2006 10:05:37 PM
Subject: NPE in o.a.g.conn.JCAResourceImpl.getAdminObjects

Hi All, 
 I am getting NPE  while running jconsole. I am not very familiar with this code, but I think
the error is due to this code:
public JCAAdminObject[] getAdminObjectInstances() {
        return (JCAAdminObject[]) adminObjects.toArray(new JCAAdminObject[connectionFactories.size()]);
    }

The code should use adminObjects.size() not connectionFactories.size()
return (JCAAdminObject[]) adminObjects.toArray(new JCAAdminObject[connectionFactories.size()]);


thanks
Anita

Geronimo Application Server started
19:43:00,156 WARN  [MBeanGBeanBridge] Exception while getting attribute adminObjects
javax.management.ReflectionException: null nested exception is
 java.lang.NullPointerExcept
ion
java.lang.NullPointerException
        at org.apache.geronimo.j2ee.management.impl.Util.getObjectNames(Util.java:33)
        at org.apache.geronimo.connector.JCAResourceImpl.getAdminObjects(JCAResourceImpl.j
ava:106)
        at org.apache.geronimo.connector.JCAResourceImpl$$FastClassByCGLIB$$f01e0455.invok
e(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.ja
va:38)
        at org.apache.geronimo.gbean.runtime.GBeanAttribute.getValue(GBeanAttribute.java:3
85)
        at
 org.apache.geronimo.gbean.runtime.GBeanInstance.getAttribute(GBeanInstance.java
:681)
        at org.apache.geronimo.kernel.basic.BasicKernel.getAttribute(BasicKernel.java:178)

        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.getAttribute(MBeanGBeanBridge.j
ava:118)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.getAttributes(MBeanGBeanBridge.
java:143)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.getAttributes(InvokerMBea
nServerInterceptor.java:302)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBea
nServerInterceptor.java:125)
        at
 mx4j.server.interceptor.SecurityMBeanServerInterceptor.getAttributes(SecurityMB
eanServerInterceptor.java:92)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBea
nServerInterceptor.java:125)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBea
nServerInterceptor.java:125)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.getAttributes(
ContextClassLoaderMBeanServerInterceptor.java:225)
        at mx4j.server.MX4JMBeanServer.getAttributes(MX4JMBeanServer.java:1003)
        at mx4j.remote.rmi.RMIConnectionInvoker.getAttributes(RMIConnectionInvoker.java:18
8)
        at sun.reflect.GeneratedMethodAccessor247.invoke(Unknown
 Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:25)
        at java.lang.reflect.Method.invoke(Method.java:324)









Mime
View raw message