java.lang.ClassCastException: org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue

Spring JIRA | Alan Hamilton | 5 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    A manually created Controller with a RequestMapping with multiple paths causes a ClassCastException when trying to run 'web mvc all'. An example RequestMapping would be: @RequestMapping(value = {"/", "/foo"}) I have tested this in 1.2.0, and looking at the source for ControllerOperationsImpl it looks like it is still a problem with the latest version of Roo. In the roo shell, the error looks like this (with version 1.2.0 of Roo): roo> web mvc all --package ~.web Your controller was created outside of the project's top level package and is therefore not included in the preconfigured component scanning. Please adjust your component scanning manually in webmvc-config.xml org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue java.lang.ClassCastException: org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.getExistingController(ControllerOperationsImpl.java:158) at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.createAutomaticController(ControllerOperationsImpl.java:114) at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.generateAll(ControllerOperationsImpl.java:102) at org.springframework.roo.addon.web.mvc.controller.ControllerCommands.webMvcAll(ControllerCommands.java:65) 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 org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:183) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:146) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:205) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:404) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158) at java.lang.Thread.run(Thread.java:662)

    Spring JIRA | 5 years ago | Alan Hamilton
    java.lang.ClassCastException: org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue
  2. 0

    A manually created Controller with a RequestMapping with multiple paths causes a ClassCastException when trying to run 'web mvc all'. An example RequestMapping would be: @RequestMapping(value = {"/", "/foo"}) I have tested this in 1.2.0, and looking at the source for ControllerOperationsImpl it looks like it is still a problem with the latest version of Roo. In the roo shell, the error looks like this (with version 1.2.0 of Roo): roo> web mvc all --package ~.web Your controller was created outside of the project's top level package and is therefore not included in the preconfigured component scanning. Please adjust your component scanning manually in webmvc-config.xml org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue java.lang.ClassCastException: org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.getExistingController(ControllerOperationsImpl.java:158) at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.createAutomaticController(ControllerOperationsImpl.java:114) at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.generateAll(ControllerOperationsImpl.java:102) at org.springframework.roo.addon.web.mvc.controller.ControllerCommands.webMvcAll(ControllerCommands.java:65) 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 org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:183) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:146) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:205) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:404) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158) at java.lang.Thread.run(Thread.java:662)

    Spring JIRA | 5 years ago | Alan Hamilton
    java.lang.ClassCastException: org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue
  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

    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.

    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

      org.springframework.roo.classpath.details.annotations.ArrayAttributeValue cannot be cast to org.springframework.roo.classpath.details.annotations.StringAttributeValue

      at org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.getExistingController()
    2. org.springframework.roo
      ControllerCommands.webMvcAll
      1. org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.getExistingController(ControllerOperationsImpl.java:158)
      2. org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.createAutomaticController(ControllerOperationsImpl.java:114)
      3. org.springframework.roo.addon.web.mvc.controller.ControllerOperationsImpl.generateAll(ControllerOperationsImpl.java:102)
      4. org.springframework.roo.addon.web.mvc.controller.ControllerCommands.webMvcAll(ControllerCommands.java:65)
      4 frames
    3. 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
    4. org.springframework.roo
      JLineShell.run
      1. org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
      2. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49)
      3. org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:183)
      4. org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:146)
      5. org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
      6. org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:205)
      7. org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:404)
      8. org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158)
      8 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:662)
      1 frame