java.lang.IllegalStateException: Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean

Spring JIRA | Brad Murray | 6 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

    In our app we had already defined an annotation based ConversionService that was used for calculating the display value of different objects. The ApplicationConversionServiceFactory centralised all of this, but due to not wanting to refactor code close to a major project milestone I decided to just disable the new Roo conversions that we don't need, by pushing in "installLabelConverters" from the ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj This results in the following error by Roo: 79eaa4c Updated SRC_MAIN_JAVA\*\*\*\web\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean java.lang.IllegalStateException: Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.getInstallMethodBuilder(ConversionServiceMetadata.java:107) It seems to run counter to Roo, and .ajs in general that we don't have freedom to push-in and override where we like. The presence of a specific error message for this scenario however makes me think its deliberate. What would be the recommended approach then to disable all of the auto-generated conversions, because quite frankly they are useless in current state. They just take the first 4 fields of the domain object.

    Spring JIRA | 6 years ago | Brad Murray
    java.lang.IllegalStateException: Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean
  2. 0

    In our app we had already defined an annotation based ConversionService that was used for calculating the display value of different objects. The ApplicationConversionServiceFactory centralised all of this, but due to not wanting to refactor code close to a major project milestone I decided to just disable the new Roo conversions that we don't need, by pushing in "installLabelConverters" from the ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj This results in the following error by Roo: 79eaa4c Updated SRC_MAIN_JAVA\*\*\*\web\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean java.lang.IllegalStateException: Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.getInstallMethodBuilder(ConversionServiceMetadata.java:107) It seems to run counter to Roo, and .ajs in general that we don't have freedom to push-in and override where we like. The presence of a specific error message for this scenario however makes me think its deliberate. What would be the recommended approach then to disable all of the auto-generated conversions, because quite frankly they are useless in current state. They just take the first 4 fields of the domain object.

    Spring JIRA | 6 years ago | Brad Murray
    java.lang.IllegalStateException: Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Did not expect to find installLabelConverters method in *.*.*.web.ApplicationConversionServiceFactoryBean

      at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.getInstallMethodBuilder()
    2. Spring Roo - Annotations (ASLv2 Licensed)
      ConversionServiceMetadata.getInstallMethodBuilder
      1. org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.getInstallMethodBuilder(ConversionServiceMetadata.java:107)
      1 frame