Exception in deploying Application: Spring Data JPA + JBOSS EAP 6.3.0 on SUSE Enterprise Linux 12 - spring

We are migrating from SUSE Enterprise Linux 11 to 12. We have a Spring Data JPA application deployed in JBOSS EAP 6.3.0 this is throwing the below error when enabling the deployment in JBOSS.
Error:
15:13:13,108 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 57) JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMapppingContext': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.data.jpa.mapping.JpaPersistentPropertyImpl.findAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) [spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) [spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:59) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:94) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_31]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.NoSuchMethodError: org.springframework.data.jpa.mapping.JpaPersistentPropertyImpl.findAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
at org.springframework.data.jpa.mapping.JpaPersistentPropertyImpl.isAssociation(JpaPersistentPropertyImpl.java:133) [spring-data-jpa-1.7.1.RELEASE.jar:]
at org.springframework.data.mapping.model.AbstractPersistentProperty.<init>(AbstractPersistentProperty.java:62) [spring-data-commons-core-1.4.1.RELEASE.jar:]
at org.springframework.data.mapping.model.AnnotationBasedPersistentProperty.<init>(AnnotationBasedPersistentProperty.java:51) [spring-data-commons-core-1.4.1.RELEASE.jar:]
at org.springframework.data.jpa.mapping.JpaPersistentPropertyImpl.<init>(JpaPersistentPropertyImpl.java:87) [spring-data-jpa-1.7.1.RELEASE.jar:]
at org.springframework.data.jpa.mapping.JpaMetamodelMappingContext.createPersistentProperty(JpaMetamodelMappingContext.java:77) [spring-data-jpa-1.7.1.RELEASE.jar:]
at org.springframework.data.jpa.mapping.JpaMetamodelMappingContext.createPersistentProperty(JpaMetamodelMappingContext.java:38) [spring-data-jpa-1.7.1.RELEASE.jar:]
at org.springframework.data.mapping.context.AbstractMappingContext$PersistentPropertyCreator.doWith(AbstractMappingContext.java:390) [spring-data-commons-core-1.4.1.RELEASE.jar:]
at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:579) [spring-core-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:281) [spring-data-commons-core-1.4.1.RELEASE.jar:]
at org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:246) [spring-data-commons-core-1.4.1.RELEASE.jar:]
at org.springframework.data.mapping.context.AbstractMappingContext.initialize(AbstractMappingContext.java:346) [spring-data-commons-core-1.4.1.RELEASE.jar:]
at org.springframework.data.jpa.repository.config.JpaMetamodelMappingContextFactoryBean.createInstance(JpaMetamodelMappingContextFactoryBean.java:73) [spring-data-jpa-1.7.1.RELEASE.jar:]
at org.springframework.data.jpa.repository.config.JpaMetamodelMappingContextFactoryBean.createInstance(JpaMetamodelMappingContextFactoryBean.java:26) [spring-data-jpa-1.7.1.RELEASE.jar:]
at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:134) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549) [spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
... 23 more
System Settings:
JBOSS EAP 6.3.0
Oracle JDK 1.8.0_31
spring-core-4.0.5.RELEASE.jar
spring-data-jpa-1.7.1.RELEASE.jar
Working on OS: SUSE EL 11
Not Working on OS: SUSE EL 12
This is a clean Linux Installation, only with JDK 1.8 & JBOSS with no additional libraries added to JBOSS. No other applications deployed in the JBOSS except this one war file.
Any Help on this is much appreciated.
Thanks,

Resolved:
The issue is resolved with version of Spring Data JPA 1.8.0 RELEASE.
Changelog in version 1.8.0.RC1 (2015-03-05)
DATAJPA-664 - JpaPersistentProperty.getActualType() should consider specialized association type.

Related

Spring application on JBoss ActiveMQ artemis JMS deployment issue

Application EAR is not getting deployed on JBoss EAP 7.0.0 after including Spring Boot WAR in the EAR
Application uses JBOSS 7 ActiveMQ messaging service and works fine with no issues. But when we add WAR build using SpringBOOT in the application EAR and tries to deploy the EAR on cluster environment then EAR deployment is rolledback and we get exception.
Factory method 'artemisServer' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS.setConfiguration (Please refer complete exception trace)
The issue is with Spring boot autoconfiguration because when we removed spring-boot-autoconfigure-1.5.4.RELEASE.jar from the application class path then the deployment happened successfully and application is running fine. We want a mechanism where we can specifically disable Spring Boot ActiveMQ auto configuration.
Complete Exception Trace
Error creating bean with name 'artemisServer' defined in class path resource [org/springframework/boot/autoconfigure/jms/artemis/ArtemisEmbeddedServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS]: Factory method 'artemisServer' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS.setConfiguration(Lorg/apache/activemq/artemis/core/config/Configuration;)Lorg/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS;
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:184)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS]: Factory method 'artemisServer' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS.setConfiguration(Lorg/apache/activemq/artemis/core/config/Configuration;)Lorg/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS;
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 28 more
Caused by: java.lang.NoSuchMethodError: org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS.setConfiguration(Lorg/apache/activemq/artemis/core/config/Configuration;)Lorg/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS;
at org.springframework.boot.autoconfigure.jms.artemis.ArtemisEmbeddedServerConfiguration.artemisServer(ArtemisEmbeddedServerConfiguration.java:82)
at org.springframework.boot.autoconfigure.jms.artemis.ArtemisEmbeddedServerConfiguration$$EnhancerBySpringCGLIB$$145801e2.CGLIB$artemisServer$2(<generated>)
at org.springframework.boot.autoconfigure.jms.artemis.ArtemisEmbeddedServerConfiguration$$EnhancerBySpringCGLIB$$145801e2$$FastClassBySpringCGLIB$$f9d0b616.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at org.springframework.boot.autoconfigure.jms.artemis.ArtemisEmbeddedServerConfiguration$$EnhancerBySpringCGLIB$$145801e2.artemisServer(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 29 more
Please suggest what can be done in this case
all.
I have used the below property to disable the auto configuration of ArtemisEmbeddedServerConfiguration.class, which works for me. Hope this post will help for our upcoming folks.
spring.artemis.embedded.enabled=false
Thanks,
Faruk

how to run spring batch admin in Websphere ND 8.5

Has someone really managed to run Spring Batch Admin in Websphere 8.5 ND? I have spent like 50 hours to run the most simple Spring Batch Admin in Websphere ND 8.5 and I can find anything else to try in order to fix
"Error creating bean with name 'mbeanExporter'... Unable to register MBean [org.springframework.integration.monitor.IntegrationMBeanExporter#65e7255d] with key 'integrationMBeanExporter'"
Kindly, see all I have done after read everything I could find in foruns about it:
1) Spring Batch on Clustered environment - Websphere
It says that SpringBatch does not support any means of clustered executions. Well I am not relying in clustered executions nor in any schedulle. I am just trying to start the Spring Batch Admin console and then geting such integrationMBeanExporter error. In other words, I didn't see started the Spring Batch Admin so I didn't trigger yet any job.
2)https://jira.spring.io/browse/BATCHADM-169
It says two interesting statements but none of them change the error at all
(2.1) - use classloading order to PARENT_LAST. I did it for both Server and Application. No changes in error.
(2.2) - use the exact jar versions found here http://docs.spring.io/spring-batch-admin/spring-batch-admin-sample/dependencies.html. I am using it. IN fact, I am trying to use the example provided inside of Spring Batch Admin (spring-batch-admin-sample) and it contains exactly such jar versions. IN my local Websphere Liberty Profile such sample, spring-batch-admin-sample, runs perfectly but when deployed to Websphere ND it gave same integrationMBeanExporter error
3 - https://www.intertech.com/Blog/spring-batch-admin-tutorial/
I followed such step-by-step tutorial and I can run in my local Websphere Liberty Profile but same integrationMBeanExporter error when running in Websphere ND.
4 - I could reproduce same integrationMBeanExporter error in my local Websphere Liberty Profile when I deployed two Spring Batch Admin to it. Well, just to make sure it wasn't the problem, I deleted all others application from Websphere ND Server and left just a single Spring Batch Admin. Same integrationMBeanExporter raises.
5 - In my local Websphere Liberty I fixed the integrationMBeanExporter issue caused by having two Spring Batch Admin when I followed the suggestion found in Deploying two Spring batch applications in same cluster in a single Weblogic Domain?. I mean, I created
<int-jmx:mbean-export id="integrationMBeanExporter" default-domain="SpringBatchAdmin" server="mbeanServer" />
<context:mbean-export default-domain="SpringBatchAdmin" server="mbeanServer" />
in one of the two applications in my local WAS Liberty and then it fix the issue and allowed me to open two Spring Batch Admin in the same server. Well, again, in Websphere ND I have deleted all application other then my Spring Batch Admin so it doesn't make much sense to me by the way I tried and it didn't change the error at all.
It seems I can have SPring Batch Admin very easy up and running in any Web Container different of Websphere ND 8.5.5. I guess, but I am not sure that there might exist some way to fix such error by a simple configuration but I can imagine what else to try.
The entire error:
[9/10/16 14:32:40:484 CDT] FFDC Exception:org.springframework.beans.factory.BeanCreationException SourceId:com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated ProbeId:1341 Reporter:com.ibm.ws.webcontainer.webapp.WebAppImpl#a2268c26
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mbeanExporter':
Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException:
Unable to register MBean [org.springframework.integration.monitor.IntegrationMBeanExporter#65e7255d] with key 'integrationMBeanExporter';
nested exception is javax.management.RuntimeOperationsException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1704)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:411)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2195)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2200)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:984)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.springframework.integration.monitor.IntegrationMBeanExporter#65e7255d] with key 'integrationMBeanExporter'; nested exception is javax.management.RuntimeOperationsException
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:610)
at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:535)
at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 37 more
Caused by: javax.management.RuntimeOperationsException
at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:567)
at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)
at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:663)
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:600)
... 41 more
Caused by: javax.management.JMRuntimeException: java.lang.reflect.UndeclaredThrowableException
at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:242)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:78)
at com.ibm.ws.management._ControlAdminService_Stub.activateProxyMBean(_ControlAdminService_Stub.java:168)
at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:515)
at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)
at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:663)
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:600)
at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:535)
at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1704)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:411)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2195)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2200)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:984)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.ws390.orb.RIRProtectedProxyHandler.invoke(RIRProtectedProxyHandler.java:192)
at com.sun.proxy.$Proxy3._invoke(Unknown Source)
at com.ibm.ws390.orb.CommonBridge.invoke(CommonBridge.java:1898)
at com.ibm.ws390.orb.ORBEJSBridge.invoke(ORBEJSBridge.java:286)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.ws390.orb.parameters.ORBEJSBridgeInvoke.ORBEJSBridgeInvokeParmSetter(ORBEJSBridgeInvoke.java:234)
Caused by: org.omg.CORBA.portable.UnknownException: vmcid: 0x0 minor code: 0 completed: Maybe
at com.ibm.ws.management._ControlAdminServiceImpl_Tie._invoke(_ControlAdminServiceImpl_Tie.java:123)
I had similar issue in my project, it took almost a week to identify the cause, the root cause in my case was just because of a dependency added.
<dependency>
<groupId>com.ibm.websphere.appserver.runtime</groupId>
<artifactId>com.ibm.ws.admin.client</artifactId>
<version>7.0.0</version>
</dependency>
The above dependency was working fine in tomcat but the same not in WAS Liberty server.
<exclusions>
<exclusion>
<artifactId>com.ibm.ws.webservices.thinclient_7.0.0</artifactId>
<groupId>serverwas85</groupId>
</exclusion>
</exclusions>
Hope this will resolve your issue.(Since this exclusion is specific to my application added as reference if someone face similar issue. If you don't have any such relative dependency ignore it)

PlayFramework project works with 'activator run' but deployed dist does not work

I have a playFramework2.4 project and it is working fine when I run the project using "activator run".
However, when I distribute "activator dist", and then run the application it gives an error.
It seems that I have some conflicting dependencies, but I don't know why I don't see the same issue when I run the application.
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'MyService': Bean instantiation via
constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.apache.cxf.jaxws22.spring.JAXWS22SpringEndpointImpl]:
Constructor threw exception; nested exception is
java.lang.NoClassDefFoundError:
org/apache/cxf/frontend/MethodDispatcher
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:275)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1139)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
global.Global.onStart(Global.java:89)
play.core.j.JavaGlobalSettingsAdapter.onStart(JavaGlobalSettingsAdapter.scala:22)
play.api.GlobalPlugin.onStart(GlobalSettings.scala:271)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:92)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:92)
scala.collection.Iterator$class.foreach(Iterator.scala:727)
scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
play.api.Plugins.foreach(Plugins.scala:57)
play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:92)
play.api.Play$$anonfun$start$1.apply(Play.scala:87)
play.api.Play$$anonfun$start$1.apply(Play.scala:87)
play.utils.Threads$.withContextClassLoader(Threads.scala:21)
play.api.Play$.start(Play.scala:87)
play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:156)
play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:121)
scala.Option.map(Option.scala:145)
play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:121)
play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:119)
scala.util.Success.flatMap(Try.scala:200)
play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:119)
play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:111)
scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Well it turned out that when I was calling activator dist, I was getting several other dependencies which were causing conflicts.
At the end it came down to trial and error to find all the issues.
I used sbt-dependency-graph to see where dependencies are coming from and also used the response here to exclude some conflicting dependencies.

Redis Error in Spring Session sample using Maven and Spring Boot

I was trying to set-up this Spring-Session example using Spring Boot + Maven (the source in the GIT link is using Gradle). There were no compilation error, the deploy-able WAR file also got generated using the repackage goal.
When trying to deploy the WAR file in my WildFly server, i get the following error related to Redis. I do not have Redis server running in my machine (since i assume that an embedded Redis instance will be created as part of the application, even in an deployed WAR file)
File: EmbeddedRedisConfiguration.java
Caused by:
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203) [rt.jar:1.8.0_25]
at java.nio.file.Files.copy(Files.java:2984) [rt.jar:1.8.0_25]
at redis.embedded.RedisServer.extractExecutableFromJar(RedisServer.java:85)
at redis.embedded.RedisServer.<init>(RedisServer.java:69)
at redis.embedded.RedisServer.<init>(RedisServer.java:63)
at hello.EmbeddedRedisConfiguration$RedisServerBean.afterPropertiesSet(EmbeddedRedisConfiguration.java:55)
Environment: WildFly8.2 running in Domain Mode (3 nodes running in Full-HA profile)
Application: Spring Boot + Spring Session + Maven
Question: Is this error because an embedded Redis instance cannot be
created while the WAR file is deployed to a container ? I haven't
tried running this as executable WAR file yet.
Complete Error Stack:
[Server:server-four] 23:52:46,815 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host."/gs-spring-boot-0.1.0": org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host."/gs-spring-boot-0.1.0": Failed to start service
[Server:server-four] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
[Server:server-four] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
[Server:server-four] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
[Server:server-four] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
[Server:server-four] Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisServer' defined in class path resource [hello/EmbeddedRedisConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
[Server:server-four] at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:222)
[Server:server-four] at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
[Server:server-four] at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
[Server:server-four] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
[Server:server-four] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
[Server:server-four] ... 3 more
[Server:server-four] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisServer' defined in class path resource [hello/EmbeddedRedisConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
[Server:server-four] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554)
[Server:server-four] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
[Server:server-four] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
[Server:server-four] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
[Server:server-four] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
[Server:server-four] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
[Server:server-four] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
[Server:server-four] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:116)
[Server:server-four] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:611)
[Server:server-four] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
[Server:server-four] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
[Server:server-four] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
[Server:server-four] at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
[Server:server-four] at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:142)
[Server:server-four] at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:89)
[Server:server-four] at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:51)
[Server:server-four] at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
[Server:server-four] at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:182)
[Server:server-four] ... 7 more
**[Server:server-four] Caused by: java.lang.NullPointerException
[Server:server-four] at java.util.Objects.requireNonNull(Objects.java:203) [rt.jar:1.8.0_25]
[Server:server-four] at java.nio.file.Files.copy(Files.java:2984) [rt.jar:1.8.0_25]
[Server:server-four] at redis.embedded.RedisServer.extractExecutableFromJar(RedisServer.java:85)
[Server:server-four] at redis.embedded.RedisServer.<init>(RedisServer.java:69)
[Server:server-four] at redis.embedded.RedisServer.<init>(RedisServer.java:63)
[Server:server-four] at hello.EmbeddedRedisConfiguration$RedisServerBean.afterPropertiesSet(EmbeddedRedisConfiguration.java:55)**
[Server:server-four] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
[Server:server-four] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
[Server:server-four] ... 24 more
[Server:server-four]
Based on your stacktrace it looks like the embedded configuration is having trouble working on WildFly. I created an issue to address it
In the meantime you can run on WildFly by:
Removing EmbeddedRedisConfiguration
Ensure to start an external Redis instance up. You can find directions for installing Redis in the Redis documentation
NOTE: Embedded Redis is not meant for production and is just intended to allow developers to try things easily. Therefore this is viewed as a rather minor issue.
This is acutally because the embedded-redis-0.5.jarn pulled in from maven is different from gradle, if you can manage to put the embedded-redis-0.5.jar from gradle into the jar built from maven, it will work.

AbstractMethodError on deploying Spring 4.0 in Tomcat 6

I am getting below exception on deploying Spring 4.0.1 app in Tomcat 6.0.37:
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean#0': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
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.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:176)
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.configureParameterNameProviderIfPossible(LocalValidatorFactoryBean.java:276)
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:245)
at org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean.afterPropertiesSet(OptionalValidatorFactoryBean.java:40)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 36 more
Following related dependencies are added in build.gradle:
dependencies {
providedCompile "javax.servlet:servlet-api:2.5"
providedCompile "javax.servlet.jsp:jsp-api:2.2"
providedCompile "javax.el:el-api:2.2"
compile "javax.servlet.jsp.jstl:jstl-api:1.2"
compile "org.glassfish.web:jstl-impl:1.2"
compile "org.slf4j:jcl-over-slf4j:1.7.6"
compile "org.slf4j:slf4j-api:1.7.6"
compile ("org.hibernate:hibernate-validator:4.3.1.Final") {
exclude group: "javax.xml.bind", module: "jaxb-api"
exclude group: "com.sun.xml.bind", module: "jaxb-impl"
}
compile "javax.validation:validation-api:1.1.0.Final"
// Spring 4.0.1 and other dependencies below
....
}
Is the error because of spring-beans and spring-webmvc depends on EL 2.2.4 version whereas Tomcat 6 comes with EL 2.1. If so, how to resolve it? Also, I do not have rights to update libs in Tomcat dir.
The error has nothing to do with the EL. It has all to do with the javax.validation api and hibernate.
java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider
Hibernate validator 4.3.x is an implementation of javax.validation 1.0 (JSR-303). However you are including the 1.1 API version. Either downgrade the included javax.validation version or upgrade your hibernate validator to 5.0.x.
Check to see if there are multiple references to validator in your pom file
<?xml version="1.0" encoding="UTF-8"?>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-val.version}</version>
</dependency>

Resources