I'm trying to deploy the simple WS example from tomEE:
http://openejb.apache.org/examples-trunk/simple-webservice/
As there is nothing special about it, I will post in detail what I did. Maybe someone sees what I'm doing wrong:
Machine: Win7, Eclipse, Server: tomEE+
-created new Dynamic Web Project with runtime target = the tomcat tomEE server
-created new package in /src, and added 3 classes there: Calculator, CalculatorWS, CalculatorTest.
-rightclick project > run as > run on server > choose tomEE.
Server starts up, launches http://127.0.0.1:8080/testproject
Which results in 404, as I have not set up any jsf page.
Anyhow, going to http://localhost:8080/testproject/Calculator?wsdl or http://localhost:8080/testproject/webservices/Calculator?wsdl as the example suggests, I too get 404 not found. Obvious the Webservices are not deployed?
What could be wrong with this basic and simple example?
I am using eclipse indigo and tomee 1.5.2. I have a class x.y.z.MyWS. It's annotated with #WebService and #Stateless.
The apache tomee log, during startup, says
INFO: Webservice(wsdl=http://localhost:8080/MyWebApp/webservices/MyWS, qname={http://z.y.x/}MyWSService) --> Ejb(id=MyWS)
So the WSDL is
http://localhost:8080/MyWebApp/webservices/MyWS?wsdl
Please check your logs.
I ran this example the other day, and ran into similar issues. The solution is really to look into the Apache Logs folder for the catalina log for the date, and also for the stderr file for today's date. They will tell you if the deployment worked or failed.
In my case, I was using JDEV, so I had removed the #Stateless annotation, and tried just dropping the .jar into the webapps folder. That did not work. However, putting it back in, and dropping the .jar worked fine.
As a web application (.war), the .class files were moved into WEB-INF\classes within the .war file and I dropped that into webapps. I looked at the Catalina Log and it said where the endpoint was (for the wsdl). I typed:
http://localhost:8080/SimpleWebService/Calculator?wsdl, and the WSDL file appeared.
After that, I ran some simple Soap Requests with soap ui. It worked fine. this was with version 1.7.1.
Related
I am migrating a Spring-Boot application to a new server (Amazon-Linux). I could not deploy the application using Tomcat manager. Uploading the ROOT.war using the manager fails.
So, I deployed the application by manually uploading the ROOT.war. At first, it seemed that the deployment went well, the first page of the application (login) was loading. But after submitting the credentials, the application is not redirecting me to the home page. After investigation, it turned out that in the work directory (work/Catalina/............../WEB_002dINF/jsp/) there are only two files (my_login_jsp.class, my_login_jsp.java). So, does that mean compilation for other jsp files are being failed?
Please advise how this can be fixed?
Found the solution. There is something wrong with the Tomcat package that comes with amazon-linux-extras.
After removing the aws package, now I am using Tomcat downloaded from the official website. The is working perfectly.
I am making a project in Java which is a online web application. I am facing issues with Tomcat 8 and jsp, if I try to run my jsp files on server it gives an error that 404:requested resource now found.
I tried every way given on you channel but nothing helped. Now I'm at an stage I have configured the server 100 times and nothing helps. I created a new project on other workspace and copied everything there and then run those jsp files it executed well for once and then after that when I stopped the server it again started giving the same error.
Whenever I restart the server the server does not start and gives error Tomcat failed to start and then when I remove my project below the server name it starts. If I configure new server same happens.
I can't figure out where the problem lies as earlier I was able to run my project using same Eclipse Luna IDE.
Based on your question, it seems you need to configure eclipse to take control from Tomcat.
Maybe this can help as well: HTTP Status 404 - The requested resource (/) is not available
FAIL - Deployed application at context path /RxCircle but context failed to start
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:173)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:125)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:202)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
i am using tomcat 6
netbeans 7.0
java 6
i am getting this error when i am running my application in netbeans..
I suspect that either (1) Your web.xml is missing, (2) your applicationContext is malformed or (3) your versions are not playing nicely together.
Since you are using Netbeans you can view the Server Log by doing this:
Open the Services window (if it is not open go to: Window > Services)
Right-click on the Tomcat Server and select View Server Log.
Now you can see the actual exception that is causing Tomcat not to deploy your war.
This is a very generic error message and can be due to any reason like wrong servlet filter defined or malformed application context file.
To understand fully you need to get more logging details from tomcat.
So set the logging level to debug in tomcat and then start the tomcat.
Below url you may refer for further details
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
How to set level logging to DEBUG in Tomcat?
Hopefully you will get more details about the deployment error root cause.
Try stopping the Tomcat server so as to allow Netbeans to run it. If the server is already running when Netbeans tries to deploy an app Netbeans will display the delopy failed message.
I had the same issue. I was using Java 8, Tomcat 8, NetBeans 8.1.
What I did was, I manually replaced:
1. nbproject/build-impl.xml
2. web/WEB-INF/web.xml
with a previous version of the files. Please make sure to have backups.
I have faced same issue
I searched lot of solutions but not worked
If you are facing the same problem then the solution is
First you have backup your web.xml code file from your
project NetBeanss
Now delete web.xml from project
Now right click on web-inf file chose web after that chose deployment descriptor
After that
Now you can run your prj check your solution is solve as context will run on localhost server
Afte thaer will some error because we can't save our servlet file link so do it
Run it
Now you will see your problem solve
It's worked for.me
I have a Jersey service that I installed on one machine and worked perfectly, then I imported the project on another machine, created a WAR and deployed it in tomcat 6.0.
But now it returns a 404.
The source code is in the following link: http://www.vogella.com/articles/REST/article.html
I have no clue where to start looking for problems. I appreciate your guidance.
Its a wild guess. But I am almost sure it is happening because you dont have jersey.jar in the classpath. I am guessng this because I think as you do not have the jar in the classpath when the container is seeimg something like rest/* in the URL it is searching for the Jersey Servlet ; which being not in the class path is not found. Hence the error
I have been working on this web application using Eclipse and m2e (maven plugin for Eclipse).
After a while I decide to change the project name in eclipse doing: Right click on project >> refactor >> rename
Following this I see a few errors coming up, mostly to do with classpath configuration & java versions mismatch. I fix them, adding the maven dependencies to the build path, and updating the java versions to be used during compilation & run time.
I rebuild my web app & restart my server (Tomcat in this case). Open my browser to go to my app's root url. And I get a 404 page (everything looks fine in the console btw).
I've been going through my buildpath and classpath config to double check if anything was coming from there but everything seems fine. I'm confused and unsure where to look at.
Thanks in advance
This really depends on your Setup. If you are using the default path, it is (as Kal said) myserver/newappname.
If you are using a url that you have configured in webserver for easier readability like (myapp.myserver.com) you would have to change the redirection in your server from your old appname to the new one.
Actually,
404 HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested.
1. Check your path with newapplication name.
2. See inside your server, Is there a resource with (newNameApp.war)?
3. As you are using maven, try to build the project and see the log, by which name war is generated, and where the war got placed.
I faced the same situation and simply restarted Eclipse and no more 404 afterward