[ https://issues.apache.org/jira/browse/KARAF-4601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357079#comment-15357079 ]
ASF subversion and git services commented on KARAF-4601: -------------------------------------------------------- Commit b6eb45491ef84901567ae7fb305d97f0072d4cae in karaf-cellar's branch refs/heads/master from [~jbonofre] [ https://git-wip-us.apache.org/repos/asf?p=karaf-cellar.git;h=b6eb454 ] [KARAF-4601] Fix CellarFeaturesMBeanImpl to use features repository name in addRepository() operation > addRepository() in cellar feature mbean always throws null pointer exception > ---------------------------------------------------------------------------- > > Key: KARAF-4601 > URL: https://issues.apache.org/jira/browse/KARAF-4601 > Project: Karaf > Issue Type: Bug > Components: cellar-core > Affects Versions: cellar-4.0.0 > Environment: WIndows 7, Java 8 > Reporter: Rakesh R. Prasad > Assignee: Jean-Baptiste Onofré > Priority: Blocker > Fix For: cellar-4.0.1 > > > When you invoke any addRepository() methods via JMX, > CellarFeatureMBeanImpl.java throws a null pointer exception always. > Seems like the code is deliberately passing a null value to a map which > doesn't accept null values. > {code:title=CellarFeaturesMBeanImpl.java:447} > if (name == null) { > Features repository = JaxbUtil.unmarshal(uri.toASCIIString(), true); > clusterRepositories.put(uri.toString(), name); > //.... > {code} > The call stack is. > {noformat} > Caused by: java.lang.NullPointerException: Null value is not allowed! > at com.hazelcast.util.Preconditions.checkNotNull(Preconditions.java:59) > at com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:105) > at com.hazelcast.map.impl.proxy.MapProxyImpl.put(MapProxyImpl.java:99) > at > org.apache.karaf.cellar.features.management.internal.CellarFeaturesMBeanImpl.addRepository(CellarFeaturesMBeanImpl.java:447) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) > at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at javax.management.StandardMBean.invoke(StandardMBean.java:405) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.karaf.management.internal.MBeanInvocationHandler.invoke(MBeanInvocationHandler.java:60) > at com.sun.proxy.$Proxy13.invoke(Unknown Source) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at java.security.AccessController.doPrivileged(Native Method) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) > at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) > at sun.rmi.transport.Transport$1.run(Transport.java:200) > at sun.rmi.transport.Transport$1.run(Transport.java:197) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:196) > at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) > at java.security.AccessController.doPrivileged(Native Method) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)