java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String

Liferay Issues | Brian Chiu | 1 year ago
  1. 0

    I tested this at the following commit: {code}commit a57f8ea00f17808daabc0c4131a5d3dd0342d60f Author: shuyangzhou <shuyang.zhou@liferay.com> Date: Thu Jun 25 16:53:25 2015 -0700 LPS-56280 Inline those methods is more readable{code} Steps to reproduce: # Start Liferay # Shut down Liferay Expected result: Liferay should shut down without exceptions. Actual result: The following exception + stacktrace will appear. {code}17:26:55,200 ERROR [localhost-startStop-1][MainServlet:164] java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String at com.liferay.portal.kernel.portlet.bridges.mvc.MVCCommandCache$MVCCommandServiceTrackerCustomizer.removedService(MVCCommandCache.java:194) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCCommandCache$MVCCommandServiceTrackerCustomizer.removedService(MVCCommandCache.java:158) at com.liferay.registry.internal.ServiceTrackerCustomizerAdapter.removedService(ServiceTrackerCustomizerAdapter.java:51) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1) at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341) at org.osgi.util.tracker.ServiceTracker.close(ServiceTracker.java:377) at com.liferay.registry.internal.ServiceTrackerWrapper.close(ServiceTrackerWrapper.java:46) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCCommandCache.close(MVCCommandCache.java:70) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.destroy(MVCPortlet.java:63) at com.liferay.portlet.InvokerPortletImpl.destroy(InvokerPortletImpl.java:211) at com.liferay.portlet.MonitoringPortlet.destroy(MonitoringPortlet.java:67) at com.liferay.portlet.PortletInstanceFactoryImpl.clear(PortletInstanceFactoryImpl.java:63) at com.liferay.portlet.PortletInstanceFactoryImpl.clear(PortletInstanceFactoryImpl.java:48) at com.liferay.portlet.PortletInstanceFactoryImpl.destroy(PortletInstanceFactoryImpl.java:208) at com.liferay.portlet.PortletInstanceFactoryUtil.destroy(PortletInstanceFactoryUtil.java:49) at com.liferay.portal.servlet.MainServlet.destroyPortlets(MainServlet.java:658) at com.liferay.portal.servlet.MainServlet.destroy(MainServlet.java:161) at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1486) at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1847) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5711) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1591) at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1580) at java.util.concurrent.FutureTask.run(FutureTask.java:262) 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:745){code} For a more full console output, see Jenkins: https://test-1-2.liferay.com/view/test-portal-acceptance-upstream(master)/job/test-portal-acceptance-upstream-frontend-tomcat-hsql(master)/label_exp=!test-1-2,test=PortalSmoke%23Smoke/lastCompletedBuild/console

    Liferay Issues | 1 year ago | Brian Chiu
    java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
  2. 0

    impossible to filter a field which data type is integer/numeric

    GitHub | 4 years ago | erwanj
    java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
  3. 0

    Trying to read from a file but keep getting errors - Java Programming Help - KnowCoding.com

    knowcoding.com | 1 year ago
    java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to copy (the contents of) ArrayList to a String array[]?

    Coderanch | 4 years ago | Ashish Dutt
    java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;

    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.ClassCastException

      [Ljava.lang.String; cannot be cast to java.lang.String

      at com.liferay.portal.kernel.portlet.bridges.mvc.MVCCommandCache$MVCCommandServiceTrackerCustomizer.removedService()
    2. com.liferay.portal
      MVCCommandCache$MVCCommandServiceTrackerCustomizer.removedService
      1. com.liferay.portal.kernel.portlet.bridges.mvc.MVCCommandCache$MVCCommandServiceTrackerCustomizer.removedService(MVCCommandCache.java:194)
      2. com.liferay.portal.kernel.portlet.bridges.mvc.MVCCommandCache$MVCCommandServiceTrackerCustomizer.removedService(MVCCommandCache.java:158)
      2 frames
    3. com.liferay.registry
      ServiceTrackerCustomizerAdapter.removedService
      1. com.liferay.registry.internal.ServiceTrackerCustomizerAdapter.removedService(ServiceTrackerCustomizerAdapter.java:51)
      1 frame
    4. OSGi
      ServiceTracker.close
      1. org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)
      2. org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
      3. org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
      4. org.osgi.util.tracker.ServiceTracker.close(ServiceTracker.java:377)
      4 frames
    5. com.liferay.registry
      ServiceTrackerWrapper.close
      1. com.liferay.registry.internal.ServiceTrackerWrapper.close(ServiceTrackerWrapper.java:46)
      1 frame
    6. com.liferay.portal
      MVCPortlet.destroy
      1. com.liferay.portal.kernel.portlet.bridges.mvc.MVCCommandCache.close(MVCCommandCache.java:70)
      2. com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.destroy(MVCPortlet.java:63)
      2 frames
    7. Liferay Portal Service
      PortletInstanceFactoryUtil.destroy
      1. com.liferay.portlet.InvokerPortletImpl.destroy(InvokerPortletImpl.java:211)
      2. com.liferay.portlet.MonitoringPortlet.destroy(MonitoringPortlet.java:67)
      3. com.liferay.portlet.PortletInstanceFactoryImpl.clear(PortletInstanceFactoryImpl.java:63)
      4. com.liferay.portlet.PortletInstanceFactoryImpl.clear(PortletInstanceFactoryImpl.java:48)
      5. com.liferay.portlet.PortletInstanceFactoryImpl.destroy(PortletInstanceFactoryImpl.java:208)
      6. com.liferay.portlet.PortletInstanceFactoryUtil.destroy(PortletInstanceFactoryUtil.java:49)
      6 frames
    8. Liferay Portal Impl
      MainServlet.destroy
      1. com.liferay.portal.servlet.MainServlet.destroyPortlets(MainServlet.java:658)
      2. com.liferay.portal.servlet.MainServlet.destroy(MainServlet.java:161)
      2 frames
    9. Glassfish Core
      ContainerBase$StopChild.call
      1. org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1486)
      2. org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1847)
      3. org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      4. org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5711)
      5. org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      6. org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1591)
      7. org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1580)
      7 frames
    10. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3 frames