java.lang.ClassCastException: java.util.Collections$UnmodifiableList cannot be cast to java.lang.String

MuleSoft JIRA | David Cisneros | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When sending a request with duplicate Content-Type headers an exception is raised: {quote} Exception occurred processing request: java.lang.ClassCastException: java.util.Collections$UnmodifiableList cannot be cast to java.lang.String at org.mule.DefaultMuleMessage.updateDataTypeWithProperty(DefaultMuleMessage.java:537) at org.mule.DefaultMuleMessage.setProperty(DefaultMuleMessage.java:496) at org.mule.DefaultMuleMessage.setProperty(DefaultMuleMessage.java:488) at org.mule.DefaultMuleMessage.addProperties(DefaultMuleMessage.java:1336) at org.mule.DefaultMuleMessage.<init>(DefaultMuleMessage.java:193) at org.mule.DefaultMuleMessage.<init>(DefaultMuleMessage.java:170) at org.mule.module.http.internal.listener.HttpRequestToMuleEvent.transform(HttpRequestToMuleEvent.java:126) at org.mule.module.http.internal.listener.DefaultHttpListener.createEvent(DefaultHttpListener.java:180) at org.mule.module.http.internal.listener.DefaultHttpListener.access$000(DefaultHttpListener.java:46) at org.mule.module.http.internal.listener.DefaultHttpListener$1.handleRequest(DefaultHttpListener.java:131) at org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:83) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:102) at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:30) at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:125) 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) {quote} Steps to reproduce: - Create a simple Mule Project with a HttpListener and a Logger. - Send a request (POST) with duplicate Content-Type header {quote} LISTENER POST /test HTTP/1.1 Host: cisco-spark-test-endpoint.cloudhub.io X-Real-IP: 54.216.252.112 Content-Length: 1293 Accept: / Content-type: application/json; charset=utf-8 Content-type: application/json; charset=utf-8 User-Agent: AHC/1.0 X-Forwarded-For: 54.216.252.112 X-Forwarded-Port: 80 X-Forwarded-Proto: http \{"message":"123"} {quote} Insight: It seems to be a problem when the properties are set based on the received headers and then passed to the constructor of a DefaultMuleMessage https://github.com/mulesoft/mule/blob/mule-3.8.0/modules/http/src/main/java/org/mule/module/http/internal/listener/HttpRequestToMuleEvent.java Lines: 56-63 https://github.com/mulesoft/mule/blob/mule-3.8.0/core/src/main/java/org/mule/DefaultMuleMessage.java Line: 537 Notes: Cisco is facing this problem due to an external system that is duplicating the headers and they don't have control over it.

    MuleSoft JIRA | 8 months ago | David Cisneros
    java.lang.ClassCastException: java.util.Collections$UnmodifiableList cannot be cast to java.lang.String
  2. 0

    Help:basic RMI question

    Google Groups | 2 decades ago | Paolo De Lutiis
    java.lang.ClassCastException: serverPackage.ServerClass_Stub at clientPackage.myApplet.init(myApplet.java:line#) at sun.applet.AppletPanel.run(AppletPanel.java:273) at java.lang.Thread.
  3. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188
  6. 0

    SWTBot/Troubleshooting - Eclipsepedia

    eclipse.org | 1 year ago
    java.lang.ClassCastException: org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:331) at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:208) at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication .runTests(UITestApplication.java:115) at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)

    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

      java.util.Collections$UnmodifiableList cannot be cast to java.lang.String

      at org.mule.DefaultMuleMessage.updateDataTypeWithProperty()
    2. Mule Core
      DefaultMuleMessage.<init>
      1. org.mule.DefaultMuleMessage.updateDataTypeWithProperty(DefaultMuleMessage.java:537)
      2. org.mule.DefaultMuleMessage.setProperty(DefaultMuleMessage.java:496)
      3. org.mule.DefaultMuleMessage.setProperty(DefaultMuleMessage.java:488)
      4. org.mule.DefaultMuleMessage.addProperties(DefaultMuleMessage.java:1336)
      5. org.mule.DefaultMuleMessage.<init>(DefaultMuleMessage.java:193)
      6. org.mule.DefaultMuleMessage.<init>(DefaultMuleMessage.java:170)
      6 frames
    3. Mule HTTP Connector
      GrizzlyRequestDispatcherFilter.handleRead
      1. org.mule.module.http.internal.listener.HttpRequestToMuleEvent.transform(HttpRequestToMuleEvent.java:126)
      2. org.mule.module.http.internal.listener.DefaultHttpListener.createEvent(DefaultHttpListener.java:180)
      3. org.mule.module.http.internal.listener.DefaultHttpListener.access$000(DefaultHttpListener.java:46)
      4. org.mule.module.http.internal.listener.DefaultHttpListener$1.handleRequest(DefaultHttpListener.java:131)
      5. org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:83)
      5 frames
    4. Grizzly
      AbstractIOStrategy.fireIOEvent
      1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
      3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
      4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
      5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
      6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      7. org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
      8. org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      8 frames
    5. Mule HTTP Connector
      ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run
      1. org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:102)
      2. org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:30)
      3. org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:125)
      3 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames