java.lang.IllegalStateException: Can't find class used for type of option 'myField': String

Spring JIRA | Karol Dowbecki | 2 years 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

    Spring XD 1.1 container will throw following exception: {code} java.lang.IllegalStateException: Can't find class used for type of option 'myField': String at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.makeSimpleModuleOptions(DefaultModuleOptionsMetadataResolver.java:147) at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolveNormalMetadata(DefaultModuleOptionsMetadataResolver.java:202) at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolve(DefaultModuleOptionsMetadataResolver.java:164) at org.springframework.xd.module.options.DelegatingModuleOptionsMetadataResolver.resolve(DelegatingModuleOptionsMetadataResolver.java:44) at org.springframework.xd.module.options.EnvironmentAwareModuleOptionsMetadataResolver.resolve(EnvironmentAwareModuleOptionsMetadataResolver.java:127) at org.springframework.xd.dirt.stream.XDStreamParser.parse(XDStreamParser.java:174) at org.springframework.xd.dirt.stream.AbstractDeployer.save(AbstractDeployer.java:96) ... {code} when module properties have a trailing whitespace character in type property (in example below there is a trailing space in options.myField.type value): {code} options.myField.description = this is my field options.myField.type = String {code} Can the property values be trimmed before comparing to DefaultModuleOptionsMetadataResolver#SHORT_CLASSNAMES map to avoid this problem?

    Spring JIRA | 2 years ago | Karol Dowbecki
    java.lang.IllegalStateException: Can't find class used for type of option 'myField': String
  2. 0

    Spring XD 1.1 container will throw following exception: {code} java.lang.IllegalStateException: Can't find class used for type of option 'myField': String at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.makeSimpleModuleOptions(DefaultModuleOptionsMetadataResolver.java:147) at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolveNormalMetadata(DefaultModuleOptionsMetadataResolver.java:202) at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolve(DefaultModuleOptionsMetadataResolver.java:164) at org.springframework.xd.module.options.DelegatingModuleOptionsMetadataResolver.resolve(DelegatingModuleOptionsMetadataResolver.java:44) at org.springframework.xd.module.options.EnvironmentAwareModuleOptionsMetadataResolver.resolve(EnvironmentAwareModuleOptionsMetadataResolver.java:127) at org.springframework.xd.dirt.stream.XDStreamParser.parse(XDStreamParser.java:174) at org.springframework.xd.dirt.stream.AbstractDeployer.save(AbstractDeployer.java:96) ... {code} when module properties have a trailing whitespace character in type property (in example below there is a trailing space in options.myField.type value): {code} options.myField.description = this is my field options.myField.type = String {code} Can the property values be trimmed before comparing to DefaultModuleOptionsMetadataResolver#SHORT_CLASSNAMES map to avoid this problem?

    Spring JIRA | 2 years ago | Karol Dowbecki
    java.lang.IllegalStateException: Can't find class used for type of option 'myField': String

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Can't find class used for type of option 'myField': String

      at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.makeSimpleModuleOptions()
    2. org.springframework.xd
      AbstractDeployer.save
      1. org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.makeSimpleModuleOptions(DefaultModuleOptionsMetadataResolver.java:147)
      2. org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolveNormalMetadata(DefaultModuleOptionsMetadataResolver.java:202)
      3. org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolve(DefaultModuleOptionsMetadataResolver.java:164)
      4. org.springframework.xd.module.options.DelegatingModuleOptionsMetadataResolver.resolve(DelegatingModuleOptionsMetadataResolver.java:44)
      5. org.springframework.xd.module.options.EnvironmentAwareModuleOptionsMetadataResolver.resolve(EnvironmentAwareModuleOptionsMetadataResolver.java:127)
      6. org.springframework.xd.dirt.stream.XDStreamParser.parse(XDStreamParser.java:174)
      7. org.springframework.xd.dirt.stream.AbstractDeployer.save(AbstractDeployer.java:96)
      7 frames