I have with me the client interface for a web service that was built using JBoss/RESTeasy. The web service calls work fine when they are invoked from a stand-alone app, but as soon as I put them into a webapp running in a Tomcat container (on the same machine), they start behaving weirdly. Some of the calls return empty results while some others simply fail with this exception:
org.jboss.resteasy.client.ClientResponseFailure: Error status 404 Not Found returned
Any idea of what might be going on? Could this be a result of a library conflict? All the required client libraries are in the WEB-INF/lib directory of the webapp.
Seems that your services are not deployed properly. Take a look at your catalina.out or some other logs for more details.
Related
My project has a Java servlet that extends HttpServlet. In ops this servlet responds properly to AJAX calls to the server, which runs Tomcat 6. The calls's URLs are of the form host:port/App/Servlet(query-string).
I am adding a new AJAX call to the servlet. I copy the servlet WAR file to the Tomcat webapps directory and bounce the tomcat service. Then I run my project (from a tcsh script). Calls to the servlet now return HTTP 404.
I see nothing in the Catalina log file indicating that the servlet even started, but no error messages as to why it wasn't found. (I suspect there's some other log setting that I need to tweak and some other log file I need to review.)
I cross checked with another development server that runs the original servlet, and it has no problems.
What's off with the routing to the servlet, and how do I fix it?
ETA1:
The servlet has a list of calls: Call1, Call2, etc. I added Call3 to the list and reused the pattern for Call1 as much as I could find. Now both Call1 and Call3 return 404 errors.
ETA2:
I dropped the servlet WAR file from the other development server -- where the existing AJAX calls work properly -- onto this development server. The calls continued to work properly. Although I did notice a quirk that the build system runs JDK 1.7.0_51 and the app runs JDK 1.7.0_71. I also copied the AJAX request's URL and went right to that location. With the existing servlet, I got an AJAX response that was pretty much correct. With my dev version, I got an empty page.
ETA3:
I'll clarify my scenario, based on feedback from the comments.
My project has a Java web app. It runs properly in and of itself.
The app sends AJAX calls to a Java servlet. This servlet works properly in operations. Also, when I copy the release version to my development Tomcat 6 server, the release version works properly.
I added a feature to the servlet and deployed the WAR file to the development Tomcat server. Now Tomcat complains it can't find the servlet (HTTP 404), even for identical calls and unmodified features that used to work properly.
As the release version works properly on the development web server, I conclude that Tomcat itself works properly. I also conclude that there is no issue with the URL or the port. As far as I can tell, Tomcat either can't start the servlet or the servlet fails before reaching its constructor. I have not found the log file or logging setting that would show the failure.
I have to deploy an EAR archive corresponding to a Java EE application in a client's WebLogic server. I have full access to Enterprise Manager but I'm not allowed to deploy through it—instead, I need to invoke a web service that triggers a home-brew shell script. I can see its source code: it first attempts to undeploy the app and (no matter the result) then attempts to deploy the uploaded EAR; each task call a Python script and that's where I lose track. I believe actual work is eventually done by Java libraries from WebLogic Scripting Tool.
The problem is that I'm not getting any error code or message but the application stubbornly remains in its previous release. I'm positively sure there's nothing wrong with the EAR. I've recompiled everything several times and it deploys successfully to the staging server (where I do use EM).
Is there any log file to be found either in Enterprise Manager or Administration Console?
I am taking over an old colleague's code and he used JHipster to build a Maven-Spring-Angular project.
I am able to compile, package his code and I used a simple Chrome Web Server (plugin), point it at the project's "target" folder which contains all the web components (i.e. assets, bower_components, META-INF, WEB-INF, etc) and his code, a dashboard can run successfully on the Chrome Web Server.
Problem is, all API calls to the Java back-end are failing.
IMAGE: API calls 404 error
IMAGE: Sample endpoint, api/data
Am I missing any steps when trying to run the project locally on my PC?
Will update the answer in details soon but just want to share the solution.
Chrome Web Server is not a proper Servlet Container hence Spring wasn't able to start. Since Spring did not start, requests to the endpoints could not be handled.
The project based on the jetty at startup must display the application version in console. Is desired to show version data just after jetty says he started. However, the app architecture does not allow to do so directly from my code.
Perhaps this can be done using configuration files?
Editing1:
Project starts as jetty server from compiled with maven war file and on momet of start I have no access to pom.xml. Also, after start no java methods are calling. Jetty server waits while somebody connect to it via browser or rest api (not sure how it works). Only after a user request my code will be called.
So, I need to show version of my project just after jetty server run with my compiled war file. How can I do it?
I have several existing web-apps deployed as standalone war files in the app container (resin). Some use axis2 jar files and axis2-generated Stub files to make calls to external SOAP based web services. They were all working fine prior to this.
I recently deployed axis2.war to the same container in order to create web services (unrelated to the client code mentioned above).
As soon as I restart the app container, client calls to the external webservices seem to be "intercepted" by my newly deployed axis2.war.
Services appear temporarily in the "Available Services" page of the axis2 web-app, with what appears to be randomly generated name based on the original external webservice name.
These services disappear shortly after, but the result is that my client code fails with a 500 error, as the local Axis2.war doesnt know how to handle those requests.
I have been searching for 2 days and haven't found mention of anyone experiencing anything similar. I am not even sure how to explain what is going on, as my client code never references localhost to make those web service calls. I am assuming this has to do with some configuration in axis2.war?
If anyone has any idea or insight into what might be happening, I would really appreciate any information.
Thanks for your help