0

i am running on maven 2 and i am using the Apache Tomcat Maven Plugin for tomcat 7 with the following configuration:

<plugin>
  <groupId>org.apache.tomcat.maven</groupId>
  <artifactId>tomcat7-maven-plugin</artifactId>
  <version>2.0-beta-1</version>
    <configuration>
      <path>/${project.build.finalName}</path>
    </configuration>       
</plugin>

but when trying to run the application with mvn tomcat7:run i am getting the following exception:

SEVERE: Unable to determine URL for WEB-INF/classes
javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found
        at org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733)
        at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

please advise how to fix this exception.

fresh_dev
  • 6,694
  • 23
  • 67
  • 95

1 Answers1

0

It seems that is a problem in the tomcat version bundled with the tomcat7-maven-plugin (which is fixed to 7.0.25). See this answer on a similar question.

Community
  • 1
  • 1
Kariem
  • 4,398
  • 3
  • 44
  • 73