On 08/02/2024 14:17, Rick Noel wrote:
My class is RVXmlRpcServlet and below is the compile error that happens when I 
use the xmlrpc-server3.1.3.jar after that jar has been run through  the 
migration tool jakartaee-migration-1.0.7

That same class throws NO compile error on Tomcat 9 using xmlrpc-server3.1.3.jar

Here is the compile error........

The bug is your code. You need up update RVXmlRpcServlet to use jakarta.servlet.Servlet rather than javax.servlet.Servlet

Ditto for any other Java EE classes you have referenced in your code.

If you want your application to work with Tomcat 9 and Tomcat 10 I suggest you:

- write it for Tomcat 9
- package it as a WAR file
- process the entire WAR file with the migration tool
- use original WAR file with Tomcat 9 and the migrated WAR file with
  Tomcat 10+

Mark


06-Feb-2024 15:48:53.044 SEVERE [http-nio-8588-exec-1] 
org.apache.catalina.core.StandardWrapperValve.invoke Allocate exception for 
servlet [XmlRpcServlet]
        java.lang.ClassCastException: class 
com.radiovoodoo.xmlrpc.RVXmlRpcServlet cannot be cast to class 
jakarta.servlet.Servlet (com.radiovoodoo.xmlrpc.RVXmlRpcServlet is in unnamed 
module of loader org.apache.catalina.loader.ParallelWebappClassLoader 
@568750b7; jakarta.servlet.Servlet is in unnamed module of loader 
java.net.URLClassLoader @18769467)
                at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:865)
                at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:649)
                at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:115)
                at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
                at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
                at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
                at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
                at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
                at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
                at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340)
                at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
                at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
                at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
                at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
                at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
                at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
                at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
                at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.base/java.lang.Thread.run(Thread.java:833)


Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Thursday, February 8, 2024 8:54 AM
To: users@tomcat.apache.org
Subject: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

[You don't often get email from ma...@apache.org. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

On 08/02/2024 13:45, Rick Noel wrote:
Our application uses classes in this jar     xmlrpc-server3.1.3.jar .(it is the 
latest version)

We are trying to migrate to Tomcat 10 but that  jar uses the   javax.server. 
package classes instead of the needed  jakarta.server. pacakage.


I have tried running this jar trough the latest Tomcat 10 migration
tool (jakartaee-migration-1.0.7) which is suppose to alter the jar to
make all classes use  jakarta.server.  classes

but the tool is not fully converting all the classes,  since I still get 
compile errors at run time.

Please provide details of the compilation errors that you see.

I think in addition to not using  javax.server.  the jar should use
this class

java.net.URI  instead of   java.net.URL

That seems ... unlikely.

anyone have ideas on how to make xmlrpc-server3.1.3.jar  tomcat 10 compliant?

I'd be surprised if the migration tool didn't process a JAR that old correctly.

Mark


BTW the jar in question has classes in this package            
org.apache.xmlrpc.

Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you know the sender and you are sure the 
content is safe. Please report the message using the Report Message feature in 
your email client if you believe the email is suspicious.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to