java.lang.IllegalArgumentException: Compilation unit package 'com.test.Test1a' unexpected for type 'com.test'

Spring JIRA | Gerolf Scherr | 4 years ago
  1. 0

    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)

    Spring JIRA | 4 years ago | Gerolf Scherr
    java.lang.IllegalArgumentException: Compilation unit package 'com.test.Test1a' unexpected for type 'com.test'
  2. 0

    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)

    Spring JIRA | 4 years ago | Gerolf Scherr
    java.lang.IllegalArgumentException: Compilation unit package 'com.test.Test1a' unexpected for type 'com.test'
  3. 0

    Stacktrace on survival, adventure, spectator inventory close

    GitHub | 1 year ago | mhsjlw
    java.lang.IllegalArgumentException: stack amount must be greater than zero
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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)

    Spring JIRA | 2 years ago | Alan Hamilton
    java.lang.IllegalArgumentException: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService')
  6. 0

    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)

    Spring JIRA | 2 years ago | Alan Hamilton
    java.lang.IllegalArgumentException: Method 'getBarToStringConverter' already defined in ITD (ITD target 'com.foo.ApplicationConversionServiceFactoryBean_Roo_ConversionService')

  1. aldrinleal 54 times, last 5 months ago
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.IllegalArgumentException

    Compilation unit package 'com.test.Test1a' unexpected for type 'com.test'

    at org.apache.commons.lang3.Validate.isTrue()
  2. Commons Lang
    Validate.isTrue
    1. org.apache.commons.lang3.Validate.isTrue(Validate.java:155)
    1 frame
  3. org.springframework.roo
    DefaultProcessManager$2.run
    1. org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:178)
    2. org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336)
    3. org.springframework.roo.classpath.javaparser.details.JavaParserClassOrInterfaceTypeDetailsBuilder.build(JavaParserClassOrInterfaceTypeDetailsBuilder.java:336)
    4. org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeFromString(JavaParserTypeParsingService.java:139)
    5. org.springframework.roo.classpath.javaparser.JavaParserTypeParsingService.getTypeAtLocation(JavaParserTypeParsingService.java:118)
    6. org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.get(DefaultPhysicalTypeMetadataProvider.java:94)
    7. org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:214)
    8. org.springframework.roo.metadata.DefaultMetadataService.evictAndGet(DefaultMetadataService.java:121)
    9. org.springframework.roo.classpath.DefaultPhysicalTypeMetadataProvider.onFileEvent(DefaultPhysicalTypeMetadataProvider.java:183)
    10. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:429)
    11. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:642)
    12. org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:280)
    13. org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:235)
    14. org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:152)
    15. org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:197)
    15 frames
  4. Java RT
    Thread.run
    1. java.lang.Thread.run(Unknown Source)
    1 frame