grails 3.0 - "IllegalArgumentException: Name must not be null" when deploying to jboss -


(i solved problem, posting here others.)

i upgraded grails 2.4.4 grails 3. when deploying jboss eap 6.4 (wildfly 7), receive following error in server log , application fails start:

09-06 20:46:18,463 error [org.jboss.as.web.deployment.jbosscontextconfig] (serverservice thread pool -- 90) jbas018202: error calling onstartup servlet container initializer: org.springframework.web.springservletcontainerinitializer: java.lang.illegalargumentexception: name must not null     @ org.springframework.util.assert.notnull(assert.java:115) [spring-core-4.2.5.release.jar:4.2.5.release]     @ org.springframework.util.classutils.forname(classutils.java:214) [spring-core-4.2.5.release.jar:4.2.5.release]     @ org.springframework.util.classutils.resolveclassname(classutils.java:284) [spring-core-4.2.5.release.jar:4.2.5.release]     @ org.grails.transaction.chainedtransactionmanagerpostprocessor.resolvetransactionmanagerclass(chainedtransactionmanagerpostprocessor.java:158) [grails-core-3.1.5.jar:3.1.5]     @ org.grails.transaction.chainedtransactionmanagerpostprocessor.hasjtaorchainedtransactionmanager(chainedtransactionmanagerpostprocessor.java:143) [grails-core-3.1.5.jar:3.1.5]     @ org.grails.transaction.chainedtransactionmanagerpostprocessor.postprocessbeandefinitionregistry(chainedtransactionmanagerpostprocessor.java:119) [grails-core-3.1.5.jar:3.1.5]     @ org.springframework.context.support.postprocessorregistrationdelegate.invokebeanfactorypostprocessors(postprocessorregistrationdelegate.java:123) [spring-context-4.2.5.release.jar:4.2.5.release]     @ org.springframework.context.support.abstractapplicationcontext.invokebeanfactorypostprocessors(abstractapplicationcontext.java:678) [spring-context-4.2.5.release.jar:4.2.5.release]     @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:520) [spring-context-4.2.5.release.jar:4.2.5.release]     @ org.springframework.boot.context.embedded.embeddedwebapplicationcontext.refresh(embeddedwebapplicationcontext.java:118) [spring-boot-1.3.3.release.jar:1.3.3.release]     @ org.springframework.boot.springapplication.refresh(springapplication.java:766) [spring-boot-1.3.3.release.jar:1.3.3.release]     @ org.springframework.boot.springapplication.createandrefreshcontext(springapplication.java:361) [spring-boot-1.3.3.release.jar:1.3.3.release]     @ org.springframework.boot.springapplication.run(springapplication.java:307) [spring-boot-1.3.3.release.jar:1.3.3.release]     @ grails.boot.grailsapp.run(grailsapp.groovy:55) [grails-core-3.1.5.jar:3.1.5] 

i have 2 different data sources in application, both of registered in jndi.

after running through debugger, see transactionmanagerbeandefinition.getbeanclassname() returns null not sure why.

why error happening, , how solve it?

this link led me answer.

the problem seems caused there being multiple datasources in application, causes spring / jboss confused when setting transaction manager.

the solution set transactional: false in application.yml second datasource. worked perfect me, since second datasource read-only anyway.

application.yml:

datasources:     datasource:         dialect: "..."     otherdatasource:         dialect: "..."         transactional: false  <------ add line 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -