java.lang.reflect.InvocationTargetException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Check if you didn't set RequestProperty Content-Type to the wrong type or if you're trying to send the wrong file to the server.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • *Short description of the client’s issue:* During a Lucene Reindex with Liferay ClusterLink enabled, the reindex will fail with a method not invoked. This issue occurs within an environment in which HTTP traffic is disabled (SSL only) {noformat} InetAddress inetAddress = clusterNode.getInetAddress(); URL url = new URL( "http", inetAddress.getHostAddress(), clusterNode.getPort(), "/lucene/dump"); {noformat} *Steps to reproduce / testing done:* 1) Setup two Tomcat application servers (with Liferay installed) for SSL using: https://www.liferay.com/group/customer/kbase/-/knowledge_base/article/14406628 2) Ensure that within the server.xml files that the HTTP connector is commented out. Only the HTTPS connector should be available. (If using both nodes on the same machine, make sure the connector ports are unique) 3) Add the following properties to both nodes (make sure they are using the same database) to enable cluster link and lucene replication: {noformat} # # Clusterlink Properties # cluster.link.enabled=true ehcache.cluster.link.replication.enabled=true lucene.replicate.write=true {noformat} 4) Add the following plugins for the nodes: - Ehcache Cluster Web - [Make Users (support-tools)|https://in.liferay.com/documents/131474/1208991/make-users-portlet-6.1.20.1.war/6634b437-9bf4-45c1-b92e-17dc99e0b97c] - [Make Pages (support-tools)|https://in.liferay.com/documents/131474/1208991/pages-portlet-6.1.20.1.war/9678ea52-0c27-4c94-8a4a-32b2b2970386] 5) Startup both nodes. 6) On Node 1: - Add the 'Add Users' and 'Pages' portlets to the page - Create a few test users and pages (default settings are fine) 7) Navigate to Control Panel -> Server Administration -> Reindex all search indexes. 8) On the first node, once indexing is complete, you should see this message. 21:20:12,946 INFO [com.liferay.portlet.admin.action.EditServerAction-1][EditServerAction:951] Monitor thread name com.liferay.portlet.admin.action.EditServerAction-1 with thread ID 136 unlocked latch. Notified peers to start index loading. 9) On the second node, you should see a message in which the method failed to invoke.
    via by Sherry Yang,
  • *Short description of the client’s issue:* During a Lucene Reindex with Liferay ClusterLink enabled, the reindex will fail with a method not invoked. This issue occurs within an environment in which HTTP traffic is disabled (SSL only) {noformat} InetAddress inetAddress = clusterNode.getInetAddress(); URL url = new URL( "http", inetAddress.getHostAddress(), clusterNode.getPort(), "/lucene/dump"); {noformat} *Steps to reproduce / testing done:* 1) Setup two Tomcat application servers (with Liferay installed) for SSL using: https://www.liferay.com/group/customer/kbase/-/knowledge_base/article/14406628 2) Ensure that within the server.xml files that the HTTP connector is commented out. Only the HTTPS connector should be available. (If using both nodes on the same machine, make sure the connector ports are unique) 3) Add the following properties to both nodes (make sure they are using the same database) to enable cluster link and lucene replication: {noformat} # # Clusterlink Properties # cluster.link.enabled=true ehcache.cluster.link.replication.enabled=true lucene.replicate.write=true {noformat} 4) Add the following plugins for the nodes: - Ehcache Cluster Web - [Make Users (support-tools)|https://in.liferay.com/documents/131474/1208991/make-users-portlet-6.1.20.1.war/6634b437-9bf4-45c1-b92e-17dc99e0b97c] - [Make Pages (support-tools)|https://in.liferay.com/documents/131474/1208991/pages-portlet-6.1.20.1.war/9678ea52-0c27-4c94-8a4a-32b2b2970386] 5) Startup both nodes. 6) On Node 1: - Add the 'Add Users' and 'Pages' portlets to the page - Create a few test users and pages (default settings are fine) 7) Navigate to Control Panel -> Server Administration -> Reindex all search indexes. 8) On the first node, once indexing is complete, you should see this message. 21:20:12,946 INFO [com.liferay.portlet.admin.action.EditServerAction-1][EditServerAction:951] Monitor thread name com.liferay.portlet.admin.action.EditServerAction-1 with thread ID 136 unlocked latch. Notified peers to start index loading. 9) On the second node, you should see a message in which the method failed to invoke.
    via by Sherry Yang,
  • java.io.IOException: Invalid Http response
    via Stack Overflow by AlexP
    ,
  • Salem • View topic - Constant crash when login
    via by Unknown author,
  • java.io.IOException: Invalid Http response
    via by Unknown author,
    • java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:61) at com.liferay.portal.cluster.ClusterRequestReceiver.processClusterRequest(ClusterRequestReceiver.java:238) at com.liferay.portal.cluster.ClusterRequestReceiver.receive(ClusterRequestReceiver.java:88) 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.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: com.liferay.portal.kernel.exception.SystemException: java.io.IOException: Invalid Http response at com.liferay.portal.search.lucene.LuceneHelperImpl.getLoadIndexesInputStreamFromCluster(LuceneHelperImpl.java:475) at com.liferay.portal.search.lucene.LuceneHelperUtil.getLoadIndexesInputStreamFromCluster(LuceneHelperUtil.java:326) at com.liferay.portal.search.lucene.cluster.LuceneClusterUtil.loadIndexesFromCluster(LuceneClusterUtil.java:57) ... 30 more Caused by: java.io.IOException: Invalid Http response at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1342) at com.liferay.portal.search.lucene.LuceneHelperImpl.getLoadIndexesInputStreamFromCluster(LuceneHelperImpl.java:470) ... 32 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    MattyMatty
    10 times, last one,
    Unknown UserUnknown User
    1 times, last one,
    tyson925tyson925
    4 times, last one,
    rprp
    1 times, last one,
    74 more bugmates