Spring version 5.2.5.RELEASE. http://www.springframework.org/schema/jee/spring-jee.xsd defines "lazy-init" property for "jndiLocatingType" complex type. "jndi-lookup" defined as "jndiLocatingType", but JndiObjectFactoryBean doesn't have such field nor setter. That result in NotWritablePropertyException during bean instantiation: Invalid property 'lazyInit' of bean class [org.springframework.jndi.JndiObjectFactoryBean]: Bean property 'lazyInit' is not writable or has an invalid setter method.
Comment From: jhoeller
lazy-init
should be processed specifically through AbstractJndiLocatingBeanDefinitionParser
, not applying it as a regular bean property. We also have unit tests for this so I wonder how you're running into the exception above?
Comment From: tolyan
It seems older version library slipped through into dependencies and resulted in such behavior. No bug here.
Comment From: sowmyatvs
@tolyan I am facing the same issue. Can you please suggest which jar files where having issues?
Comment From: tolyan
@sowmyatvs Just make sure that you have only one version of the spring libs in your build. Check transitive dependencies in your build tree, e.g mvn dependency:tree or gradle build --scan