Failed to publish to server. Tomcat 7.0

When I try to deploy a war file on a Tomcat 7.0.28 server, I get lower. My Eclipse is the Eclipse Java EE IDE for web developers. Versions: Indigo Service Release 2 Build id: 20120216-1857. I would appreciate if anyone can provide a solution / fix? Is this related to the eclipse or tomcat compatibility version? Thanks.

java.lang.NullPointerException at java.io.FileInputStream.<init>(Unknown Source) at org.eclipse.wst.server.core.util.PublishHelper.copyFile(PublishHelper.java:501) at org.eclipse.wst.server.core.util.PublishHelper.publishDelta(PublishHelper.java:435) at org.eclipse.wst.server.core.util.PublishHelper.publishDelta(PublishHelper.java:459) at org.eclipse.wst.server.core.util.PublishHelper.publishDelta(PublishHelper.java:459) at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.publishDir(PublishOperation2.java:141) at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.execute(PublishOperation2.java:82) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.performTasks(ServerBehaviourDelegate.java:1290) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:933) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3087) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) eclipse.buildId=M20120208-0800 java.version=1.6.0_32 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product 
+6
source share
5 answers

If you are using the Eclipse or Myeclipse IDE, clean all projects, such as Project -> Clean -> Clean all projects -> Ok. Now its working fine

+7
source

Following this topic, I will refer to the solution http://www.eclipse.org/forums/index.php/m/526327/

It seems that the deployment configuration file for your application has become wrong.

What happened to me is that if I changed the parameters of my server and unchecked "Submit modules without publishing", the server will start. With it, I received the error you indicated.

For me, the problem is that eclipse could not find my web.xml. My solution was that I needed to go to my project settings and delete the link to my webapp folder in the "Install Deployment" section. This led to a dialog about the location of my deployment description. After Eclipse it was that the reboot got everything in order.

+4
source

This seems to be a mistake. Here is a workaround;

When adding a new server, do not add the web application to the server. Just add a server without a web module. After adding the server, right-click on the server and add and remove. Now this should work.

+1
source

had the same problem with Eclipse Neon 2 (4.6.2) and Tomcat 8.5. The workaround is working. Add a server, but do not add an application to it. Then run the "Run on server" application and it will start working. You also need to say that I deleted the entire Maven repository and restarted Eclipse. After restarting, Maven downloaded all the dependencies. I did not like deleting the repository, but it seems like this is also an important part for troubleshooting.

0
source

I ran into the same problem. Just remove the server alone. Add a new server and projects to the server. Clean the Tomcat working directory. Then start the server, it will work fine

0
source

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


All Articles