java.lang.reflect.InvocationTargetException

Liferay Issues | Shitian "Shelton" Zhang | 4 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    Steps to reproduce: 1. Set up two bundles. 2. In both bundles: Add the following properties to the portal-ext.properties: {noformat} cluster.link.enabled=true ehcache.cluster.link.replication.enabled=true {noformat} Add "replicatePutsViaCopy=true" under "defaultCache" section in liferay-multi-vm-clustered.xml (turn others to true also). {panel} <defaultCache eternal="false" maxElementsInMemory="10000" overflowToDisk="false" timeToIdleSeconds="600" > <cacheEventListenerFactory class="com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory" properties="{color:red}replicatePutsViaCopy=true,replicatePuts=true,replicateUpdatesViaCopy=true{color}" propertySeparator="," /> <bootstrapCacheLoaderFactory class="com.liferay.portal.cache.ehcache.LiferayBootstrapCacheLoaderFactory" /> </defaultCache> {panel} 3. Deploy ehcache-cluster-web plugins in both bundles. 4. Start up bundles in sequence. 5. On one bundle site, go to control panel -> server administration -> script. Choose language as Groovy, put script as: {code} com.liferay.portal.kernel.cache.PortalCache pc = com.liferay.portal.kernel.cache.MultiVMPoolUtil.getCache("testCacheId"); pc.put("one", "ONE"); pc.put("two", "TWO"); pc.put("three", "THREE"); {code} then hit "Execute" button. Error Message 1: {noformat} 05:54:44,276 ERROR [Incoming-2,LIFERAY-CONTROL-CHANNEL,Shelton-14829][ClusterRequestReceiver:92] Una ble to invoke method {arguments=[{arguments=null, methodKey=com.liferay.portal.service.PortletLocalS ervice.clearCompanyPortletsPool)}, com.liferay.portal.service.PortletLocalService, , null, {}], meth odKey=com.liferay.portal.cluster.ClusterableAdvice._invoke(com.liferay.portal.kernel.util.MethodHand ler,java.lang.String,java.lang.String,java.lang.Class,java.util.Map)} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:61) at com.liferay.portal.cluster.ClusterRequestReceiver.processClusterRequest(ClusterRequestRec eiver.java:237) at com.liferay.portal.cluster.ClusterRequestReceiver.receive(ClusterRequestReceiver.java:87) at org.jgroups.JChannel.invokeCallback(JChannel.java:749) at org.jgroups.JChannel.up(JChannel.java:710) at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1025) at org.jgroups.protocols.RSVP.up(RSVP.java:188) at org.jgroups.protocols.FRAG2.up(FRAG2.java:181) at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) at org.jgroups.protocols.pbcast.GMS.up(GMS.java:896) at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:245) at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:453) at org.jgroups.protocols.pbcast.NAKACK2.handleMessage(NAKACK2.java:763) at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:574) at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147) at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:187) at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288) at org.jgroups.protocols.MERGE3.up(MERGE3.java:290) at org.jgroups.protocols.Discovery.up(Discovery.java:359) at org.jgroups.protocols.TP.passMessageUp(TP.java:1263) at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1825) at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1793) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.InstantiationException: com.liferay.portal.service.PortletLocalService at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:58) at com.liferay.portal.cluster.ClusterableAdvice._invoke(ClusterableAdvice.java:163) ... 30 more 05:55:08,444 ERROR [Incoming-1,LIFERAY-CONTROL-CHANNEL,Shelton-14829][PortletBeanLocatorUtil:87] Bea nLocator is null for servlet context com.liferay.portal.service.PortletLocalService 05:55:08,446 ERROR [Incoming-1,LIFERAY-CONTROL-CHANNEL,Shelton-14829][ClusterRequestReceiver:92] Una ble to invoke method {arguments=[{arguments=null, methodKey=com.liferay.portal.service.PortletLocalS ervice.clearCompanyPortletsPool)}, com.liferay.portal.service.PortletLocalService, marketplace-portl et, null, {}], methodKey=com.liferay.portal.cluster.ClusterableAdvice._invoke(com.liferay.portal.ker nel.util.MethodHandler,java.lang.String,java.lang.String,java.lang.Class,java.util.Map)} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:61) at com.liferay.portal.cluster.ClusterRequestReceiver.processClusterRequest(ClusterRequestRec eiver.java:237) at com.liferay.portal.cluster.ClusterRequestReceiver.receive(ClusterRequestReceiver.java:87) at org.jgroups.JChannel.invokeCallback(JChannel.java:749) at org.jgroups.JChannel.up(JChannel.java:710) at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1025) at org.jgroups.protocols.RSVP.up(RSVP.java:188) at org.jgroups.protocols.FRAG2.up(FRAG2.java:181) at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) at org.jgroups.protocols.pbcast.GMS.up(GMS.java:896) at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:245) at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:453) at org.jgroups.protocols.pbcast.NAKACK2.handleMessage(NAKACK2.java:763) at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:574) at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147) at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:187) at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288) at org.jgroups.protocols.MERGE3.up(MERGE3.java:290) at org.jgroups.protocols.Discovery.up(Discovery.java:359) at org.jgroups.protocols.TP.passMessageUp(TP.java:1263) at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1825) at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1793) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for ser vlet context com.liferay.portal.service.PortletLocalService at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java: 46) at com.liferay.portal.cluster.ClusterableAdvice._invoke(ClusterableAdvice.java:166) ... 30 more {noformat} Error Message 2: {noformat} 05:58:02,405 ERROR [liferay/ehcache_cluster-1][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.kernel.dao.orm.FinderCache.com.liferay.portal.model.impl.PhoneImpl.List2 :2647133972934363004:[]:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more 05:58:02,847 ERROR [liferay/ehcache_cluster-2][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=testCacheId:two:TWO:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more 05:58:02,848 ERROR [liferay/ehcache_cluster-1][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=testCacheId:three:THREE:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more 05:58:02,848 ERROR [liferay/ehcache_cluster-3][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=testCacheId:one:ONE:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more {noformat} Expected result: No error will be seen in the whole process. Actual result: The Error Message 1 was thrown in first bundle when start up the second one. The Error Message 2 was thrown in second bundle when clicking on "Execute" through the portal which was started first.

    Liferay Issues | 4 years ago | Shitian "Shelton" Zhang
    java.lang.reflect.InvocationTargetException
  2. 0

    Steps to reproduce: 1. Set up two bundles. 2. In both bundles: Add the following properties to the portal-ext.properties: {noformat} cluster.link.enabled=true ehcache.cluster.link.replication.enabled=true {noformat} Add "replicatePutsViaCopy=true" under "defaultCache" section in liferay-multi-vm-clustered.xml (turn others to true also). {panel} <defaultCache eternal="false" maxElementsInMemory="10000" overflowToDisk="false" timeToIdleSeconds="600" > <cacheEventListenerFactory class="com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory" properties="{color:red}replicatePutsViaCopy=true,replicatePuts=true,replicateUpdatesViaCopy=true{color}" propertySeparator="," /> <bootstrapCacheLoaderFactory class="com.liferay.portal.cache.ehcache.LiferayBootstrapCacheLoaderFactory" /> </defaultCache> {panel} 3. Deploy ehcache-cluster-web plugins in both bundles. 4. Start up bundles in sequence. 5. On one bundle site, go to control panel -> server administration -> script. Choose language as Groovy, put script as: {code} com.liferay.portal.kernel.cache.PortalCache pc = com.liferay.portal.kernel.cache.MultiVMPoolUtil.getCache("testCacheId"); pc.put("one", "ONE"); pc.put("two", "TWO"); pc.put("three", "THREE"); {code} then hit "Execute" button. Error Message 1: {noformat} 05:54:44,276 ERROR [Incoming-2,LIFERAY-CONTROL-CHANNEL,Shelton-14829][ClusterRequestReceiver:92] Una ble to invoke method {arguments=[{arguments=null, methodKey=com.liferay.portal.service.PortletLocalS ervice.clearCompanyPortletsPool)}, com.liferay.portal.service.PortletLocalService, , null, {}], meth odKey=com.liferay.portal.cluster.ClusterableAdvice._invoke(com.liferay.portal.kernel.util.MethodHand ler,java.lang.String,java.lang.String,java.lang.Class,java.util.Map)} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:61) at com.liferay.portal.cluster.ClusterRequestReceiver.processClusterRequest(ClusterRequestRec eiver.java:237) at com.liferay.portal.cluster.ClusterRequestReceiver.receive(ClusterRequestReceiver.java:87) at org.jgroups.JChannel.invokeCallback(JChannel.java:749) at org.jgroups.JChannel.up(JChannel.java:710) at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1025) at org.jgroups.protocols.RSVP.up(RSVP.java:188) at org.jgroups.protocols.FRAG2.up(FRAG2.java:181) at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) at org.jgroups.protocols.pbcast.GMS.up(GMS.java:896) at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:245) at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:453) at org.jgroups.protocols.pbcast.NAKACK2.handleMessage(NAKACK2.java:763) at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:574) at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147) at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:187) at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288) at org.jgroups.protocols.MERGE3.up(MERGE3.java:290) at org.jgroups.protocols.Discovery.up(Discovery.java:359) at org.jgroups.protocols.TP.passMessageUp(TP.java:1263) at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1825) at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1793) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.InstantiationException: com.liferay.portal.service.PortletLocalService at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:58) at com.liferay.portal.cluster.ClusterableAdvice._invoke(ClusterableAdvice.java:163) ... 30 more 05:55:08,444 ERROR [Incoming-1,LIFERAY-CONTROL-CHANNEL,Shelton-14829][PortletBeanLocatorUtil:87] Bea nLocator is null for servlet context com.liferay.portal.service.PortletLocalService 05:55:08,446 ERROR [Incoming-1,LIFERAY-CONTROL-CHANNEL,Shelton-14829][ClusterRequestReceiver:92] Una ble to invoke method {arguments=[{arguments=null, methodKey=com.liferay.portal.service.PortletLocalS ervice.clearCompanyPortletsPool)}, com.liferay.portal.service.PortletLocalService, marketplace-portl et, null, {}], methodKey=com.liferay.portal.cluster.ClusterableAdvice._invoke(com.liferay.portal.ker nel.util.MethodHandler,java.lang.String,java.lang.String,java.lang.Class,java.util.Map)} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:61) at com.liferay.portal.cluster.ClusterRequestReceiver.processClusterRequest(ClusterRequestRec eiver.java:237) at com.liferay.portal.cluster.ClusterRequestReceiver.receive(ClusterRequestReceiver.java:87) at org.jgroups.JChannel.invokeCallback(JChannel.java:749) at org.jgroups.JChannel.up(JChannel.java:710) at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1025) at org.jgroups.protocols.RSVP.up(RSVP.java:188) at org.jgroups.protocols.FRAG2.up(FRAG2.java:181) at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) at org.jgroups.protocols.pbcast.GMS.up(GMS.java:896) at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:245) at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:453) at org.jgroups.protocols.pbcast.NAKACK2.handleMessage(NAKACK2.java:763) at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:574) at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147) at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:187) at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288) at org.jgroups.protocols.MERGE3.up(MERGE3.java:290) at org.jgroups.protocols.Discovery.up(Discovery.java:359) at org.jgroups.protocols.TP.passMessageUp(TP.java:1263) at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1825) at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1793) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for ser vlet context com.liferay.portal.service.PortletLocalService at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java: 46) at com.liferay.portal.cluster.ClusterableAdvice._invoke(ClusterableAdvice.java:166) ... 30 more {noformat} Error Message 2: {noformat} 05:58:02,405 ERROR [liferay/ehcache_cluster-1][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.portal.kernel.dao.orm.FinderCache.com.liferay.portal.model.impl.PhoneImpl.List2 :2647133972934363004:[]:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more 05:58:02,847 ERROR [liferay/ehcache_cluster-2][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=testCacheId:two:TWO:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more 05:58:02,848 ERROR [liferay/ehcache_cluster-1][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=testCacheId:three:THREE:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more 05:58:02,848 ERROR [liferay/ehcache_cluster-3][ParallelDestination:92] Unable to process message {de stinationName=liferay/ehcache_cluster, response=null, responseDestinationName=null, responseId=null, payload=testCacheId:one:ONE:PUT, values={CLUSTER_FORWARD_MESSAGE=true, companyId=0}} com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 32) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener .java:72) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69 ) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExe cutor.java:682) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor .java:593) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.liferay.portal.cache.cluster.clusterlink.messaging.ClusterLinkPortalCacheClusterListe ner.doReceive(ClusterLinkPortalCacheClusterListener.java:70) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java: 26) ... 5 more {noformat} Expected result: No error will be seen in the whole process. Actual result: The Error Message 1 was thrown in first bundle when start up the second one. The Error Message 2 was thrown in second bundle when clicking on "Execute" through the portal which was started first.

    Liferay Issues | 4 years ago | Shitian "Shelton" Zhang
    java.lang.reflect.InvocationTargetException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0
    samebug tip
    This happens when you try to instantiate a class that can't be instantiated, either because the class object is abstract, an interface, an array class, a primitive type, void, or because the class has no nullary constructor.
  5. 0

    Mojarra 2.1.0 - FCS doesn't work with tomcat 7

    Stack Overflow | 6 years ago | MahmoudS
    java.lang.InstantiationException: com.sun.faces.application.ServletContextSensitiveSingletonStore
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.InstantiationException

    com.liferay.portal.service.PortletLocalService

    at java.lang.Class.newInstance0()
  2. Java RT
    Class.newInstance
    1. java.lang.Class.newInstance0(Class.java:340)
    2. java.lang.Class.newInstance(Class.java:308)
    2 frames
  3. Liferay Portal Service
    MethodHandler.invoke
    1. com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:58)
    1 frame
  4. Liferay Portal Impl
    ClusterableAdvice._invoke
    1. com.liferay.portal.cluster.ClusterableAdvice._invoke(ClusterableAdvice.java:163)
    1 frame
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  6. Liferay Portal Service
    MethodHandler.invoke
    1. com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:61)
    1 frame
  7. Liferay Portal Impl
    ClusterRequestReceiver.receive
    1. com.liferay.portal.cluster.ClusterRequestReceiver.processClusterRequest(ClusterRequestReceiver.java:237)
    2. com.liferay.portal.cluster.ClusterRequestReceiver.receive(ClusterRequestReceiver.java:87)
    2 frames
  8. JGroups
    TP$IncomingPacket.run
    1. org.jgroups.JChannel.invokeCallback(JChannel.java:749)
    2. org.jgroups.JChannel.up(JChannel.java:710)
    3. org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1025)
    4. org.jgroups.protocols.RSVP.up(RSVP.java:188)
    5. org.jgroups.protocols.FRAG2.up(FRAG2.java:181)
    6. org.jgroups.protocols.FlowControl.up(FlowControl.java:400)
    7. org.jgroups.protocols.FlowControl.up(FlowControl.java:418)
    8. org.jgroups.protocols.pbcast.GMS.up(GMS.java:896)
    9. org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:245)
    10. org.jgroups.protocols.UNICAST2.up(UNICAST2.java:453)
    11. org.jgroups.protocols.pbcast.NAKACK2.handleMessage(NAKACK2.java:763)
    12. org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:574)
    13. org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)
    14. org.jgroups.protocols.FD_ALL.up(FD_ALL.java:187)
    15. org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288)
    16. org.jgroups.protocols.MERGE3.up(MERGE3.java:290)
    17. org.jgroups.protocols.Discovery.up(Discovery.java:359)
    18. org.jgroups.protocols.TP.passMessageUp(TP.java:1263)
    19. org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1825)
    20. org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1793)
    20 frames
  9. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    3. java.lang.Thread.run(Thread.java:662)
    3 frames