//import com.google.gwt.user.server.rpc.RemoteServiceServlet;
[javac] /home/david/projects/gwt-2.12.1/dmatthews.org/src/org/dmatthews/server/RemoteIPServiceImpl.java:7: error: cannot access ServletException
[javac] public class RemoteIPServiceImpl extends RemoteServiceServlet implements RemoteIPService{
If you are using jakarta.servlet, you shouldn't need to do any bytecode fixing, provided you are depending on gwt-servlet-jakarta.jar and have changed your servlet implementation to extend from com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet.If you aren't getting any error except 404, that suggests to me that the servlet isn't configured to be loaded at all - can you confirm that it is listed in the web.xml? If instead you are using annotations for discovery, confirm it is jakarta.servlet.annotation.WebServlet rather than javax, and consider adding some logging to verify that your servlet is having its constructor and init(config) method called at all. If not, something is probably misconfigured in how you are signaling to your servlet container how it should find and load the required servlets.On Tuesday, December 3, 2024 at 6:04:49 AM UTC-6 dav...@googlemail.com wrote:Thanks Shaik & Jens for your replies, but I've still got the same problem. To recap the project includes a servlet (yes it is gwt-rpc) that simply grabs the remote IP and makes it available to client code. If I browse to the servlet, I should get a 405 signifying that the servlet is running but GET is not supported; but I still get a 404.Prompted by your replies, I saw I had neglected to update the ant build file with gwt-servlet-jakarta.jar instead of gwt-servlet.jar, but nothing else you suggested seems to apply. The web.xml and <project>.gwt.xml files are unchanged and nothing else on the production server (apache, tomcat) has changed.I again tried replacing the server class with a byte enhanced version as I need to do with 2.10.0, but although it does add a few bytes, still I get the 404. Nothing in either apache or tomcat logs apart from the 404s and 405sOn Monday, 2 December 2024 at 14:41:12 UTC SHAIK FAYAZ wrote:Almost path problem it would be or check the path names correctly
On Sun, Dec 1, 2024, 7:05 AM SHAIK FAYAZ <sfay...@gmail.com> wrote:1. Check How the Servlet is Set Up
Look at the file where your servlet is connected to a URL, like web.xml or in your annotations (comments in the code). Make sure the URL path for your servlet is correct, so it gets triggered when you visit the right link.
2. Ensure You Updated All Java Imports
When you updated from version 2.10.0 to 2.12.1, you need to check if your code is using the updated jakarta.* package instead of javax.*. Some of the old names have changed, so make sure everything is up to date.
3. Make Sure Your Tomcat Version Works with the New Code
If you're using an older version of Tomcat (like version 9 or below), it may not work with the updated jakarta.* code. Make sure you're using Tomcat version 10 or higher, which supports this newer format.
4. Check if Your Servlet Supports GET or POST Methods
Earlier, you got a "405" error, which means the servlet was not set up to handle certain requests like GET. You need to make sure that your servlet is set up to handle the right type of requests.
5. Check Apache Proxy Settings
If you're using Apache to forward requests to Tomcat, make sure Apache is set up correctly so that it passes the requests properly. A wrong setting could cause the "404" error you're seeing now.
6. Look at Logs for Clues
Check both the Tomcat and Apache logs. They might give you more details about what's going wrong and help identify the issue.
7. Issues with Code Enhancers
If you're using tools that automatically modify your code (like Hibernate or other libraries), check to make sure they're compatible with the new version (2.12.1). These tools sometimes cause problems when you upgrade versions.On Sun, Dec 1, 2024, 5:31 AM Jens <jens.ne...@gmail.com> wrote:GWT doesn't really have any servlet magic so I doubt that the GWT upgrade has caused the issue. Are you double sure you haven't changed anything else except the GWT library? No Tomcat update? No Apache update? No update of Apache proxy rules?It sounds like your servlet is a GWT-RPC service because you used the Jakarta migration tool. If that is true you can now use gwt-servlet-jakarta.jar and skip the migration tool.-- J.--dav...@googlemail.com schrieb am Samstag, 30. November 2024 um 17:27:59 UTC+1:hiI'm trying to upgrade from 2.10.0 to 2.12.1.My app runs in tomcat / java 21 with apache using it as a proxy. It's mostly client code except for a servlet whose sole function is to grab the remote ip and make it available to client code. With the 2.10.0 setup I had to run the server class through the jakartaee migration tool to make it work. With everything ok, if you browse to the servlet you get a 405 as the GET method is not supported, although that confirms the servlet is running.With unchanged code everything compiles with 2.12.1, but the servlet will not run. I've tried both the standard compiled class and its byte enhanced version. Both give a 404 and the ip is not available to client code. The client code itself otherwise runs as expected.Any pointers towards a fix?
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/dda2b7e2-3565-4f79-ac99-b90f8cac9522n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/5138bbfa-dd9a-4be2-80cb-eb0e2b703a9en%40googlegroups.com.
No comments:
Post a Comment