Implement WTP without publishing

I am now on Tomcat 7.0.21, JDK1.6.29 and WTP 3.3.1 (works on Eclipse Indigo.) I'm not sure which version of M2E I am running. My project builds and deploys fine when I either install mvn, or run Tomcat outside of Eclipse, or deploy to the server via WTP with Disable Submit Modules Disabled.

However, when I start the server through WTP with the checkbox checked without publishing, Tomcat does not start successfully without executing:

  Dec 29, 2011 4:09:39 PM org.apache.catalina.startup.ContextConfig processAnnotationsJndi
 SEVERE: Unable to process JNDI URL [jndi: / localhost / plutom-ws / WEB-INF / classes] for annotations
 java.io.FileNotFoundException: jndi: / localhost / plutom-ws / WEB-INF / classes
     at 
 org.apache.naming.resources.DirContextURLConnection.list (DirContextURLConnection.java:463)
     at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi (ContextConfig.java:1901)
     at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi (ContextConfig.java:1905)
     at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl (ContextConfig.java:1828)
     at org.apache.catalina.startup.ContextConfig.webConfig (ContextConfig.java:1295)

If I manually create a class directory, then it complains about classes / com. Does the conflict between the class loader and the file path seem to be resolved somewhere?

+4
source share
1 answer

This, unfortunately, is a known bug between Eclipse WTP and Tomcat 7. Here are the relevant Bugzilla entries:

Tomcat 7 + Serve Modules without publishing cannot find classpath resources

Really fix "Serve modules without publishing" with tomcat 7 using the new VirtualDirContext of tomcat> = 7.0.24

Apparently, the fix is ​​known; it is not yet applied. I suppose this is not a common use case, because otherwise more and more people will request a fix. Too bad, this is a very useful feature.

+3
source

Source: https://habr.com/ru/post/1388538/


All Articles