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.

  • 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,
  • To reproduce use the rev in the roo header, in an empty dir, then just press quit. It is non fatal {code} / __ \/ __ \/ __ \ / /_/ / / / / / / / / _, _/ /_/ / /_/ / /_/ |_|\____/\____/ 1.1.1.RELEASE [rev 1a484e8] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. roo> quit [Timer-1] No metadata provider is currently registered to provide metadata for identifier 'MID:org.springframework.roo.project.ProjectMetadata#the_project' (class 'MID:org.springframework.roo.project.ProjectMetadata') java.lang.IllegalArgumentException: No metadata provider is currently registered to provide metadata for identifier 'MID:org.springframework.roo.project.ProjectMetadata#the_project' (class 'MID:org.springframework.roo.project.ProjectMetadata') at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:130) at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:159) at org.springframework.roo.addon.gwt.GwtFileListener.onFileEvent(GwtFileListener.java:46) 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> Total execution time 9 seconds Roo exited with code 0 hatim@hatim-laptop:~/test$ roo-dev ____ ____ ____ / __ \/ __ \/ __ \ / /_/ / / / / / / / / _, _/ /_/ / /_/ / /_/ |_|\____/\____/ 1.1.1.RELEASE [rev 1a484e8] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. roo> quit Total execution time 8 seconds Roo exited with code 0 {code}
    via by Shahzada Hatim,
  • When I rebuild/reinstall roo, it complains that I have no jdbc driver. The exception is ugly... but the real problem is that the "HINT" does not include the most important: For those of us that use roo as a 'tool' rather than a platform, and are not familiar with the addon functions, it would be great to have one more hint: [HINT] use 'addon install --bundleId 01' to install 5.1.13.0001 #jdbcdriver driverclass:com.mysql.jdbc.Driver In particular, mentioning the '--bundleId' parameter would be helpful, instructive. (I keep hoping that TAB will prompt to remind of the available/required params) By the time i figure that out, and determine that the bundleId that is expected/required is numeric, and then do a 'addon list' (which assigns a new/different Id for the jdbc driver) and then realize there are multiple #jdbcdriver in the list, so must read more details the whole experience is so much more complicated/frustrating than it needs to be. Just sayin' since roo noticed there was exactly *one* addon that seems appropriate, that it would be nice to see a hint for the dummies for how to install *that* bundle. roo> database reverse engineer --schema gamma --package ~.domain Located add-on that may offer this JDBC driver 1 found, sorted by rank; T = trusted developer; R = Roo 1.1 compatible ID T R DESCRIPTION ------------------------------------------------------------- 01 Y Y 5.1.13.0001 #jdbcdriver driverclass:com.mysql.jdbc.Driver. This... -------------------------------------------------------------------------------- [HINT] use 'addon info' to see details about a bundle [HINT] use 'addon install' to install a specific bundle JDBC driver not available for 'com.mysql.jdbc.Driver' java.lang.IllegalArgumentException: JDBC driver not available for 'com.mysql.jdbc.Driver' at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.addon.dbre.jdbc.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:41) at org.springframework.roo.addon.dbre.jdbc.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:53) at org.springframework.roo.addon.dbre.DbreModelServiceImpl.getConnection(DbreModelServiceImpl.java:317) at org.springframework.roo.addon.dbre.DbreModelServiceImpl.getDatabase(DbreModelServiceImpl.java:214) at org.springframework.roo.addon.dbre.DbreModelServiceImpl.refreshDatabase(DbreModelServiceImpl.java:155) at org.springframework.roo.addon.dbre.DbreOperationsImpl.reverseEngineerDatabase(DbreOperationsImpl.java:77) at org.springframework.roo.addon.dbre.DbreCommands.serializeDatabaseMetadata(DbreCommands.java:50) 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:49) 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:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:165) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:358) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:132) at java.lang.Thread.run(Thread.java:619)
    via by Jack Punt,
    • java.lang.IllegalArgumentException: File identifier required at org.springframework.roo.support.util.Assert.notNull(Assert.java:112) at org.springframework.roo.process.manager.internal.DefaultFileManager.createFile(DefaultFileManager.java:108) at org.springframework.roo.addon.creator.CreatorOperationsImpl.writePomFile(CreatorOperationsImpl.java:296) at org.springframework.roo.addon.creator.CreatorOperationsImpl.createProject(CreatorOperationsImpl.java:281) at org.springframework.roo.addon.creator.CreatorOperationsImpl.createAdvancedAddon(CreatorOperationsImpl.java:101) at org.springframework.roo.addon.creator.CreatorCommands.advanced(CreatorCommands.java:64)
    No Bugmate found.