java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • nested static inner classes (which may be generated by JAXB) result in an error message, see below. Using only one level of nesting works. package com.test; public class Test1 { static class Test1a { static class Test2a { } } } Compilation unit package 'com.test.Test1a' unexpected for type 'com.test' java.lang.IllegalArgumentException: Compilation unit package 'com.test.Test1a' unexpected for type 'com.test' at org.apache.commons.lang3.Validate.isTrue(Validate.java:155) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:178) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336) at org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeFromString(JavaParserTypeParsingService.java:139) at org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeAtLocation(JavaParserTypeParsingService.java:118) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.get(DefaultPhysicalTypeMetadataProvider.java:94) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:214) at org.springframework.roo.metadata.DefaultMetadataService.evictAndGet(DefaultMetadataService.java:121) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:183) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:429) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:642) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:280) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:235) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:152) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:197) at java.lang.Thread.run(Unknown Source)
    via by Gerolf Scherr,
  • nested static inner classes (which may be generated by JAXB) result in an error message, see below. Using only one level of nesting works. package com.test; public class Test1 { static class Test1a { static class Test2a { } } } Compilation unit package 'com.test.Test1a' unexpected for type 'com.test' java.lang.IllegalArgumentException: Compilation unit package 'com.test.Test1a' unexpected for type 'com.test' at org.apache.commons.lang3.Validate.isTrue(Validate.java:155) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:178) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336) at org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeFromString(JavaParserTypeParsingService.java:139) at org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeAtLocation(JavaParserTypeParsingService.java:118) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.get(DefaultPhysicalTypeMetadataProvider.java:94) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:214) at org.springframework.roo.metadata.DefaultMetadataService.evictAndGet(DefaultMetadataService.java:121) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:183) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:429) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:642) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:280) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:235) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:152) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:197) at java.lang.Thread.run(Unknown Source)
    via by Gerolf Scherr,
  • If a JPA Entity is annotated with @Embeddable, Roo fails to generate ApplicationConversionServiceFactoryBean_Roo_ConversionService (ultimately resulting in no Roo files being generated). Steps to reproduce: // Spring Roo 1.3.1.RELEASE [rev f4f5256] log opened at 2015-04-20 11:58:19 project --topLevelPackage com.foo jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity jpa --class ~.Bar // At this point, add @Embeddable annotation to the class, then continue: web mvc setup web mvc scaffold --class ~.Bar // [failed] web mvc scaffold --class ~.BarController With 'development mode' turned on, error message looks like this: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService') java.lang.IllegalArgumentException: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService') at org.apache.commons.lang3.Validate.isTrue(Validate.java:155) at org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:286) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:187) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.getInstallEmbeddableConvertersMethod(ConversionServiceMetadata.java:141) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.<init>(ConversionServiceMetadata.java:123) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadataProviderImpl.getMetadata(ConversionServiceMetadataProviderImpl.java:220) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:264) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:212) at org.springframework.roo.metadata.DefaultMetadataService.evictAndGet(DefaultMetadataService.java:121) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:601) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:325) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:200) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:250) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:433) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publishRequestedFileEvents(PollingFileMonitorService.java:456) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:660) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:335) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:71) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:44) at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:242) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:149) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:421) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:539) at java.lang.Thread.run(Thread.java:745)
    via by Alan Hamilton,
  • If a JPA Entity is annotated with @Embeddable, Roo fails to generate ApplicationConversionServiceFactoryBean_Roo_ConversionService (ultimately resulting in no Roo files being generated). Steps to reproduce: // Spring Roo 1.3.1.RELEASE [rev f4f5256] log opened at 2015-04-20 11:58:19 project --topLevelPackage com.foo jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity jpa --class ~.Bar // At this point, add @Embeddable annotation to the class, then continue: web mvc setup web mvc scaffold --class ~.Bar // [failed] web mvc scaffold --class ~.BarController With 'development mode' turned on, error message looks like this: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService') java.lang.IllegalArgumentException: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService') at org.apache.commons.lang3.Validate.isTrue(Validate.java:155) at org.springframework.roo.classpath.details.ItdTypeDetailsBuilder.onAddMethod(ItdTypeDetailsBuilder.java:286) at org.springframework.roo.classpath.details.AbstractMemberHoldingTypeDetailsBuilder.addMethod(AbstractMemberHoldingTypeDetailsBuilder.java:187) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.getInstallEmbeddableConvertersMethod(ConversionServiceMetadata.java:141) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadata.<init>(ConversionServiceMetadata.java:123) at org.springframework.roo.addon.web.mvc.controller.converter.ConversionServiceMetadataProviderImpl.getMetadata(ConversionServiceMetadataProviderImpl.java:220) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:264) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:212) at org.springframework.roo.metadata.DefaultMetadataService.evictAndGet(DefaultMetadataService.java:121) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:601) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:325) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:200) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:250) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:433) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publishRequestedFileEvents(PollingFileMonitorService.java:456) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:660) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:335) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:71) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:44) at org.springframework.roo.shell.AbstractShell.executeCommandImpl(AbstractShell.java:242) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:149) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:421) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:539) at java.lang.Thread.run(Thread.java:745)
    via by Alan Hamilton,
  • Why does my FrameLayout have 0 height?
    via Stack Overflow by George
    ,
  • Integer is too big for 4 bytes
    via GitHub by sharkck
    ,
    • java.lang.IllegalArgumentException: Compilation unit package 'com.test.Test1a' unexpected for type 'com.test' at org.apache.commons.lang3.Validate.isTrue(Validate.java:155) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:178) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336) at org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336) at org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeFromString(JavaParserTypeParsingService.java:139) at org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeAtLocation(JavaParserTypeParsingService.java:118) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.get(DefaultPhysicalTypeMetadataProvider.java:94) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:214) at org.springframework.roo.metadata.DefaultMetadataService.evictAndGet(DefaultMetadataService.java:121) at org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:183) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:429) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:642) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:280) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:235) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:152) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:197) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    tvrmsmithtvrmsmith
    2 times, last one,
    aldrinlealaldrinleal
    54 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,