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.

  • To recreate this issue, run these commands in development mode: {code}project --topLevelPackage com.example persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY{code} Then with the shell still running, create a new Java class as follows: {code}package com.example.domain; public class Pizza { }{code} The shell throws this error: {code}Parsing failure for '/Users/aswan/projects/bugs/jpa/src/main/java/com/example/domain/Pizza.java' (development mode diagnostics) java.lang.IllegalArgumentException: Could not locate 'Pizza' in compilation unit at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:67) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:152) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:216) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:268) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:149) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:214) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68) at java.lang.Thread.run(Thread.java:680) {code}
    via by Andrew Swan,
  • To recreate this issue, run these commands in development mode: {code}project --topLevelPackage com.example persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY{code} Then with the shell still running, create a new Java class as follows: {code}package com.example.domain; public class Pizza { }{code} The shell throws this error: {code}Parsing failure for '/Users/aswan/projects/bugs/jpa/src/main/java/com/example/domain/Pizza.java' (development mode diagnostics) java.lang.IllegalArgumentException: Could not locate 'Pizza' in compilation unit at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:67) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:152) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:216) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:268) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:149) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:214) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68) at java.lang.Thread.run(Thread.java:680) {code}
    via by Andrew Swan,
  • *There are valid Java packages not accepted by Roo* For example: {quote} org.gvnix._2009_03_31 {quote} Underscores and numbers are valid Java identifiers for package, however Roo throws an error when classes on this package are managed. {code} java.lang.IllegalArgumentException: The first letter of the type name portion must be uppercase (attempted 'org.gvnix._2009_03_31') at org.springframework.roo.model.JavaType.<init>(JavaType.java:120) at org.springframework.roo.model.JavaType.<init>(JavaType.java:91) at org.springframework.roo.model.JavaType.getEnclosingType(JavaType.java:293) at org.springframework.roo.model.JavaType.getPackage(JavaType.java:260) at org.springframework.roo.classpath.javaparser.JavaParserMutableClassOrInterfaceTypeDetails.<init>(JavaParserMutableClassOrInterfaceTypeDetails.java:125) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:70) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:146) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:133) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:151) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:209) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:126) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:170) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:124) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:354) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:327) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:167) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:114) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:225) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:75) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) {code} *There are valid Java types not accepted by Roo* For example: {quote} JAXB data binding library generates a package-info.java class. {quote} Java classes starting with lowercase letter are discouraged but accepted.
    via by Mario Martínez Sánchez - gvNIX - DISID,
  • refined from ROO-1900; upgrade to Roo-1.1.1 creates new failure: The problem is caused by 'complex' String literal, as used in RequestMapping static final String URLPATH="myService"; @RequestMapping("/"+URLPATH) To reproduce: > cd rootest > roo-dev roo> project --topLevelPackage mypkg Then save this file in rootest/src/main/java/mypkg/MyService.java package mypkg; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; public interface MyService { final static String URLPATH = "myService"; @Controller @RequestMapping("/"+URLPATH) public static class Cont implements MyService {} } [Timer-0] Parsing failure for 'C:\Data\Programs\java\rootest\src\main\java\mypkg\MyService.java' (development mode diagnostics) java.lang.IllegalArgumentException: Object of class [japa.parser.ast.expr.NameExpr] must be an instance of class japa.parser.ast.expr.StringLiteralExpr at org.springframework.roo.support.util.Assert.isInstanceOf(Assert.java:337) at org.springframework.roo.support.util.Assert.isInstanceOf(Assert.java:319) at org.springframework.roo.classpath.javaparser.details.JavaParserAnnotationMetadata.convert(JavaParserAnnotationMetadata.java:159) at org.springframework.roo.classpath.javaparser.details.JavaParserAnnotationMetadata.<init>(JavaParserAnnotationMetadata.java:98) at org.springframework.roo.classpath.javaparser.JavaParserClassOrInterfaceTypeDetails.<init>(JavaParserClassOrInterfaceTypeDetails.java:258) at org.springframework.roo.classpath.javaparser.JavaParserClassOrInterfaceTypeDetails.<init>(JavaParserClassOrInterfaceTypeDetails.java:297) at org.springframework.roo.classpath.javaparser.JavaParserMutableClassOrInterfaceTypeDetails.<init>(JavaParserMutableClassOrInterfaceTypeDetails.java:55) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:69) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:163) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:179) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:183) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:112) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:199) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:141) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:318) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:175) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:122) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:233) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:75) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) roo> Possible Workaround: static final String URLPATH="myService"; static final String URLPATH2="/"+URLPATH; @RequestMapping(URLPATH2) ... amazingly parse shows no error for this computed string: @RequestMapping("/"+"myService")
    via by Jack Punt,
  • To replicate: # create a simple project with at least one "leaf" entity, i.e. no references to other entities # scaffold the MVC layer in the normal way, e.g. using "{{web mvc all --package ~.web}}" # delete the above entity's {{.java}} file (e.g. {{Foo.java}} in the attached demo project) # the MVC addon throws this stack trace (instead of quietly adjusting the MVC layer): {code}[Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_ToString.aj [Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_Jpa_Entity.aj [Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_Entity.aj [Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_Configurable.aj [Spring Roo Process Manager Background Polling Thread] Unable to obtain physical type metadata for type com.foo.bar.domain.Foo java.lang.IllegalArgumentException: Unable to obtain physical type metadata for type com.foo.bar.domain.Foo at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.addon.web.mvc.controller.scaffold.finder.WebFinderMetadataProviderImpl.getMetadata(WebFinderMetadataProviderImpl.java:59) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:318) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:149) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:191) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68) at java.lang.Thread.run(Thread.java:680){code}
    via by Andrew Swan,
  • *There are valid Java packages not accepted by Roo* For example: {quote} org.gvnix._2009_03_31 {quote} Underscores and numbers are valid Java identifiers for package, however Roo throws an error when classes on this package are managed. {code} java.lang.IllegalArgumentException: The first letter of the type name portion must be uppercase (attempted 'org.gvnix._2009_03_31') at org.springframework.roo.model.JavaType.<init>(JavaType.java:120) at org.springframework.roo.model.JavaType.<init>(JavaType.java:91) at org.springframework.roo.model.JavaType.getEnclosingType(JavaType.java:293) at org.springframework.roo.model.JavaType.getPackage(JavaType.java:260) at org.springframework.roo.classpath.javaparser.JavaParserMutableClassOrInterfaceTypeDetails.<init>(JavaParserMutableClassOrInterfaceTypeDetails.java:125) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:70) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:146) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:133) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:151) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:209) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:126) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:170) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:124) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:354) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:327) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:167) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:114) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:225) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:75) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) {code} *There are valid Java types not accepted by Roo* For example: {quote} JAXB data binding library generates a package-info.java class. {quote} Java classes starting with lowercase letter are discouraged but accepted.
    via by Mario Martínez Sánchez - gvNIX - DISID,
  • refined from ROO-1900; upgrade to Roo-1.1.1 creates new failure: The problem is caused by 'complex' String literal, as used in RequestMapping static final String URLPATH="myService"; @RequestMapping("/"+URLPATH) To reproduce: > cd rootest > roo-dev roo> project --topLevelPackage mypkg Then save this file in rootest/src/main/java/mypkg/MyService.java package mypkg; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; public interface MyService { final static String URLPATH = "myService"; @Controller @RequestMapping("/"+URLPATH) public static class Cont implements MyService {} } [Timer-0] Parsing failure for 'C:\Data\Programs\java\rootest\src\main\java\mypkg\MyService.java' (development mode diagnostics) java.lang.IllegalArgumentException: Object of class [japa.parser.ast.expr.NameExpr] must be an instance of class japa.parser.ast.expr.StringLiteralExpr at org.springframework.roo.support.util.Assert.isInstanceOf(Assert.java:337) at org.springframework.roo.support.util.Assert.isInstanceOf(Assert.java:319) at org.springframework.roo.classpath.javaparser.details.JavaParserAnnotationMetadata.convert(JavaParserAnnotationMetadata.java:159) at org.springframework.roo.classpath.javaparser.details.JavaParserAnnotationMetadata.<init>(JavaParserAnnotationMetadata.java:98) at org.springframework.roo.classpath.javaparser.JavaParserClassOrInterfaceTypeDetails.<init>(JavaParserClassOrInterfaceTypeDetails.java:258) at org.springframework.roo.classpath.javaparser.JavaParserClassOrInterfaceTypeDetails.<init>(JavaParserClassOrInterfaceTypeDetails.java:297) at org.springframework.roo.classpath.javaparser.JavaParserMutableClassOrInterfaceTypeDetails.<init>(JavaParserMutableClassOrInterfaceTypeDetails.java:55) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:69) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:163) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:179) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:183) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:112) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:199) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:141) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:318) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:175) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:122) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:233) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:75) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) roo> Possible Workaround: static final String URLPATH="myService"; static final String URLPATH2="/"+URLPATH; @RequestMapping(URLPATH2) ... amazingly parse shows no error for this computed string: @RequestMapping("/"+"myService")
    via by Jack Punt,
  • To replicate: # create a simple project with at least one "leaf" entity, i.e. no references to other entities # scaffold the MVC layer in the normal way, e.g. using "{{web mvc all --package ~.web}}" # delete the above entity's {{.java}} file (e.g. {{Foo.java}} in the attached demo project) # the MVC addon throws this stack trace (instead of quietly adjusting the MVC layer): {code}[Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_ToString.aj [Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_Jpa_Entity.aj [Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_Entity.aj [Spring Roo Process Manager Background Polling Thread] Deleted SRC_MAIN_JAVA/com/foo/bar/domain/Foo_Roo_Configurable.aj [Spring Roo Process Manager Background Polling Thread] Unable to obtain physical type metadata for type com.foo.bar.domain.Foo java.lang.IllegalArgumentException: Unable to obtain physical type metadata for type com.foo.bar.domain.Foo at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.addon.web.mvc.controller.scaffold.finder.WebFinderMetadataProviderImpl.getMetadata(WebFinderMetadataProviderImpl.java:59) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:318) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:149) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:191) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68) at java.lang.Thread.run(Thread.java:680){code}
    via by Andrew Swan,
  • I have an entity derived from a common base class. The id and version are defiend on the base. ROO creates the crud methods on the base aj class, not the subclass. The resulting entity needs to be read only. I performed the following steps in roo. 1. Changed the @RooEntity on the base class (BaseFKItem.java)from @org.springframework.roo.addon.entity.RooEntity to @org.springframework.roo.addon.entity.RooEntity(persistMethod="", removeMethod="", mergeMethod="") 2. Changed the @RooEntity on the subclass (CiLogTypeFKItem.java)in the same way 3. Tried to generate an intergration test for the subclass, I get an error "Persist method required" See stack trace below: ~.entities.cilogs.CiLogTypeFKItem roo> test integration --entity ~.entities.cilogs.CiLogTypeFKItem Created SRC_TEST_JAVA\com\kn\tls\toolkit\entities\cilogs\CiLogTypeFKItemDataOnDemand.java Created SRC_TEST_JAVA\com\kn\tls\toolkit\entities\cilogs\CiLogTypeFKItemIntegrationTest.java Created SRC_TEST_JAVA\com\kn\tls\toolkit\entities\cilogs\CiLogTypeFKItemDataOnDemand_Roo_Configurable.aj Undo create SRC_TEST_JAVA\com\kn\tls\toolkit\entities\cilogs\CiLogTypeFKItemDataOnDemand_Roo_Configurable.aj Undo create SRC_TEST_JAVA\com\kn\tls\toolkit\entities\cilogs\CiLogTypeFKItemIntegrationTest.java Undo create SRC_TEST_JAVA\com\kn\tls\toolkit\entities\cilogs\CiLogTypeFKItemDataOnDemand.java Persist method required java.lang.IllegalArgumentException: Persist method required at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.addon.dod.DataOnDemandMetadata.<init>(DataOnDemandMetadata.java:83) at org.springframework.roo.addon.dod.DataOnDemandMetadataProvider.getMetadata(DataOnDemandMetadataProvider.java:82) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:238) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:103) at org.springframework.roo.metadata.internal.DefaultMetadataService.notify(DefaultMetadataService.java:148) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:256) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:333) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:212) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:138) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:95) at org.springframework.roo.bootstrap.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:31) at org.springframework.roo.shell.internal.AbstractShell.executeCommand(AbstractShell.java:132) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:158) at org.springframework.roo.bootstrap.Bootstrap.run(Bootstrap.java:114) at org.springframework.roo.bootstrap.Bootstrap.main(Bootstrap.java:53) ~.entities.cilogs.CiLogTypeFKItem roo>
    via by Tim Taylor,
  • Use default language (EN) if there is no <span id="language"/> in the footer.jspx. Otherwise, there can be some exception like this: {code}roo> web mvc install view --path / --viewName about --title About Created SRC_MAIN_WEBAPP\WEB-INF\views\about.jspx Created SRC_MAIN_WEBAPP\WEB-INF\views\index-template.jspx Undo manage SRC_MAIN_WEBAPP\WEB-INF\views\footer.jspx Undo create SRC_MAIN_WEBAPP\WEB-INF\views\index-template.jspx Undo manage SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml Undo manage ROOT\pom.xml Undo create SRC_MAIN_WEBAPP\WEB-INF\views\about.jspx Unable to obtain required element '//span[@id='language']' from element '[div: null]' java.lang.IllegalArgumentException: Unable to obtain required element '//span[@id='language']' from element '[div: null]' at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.support.util.XmlUtils.findRequiredElement(XmlUtils.java:208) at org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installI18n(JspOperationsImpl.java:439) at org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installCommonViewArtefacts(JspOperationsImpl.java:131) at org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installView(JspOperationsImpl.java:177) at org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installView(JspOperationsImpl.java:166) at org.springframework.roo.addon.web.mvc.jsp.JspOperationsImpl.installView(JspOperationsImpl.java:145) at org.springframework.roo.addon.web.mvc.jsp.JspCommands.installView(JspCommands.java:59) 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:34) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:140) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:32) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:156) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:181) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:107) at java.lang.Thread.run(Thread.java:619){code}
    via by Dzmitry Barouka,
    • java.lang.IllegalArgumentException: Could not locate 'Pizza' in compilation unit at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:67) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:152) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:216) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:268) at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:147) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:149) at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:236) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:214) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:304) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:178) at org.springframework.roo.process.manager.internal.DefaultProcessManager.backgroundPoll(DefaultProcessManager.java:125) at org.springframework.roo.process.manager.internal.DefaultProcessManager.timerBasedPoll(DefaultProcessManager.java:240) at org.springframework.roo.process.manager.internal.DefaultProcessManager$2.run(DefaultProcessManager.java:68) at java.lang.Thread.run(Thread.java:680)
    No Bugmate found.