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
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
I am using netbeans to create my project and my code runs fine on Localhost . I create a war file and deploy on tomcat 7 and 8 , and it throws Internal server Error 500 . A little changes in code after a day of problem solving got us here to a point where our rest api where we use Mediatype.Application_json , it crashes gives the Internal server error .
When a string is passed using Mediatype.TEXT_HTML , we dont have an issue .
Unfortunately POST for rest api only taken in JSON and I am desperately trying to find someone who can solve this
Please help
You probably have two versions of the JAX-RS jars on the classpath. Or you have an unwanted jsr311-api jar on your classpath.
See this response.
I made sure all the versions etc of all JAX jars were not duplicated . And since I was on a deadline , I just used Maven in my project and works like a charm
I am trying to get the CAS setup up and running and I am pretty new to this.
I am following through the standard steps similar to this video.
I have created keystore file
Created a certificate
Imported it successfully and add to cacerts file
I have made the necessary changes in the server.xml of tomcat
After all these steps, I started the tomcat, placed the war in the webapp and to test, I tried to access http://localhost:8080/cas/login and https://localhost:8443/cas/login and it is throwing and Redirect loop error.
I have no clue what I am doing wrong. Any help is appreciated!.
It was nothing to do with my configuration.
I watched several videos and understood that my configuration do not have any problems. The problem is with the 4.0.0 release. I do not know if any one else faced the same problem.
My Solution: I took latest source (4.0.2) and built the war using maven and deployed. It worked perfectly.
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.