spring MVC, Jboss 7 - spring-mvc

I am trying to build a sample spring MVC app using Maven and getting deployed in JBoss 7 application server.
While trying to build using maven, it builds fine without error. However while trying to deploy using JBoss 7, I am getting this following error.
Kindly help to give ideas what might be the cause of this error.
13:48:36,408 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."firstSpring-1.0-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."firstSpring-1.0-SNAPSHOT.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "firstSpring-1.0-SNAPSHOT.war"
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.springframework.web.servlet.tags.EvalTag with ClassLoader ModuleClassLoader for Module "deployment.firstSpring-1.0-SNAPSHOT.war:main" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor from [Module "deployment.firstSpring-1.0-SNAPSHOT.war:main" from Service Module Loader]

Related

Compiler Spite out Error's After Running My First Controller method

I am quite new to spring mvc. I got this error the first time i ran my maven web project on window via spring-tool-suite for eclipse after configuring the webMVC project.
COMPILLER CONSOLE:
Exception in thread "main" java.lang.NullPointerException at
org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:64)
at
org.springframework.beans.GenericTypeAwarePropertyDescriptor.(GenericTypeAwarePropertyDescriptor.java:70)
at
org.springframework.beans.CachedIntrospectionResults.buildGenericTypeAwarePropertyDescriptor(CachedIntrospectionResults.java:366)
at
org.springframework.beans.CachedIntrospectionResults.(CachedIntrospectionResults.java:302)
at
org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:189)
at
org.springframework.beans.BeanUtils.getPropertyDescriptors(BeanUtils.java:354)
at
org.springframework.boot.bind.PropertiesConfigurationFactory.getNames(PropertiesConfigurationFactory.java:300)
at
org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:283)
at
org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:256)
at
org.springframework.boot.context.config.ConfigFileApplicationListener.bindToSpringApplication(ConfigFileApplicationListener.java:232)
at
org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:183)
at
org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:168)
at
org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:154)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
at
org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:68)
at
org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at
org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
at com.nnokox.Application.main(Application.java:25)

ModuleNotFoundException: Unable to deploy war on Jboss EAP 7

Installed jBoss EAP 7.0 and trying to deploy a .war file but getting below error. I tried to search for the error but failed to understand Explanations about it.
03:13:23,229 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.module.service."deployment.MMSBackOffice.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.MMSBackOffice.war".main: WFLYSRV0179: Failed to load module: deployment.MMSBackOffice.war:main
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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)
Caused by: org.jboss.modules.ModuleNotFoundException: javax.enterprise.deploy.api:main
at org.jboss.modules.Module.addPaths(Module.java:1092)
at org.jboss.modules.Module.link(Module.java:1448)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
... 5 more
Try adding this module inside jboss-deployment-structure.xml dependencies explicitly and place it inside your war WEB-INFthen try this once again.

Error deploying webapplication to wso2as-5.0.3

i have the following errors while deploying a maven web application on wso2 application server:
java.lang.Exception: Error while deploying webapp:
StandardContext[invent360.war].File[/home/iceman95/Development/wso2as-5.3.0/repository/deployment/server/webapps/invent360.war]
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:405)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
at
org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42) at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at
org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at
org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:93)
at
org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:138)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.wso2.carbon.tomcat.CarbonTomcatException: Webapp failed to deploy
at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:356) at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252) at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
... 23 more Caused by: java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/invent360]]
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344) ... 25 more,
can any one please help.
wso2 app server version is :5.3.0
The application has previously been successfully deployed to a jboss enterprise app server without this error.
Are you able to deploy your webapp in Tomcat or TomEE? WSO2 Application Server 5.3.0 is not a fully fledged JEE container like JBoss. 5.3.0 supports only JEE web profile (through Apache TomEE)

Log4j2 with Websphere Application Server org.apache.logging.log4j.web.Log4jServletContainerInitializer not a subtype

We have an application which uses Log4j2 and running on WAS 8.5. We have selected the class loading option as PARENT_LAST, so the jar files will be picked up from WEB-INF/lib. We are error getting the below error when starting up the server.
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: javax.servlet.ServletContainerInitializer: Provider org.apache.logging.log4j.web.Log4jServletContainerInitializer not a subtype
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:432)
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:5387)
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:1865)
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: javax.servlet.ServletContainerInitializer: Provider org.apache.logging.log4j.web.Log4jServletContainerInitializer not a subtype
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:759)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
... 18 more
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: javax.servlet.ServletContainerInitializer: Provider org.apache.logging.log4j.web.Log4jServletContainerInitializer not a subtype
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:176)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
... 20 more
Caused by: java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Provider org.apache.logging.log4j.web.Log4jServletContainerInitializer not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:243)
at java.util.ServiceLoader.access$300(ServiceLoader.java:193)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:381)
at java.util.ServiceLoader$1.next(ServiceLoader.java:457)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:535)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
When we have the lo4j2 related jar's as part of the ext folder of the server, it is working fine without any issues.
We also have log4j jar's as well as part of the application which is being used by some third party jar's.
Can some throw some light as what is going on here and why this error is being thrown?
If you are using web.xml for your application configuration refer to following link for configuring log4j-web module related listener and filter.
http://logging.apache.org/log4j/2.x/manual/webapp.html

Wildfly Servlet Deployment Error

I'm migrating from JBoss 4.0.4GA to WildFly 8.1.0. During deployment, I'm getting the following error:
server.default-host./.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./.UndertowDeploymentInfoService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: java.lang.IllegalArgumentException: UT010009: Servlet VxmlServiceServlet of type class com.nexge.commgenie.vxml.VxmlServiceFC does not implement javax.servlet.Servlet
at io.undertow.servlet.api.ServletInfo.<init>(ServletInfo.java:99)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:620)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:245)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
... 3 more
Could anyone please advise on what the issue is?
Thanks & regards, Shankar
The error pretty much states exactly what the issue is. You have a servlet defined that doesn't extend javax.servlet.Servlet. If for whatever reason it is extending javax.servlet.Servlet then the likely issue is you're including some library in your deployment that contains a javax.servlet.Servlet.

Resources