0
時「拋出:IllegalArgumentException:名稱不能爲空」部署到JBoss
近日筆者從Grails的2.4.4升級中的Grails 3.當部署(我已經解決了這個問題,但在這裏張貼幫助別人。)到JBoss EAP 6.4(Wildfly 7),I收到以下錯誤在服務器日誌和應用程序未能啓動:
09-06 20:46:18,463 ERROR [org.jboss.as.web.deployment.JBossContextConfig] (ServerService Thread Pool -- 90) JBAS018202: Error calling onStartup for servlet container initializer: org.springframework.web.SpringServletContainerInitializer: java.lang.IllegalArgumentException: Name must not be null
at org.springframework.util.Assert.notNull(Assert.java:115) [spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:214) [spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:284) [spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.grails.transaction.ChainedTransactionManagerPostProcessor.resolveTransactionManagerClass(ChainedTransactionManagerPostProcessor.java:158) [grails-core-3.1.5.jar:3.1.5]
at org.grails.transaction.ChainedTransactionManagerPostProcessor.hasJtaOrChainedTransactionManager(ChainedTransactionManagerPostProcessor.java:143) [grails-core-3.1.5.jar:3.1.5]
at org.grails.transaction.ChainedTransactionManagerPostProcessor.postProcessBeanDefinitionRegistry(ChainedTransactionManagerPostProcessor.java:119) [grails-core-3.1.5.jar:3.1.5]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:123) [spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678) [spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520) [spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at grails.boot.GrailsApp.run(GrailsApp.groovy:55) [grails-core-3.1.5.jar:3.1.5]
我在應用兩個不同的數據源,這兩者在JNDI註冊。
運行調試器後,我看到transactionManagerBeanDefinition.getBeanClassName()
返回null
但我不知道爲什麼。
爲什麼會發生這個錯誤,我將如何解決它?