title: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Obje
body: <p>I'm a newbie with maven, spring, embedded glassfish, dependency conflicts ( I don't know how to see them and how to solve them)... and I can't fix this problem alone even if I've spent hours trying to.</p>
  
  <p>I don't encounter this problem with embedded tomcat7 but I do with embedded glassfish</p>
  
  <p>I run "Run configuration" from eclipse with </p>
  
  <ul>
  <li>an embedded maven runtime 3.0.4/1.4.0,  </li>
  <li>goals : clean package embedded-glassfish:run </li>
  <li>jre: jdk-7u51</li>
  </ul>
  
  <p>Thank you for spending some time to help solving the issue.</p>
  
  <pre><code> Grave: WebModule[/myapp]StandardWrapper.Throwable
  java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
      at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:453)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
      at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1444)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1241)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:5380)
      at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2000)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
      at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
      at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
      at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
      at org.glassfish.maven.PluginUtil.doDeploy(PluginUtil.java:106)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.glassfish.maven.AbstractDeployMojo.doDeploy(AbstractDeployMojo.java:239)
      at org.glassfish.maven.RunMojo.execute(RunMojo.java:68)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  
  janv. 26, 2014 12:03:54 PM com.sun.enterprise.web.VirtualServer$1 log
  Grave: WebModule[/myapp]PWC1396: Servlet /myapp threw load() exception
  java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
      at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:453)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
      at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1444)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1241)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:5380)
      at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2000)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
      at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
      at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
      at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
      at org.glassfish.maven.PluginUtil.doDeploy(PluginUtil.java:106)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.glassfish.maven.AbstractDeployMojo.doDeploy(AbstractDeployMojo.java:239)
      at org.glassfish.maven.RunMojo.execute(RunMojo.java:68)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  
  janv. 26, 2014 12:03:54 PM org.apache.catalina.core.StandardContext start
  Grave: PWC1306: Startup of context /myapp failed due to previous errors
  janv. 26, 2014 12:03:54 PM com.sun.enterprise.web.VirtualServer$1 log
  Infos: PWC1412: WebModule[null] ServletContext.log():Destroying Spring FrameworkServlet 'mvc-dispatcher'
  janv. 26, 2014 12:03:54 PM org.apache.catalina.core.ContainerBase addChildInternal
  Grave: ContainerBase.addChild: start: 
  org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
      at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2000)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
      at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
      at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
      at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
      at org.glassfish.maven.PluginUtil.doDeploy(PluginUtil.java:106)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.glassfish.maven.AbstractDeployMojo.doDeploy(AbstractDeployMojo.java:239)
      at org.glassfish.maven.RunMojo.execute(RunMojo.java:68)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: org.apache.catalina.LifecycleException: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5103)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:5380)
      ... 49 more
  Caused by: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
      at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:453)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
      at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1444)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1241)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093)
      ... 50 more
  
  janv. 26, 2014 12:03:54 PM org.glassfish.api.ActionReport failure
  Grave: Exception while loading the app
  janv. 26, 2014 12:03:55 PM org.glassfish.deployment.admin.DeployCommand execute
  Grave: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
  PlainTextActionReporterFAILUREDescription: deploy AdminCommandError occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V. Please see server.log for more details.
      [name=myapp
  janv. 26, 2014 12:03:56 PM PluginUtil doDeploy
  Infos: Deployed null
  Hit ENTER to redeploy, X to exit
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Wni6q.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/T5FCx.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/J0lUZ.jpg" alt="enter image description here">  </p>
  
  <p>m2e : 1.4.0.201</p>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
  http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.marc&lt;/groupId&gt;
  &lt;artifactId&gt;spring-mvc-3&lt;/artifactId&gt;
  &lt;name&gt;spring-mvc-3&lt;/name&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0.0-BUILD-SNAPSHOT&lt;/version&gt;
  
  &lt;properties&gt;
      &lt;java-version&gt;1.6&lt;/java-version&gt;
      &lt;org.springframework-version&gt;3.2.0.RELEASE&lt;/org.springframework-version&gt;
      &lt;org.aspectj-version&gt;1.6.10&lt;/org.aspectj-version&gt;
      &lt;org.slf4j-version&gt;1.7.5&lt;/org.slf4j-version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!-- Spring --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework-version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;!-- Exclude Commons Logging in favor of SLF4j --&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
               &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework-version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- AspectJ --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
          &lt;version&gt;${org.aspectj-version}&lt;/version&gt;
      &lt;/dependency&gt;   
  
      &lt;!-- Logging --&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;${org.slf4j-version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
          &lt;version&gt;${org.slf4j-version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;${org.slf4j-version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- @Inject --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.inject&lt;/groupId&gt;
          &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
          &lt;version&gt;1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Servlet --&gt;
      &lt;!--
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-servlet-api&lt;/artifactId&gt;
          &lt;version&gt;7.0.30&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp.jstl&lt;/groupId&gt;
          &lt;artifactId&gt;jstl-api&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                  &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.web&lt;/groupId&gt;
          &lt;artifactId&gt;jstl-impl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                  &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      --&gt;
      &lt;!-- Jackson JSON Processor --&gt;
      &lt;!--
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;version&gt;1.8.1&lt;/version&gt;
      &lt;/dependency&gt;
      --&gt;
      &lt;!-- Rome Atom+RSS --&gt;
      &lt;!--
      &lt;dependency&gt;
          &lt;groupId&gt;net.java.dev.rome&lt;/groupId&gt;
          &lt;artifactId&gt;rome&lt;/artifactId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;/dependency&gt;
      --&gt;
      &lt;!-- JSR 303 with Hibernate Validator --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.GA&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;5.0.2.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!--  MYSQL driver--&gt;
  &lt;!--        &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;version&gt;5.1.27&lt;/version&gt;
      &lt;/dependency&gt; --&gt;
  
      &lt;!-- JDBC --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework-version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
          &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
          &lt;version&gt;20030825.184428&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  
  
      &lt;!-- Joda Time Library --&gt;  
      &lt;!--
      &lt;dependency&gt;
          &lt;groupId&gt;joda-time&lt;/groupId&gt;
          &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
          &lt;version&gt;1.6.2&lt;/version&gt;
      &lt;/dependency&gt;
      --&gt;
      &lt;!-- Test --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mockito&lt;/groupId&gt;
          &lt;artifactId&gt;mockito-core&lt;/artifactId&gt;
          &lt;version&gt;1.9.5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.10&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!--
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework-version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.10&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
          &lt;artifactId&gt;hamcrest-library&lt;/artifactId&gt;
          &lt;version&gt;1.3&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;Spring Milestone&lt;/id&gt;
          &lt;url&gt;http://maven.springframework.org/milestone&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;build&gt;
  &lt;finalName&gt;spring-mvc-3&lt;/finalName&gt;
  &lt;plugins&gt;       
      &lt;!--  embedded glassfish plugin --&gt;
  
    &lt;plugin&gt;
      &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
      &lt;artifactId&gt;maven-embedded-glassfish-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.1.1&lt;/version&gt;
      &lt;configuration&gt;
          &lt;glassfishDirectory&gt;${local.glassfish.home}&lt;/glassfishDirectory&gt;
          &lt;user&gt;admin&lt;/user&gt;
          &lt;passwordFile&gt;${local.glassfish.passfile}&lt;/passwordFile&gt;
          &lt;domain&gt;
              &lt;name&gt;domain1&lt;/name&gt;
              &lt;httpPort&gt;8080&lt;/httpPort&gt;
              &lt;adminPort&gt;4848&lt;/adminPort&gt;
              &lt;resources&gt;
                  &lt;jdbcDataSource&gt;
                      &lt;name&gt;jdbc/TestDB&lt;/name&gt;
                      &lt;type&gt;connectionPoolDataSource&lt;/type&gt;
                      &lt;poolName&gt;SomePool&lt;/poolName&gt;
           &lt;className&gt;com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource&lt;/className&gt;
                      &lt;description&gt;Some JDBC Connection Pool&lt;/description&gt;
                      &lt;allowNonComponentCallers&gt;false&lt;/allowNonComponentCallers&gt;
                      &lt;validateConnections&gt;true&lt;/validateConnections&gt;
                      &lt;validationMethod&gt;metaData&lt;/validationMethod&gt;
                      &lt;properties&gt;
                          &lt;property&gt;
                              &lt;name&gt;portNumber&lt;/name&gt;
                              &lt;value&gt;3306&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;password&lt;/name&gt;
                              &lt;value&gt;xxxxxx&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;user&lt;/name&gt;
                              &lt;value&gt;xxx&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;serverName&lt;/name&gt;
                              &lt;value&gt;localhost&lt;/value&gt;
                          &lt;/property&gt;
                          &lt;property&gt;
                              &lt;name&gt;databaseName&lt;/name&gt;
                              &lt;value&gt;xxxx&lt;/value&gt;
                          &lt;/property&gt;
                      &lt;/properties&gt;
                  &lt;/jdbcDataSource&gt;
              &lt;/resources&gt;
          &lt;/domain&gt;
          &lt;components&gt;
              &lt;component&gt;
                  &lt;name&gt;${project.artifactId}&lt;/name&gt;
                  &lt;artifact&gt;target/${project.build.finalName}.war&lt;/artifact&gt;
              &lt;/component&gt;
          &lt;/components&gt;
          &lt;debug&gt;true&lt;/debug&gt;
          &lt;terse&gt;false&lt;/terse&gt;
          &lt;echo&gt;true&lt;/echo&gt;
      &lt;/configuration&gt;         
  
  &lt;!--         &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt; driver mysql
              &lt;version&gt;5.1.27&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt; --&gt;
    &lt;/plugin&gt;
  
      &lt;!-- Maven compiler plugin --&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.3.2&lt;/version&gt;
          &lt;configuration&gt;
              &lt;source&gt;${java-version}&lt;/source&gt;
              &lt;target&gt;${java-version}&lt;/target&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  &lt;/plugins&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p><img src="https://i.stack.imgur.com/6hwGk.jpg" alt="enter image description here"></p>