You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rick Noel <RN...@westwoodone.com.INVALID> on 2024/02/08 13:45:09 UTC

jakartaee-migration-1.0.7 migration tool failure

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.


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

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


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

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

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


Re: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Mark Thomas <ma...@apache.org>.
On 09/02/2024 16:26, Rick Noel wrote:
> Thank you so much Mark for working with me on this issue!
> I am taking your recommendation to create a   webapps-javaee directory and place my Tomcat 9 running war file into
> that dir so that Tomcat does the compile correctly.
> 
> Only problem is that now I cannot figure out what is the correct URL path to my servlet!
> 
> When I place the .war, the old way with the .war  being in  webapps/transaction,    my tomcat cat log says.......
> 
> Deploying web application directory [C:\apache-tomcat-9.0.73\webapps\transaction
> And I see my application at
> C:\apache-tomcat-9.0.73\webapps\transaction\ROOT##0001
> 
> And I can hit my servlet via.......
> 
> http://localhost:8588/XmlRpc

That is all very non-standard.

What I would expect to see is:

foo.war deployed to $CATALINA_BASE/webapps/foo.war and then accessed at 
http://localhost:port/foo

In server.xml what do you have configured for the Host's appBase ? Is it 
"webapps/transaction" ?

Mark


> 
> BUT when I place my .war in webapps-javaee\transaction the tomcat cat log says......
> 
> Deploying web application directory [C:\apache-tomcat-10.1.18\webapps-javaee\transaction\transaction
> 
> And I cannot hit either..
> 
> http://localhost:8588/XmlRpc
> or
> http://localhost:8588/transaction/XmlRpc
> 
> 
> The creation of the C:\apache-tomcat-10.1.18\webapps-javaee\transaction\transaction  directory is baffling me
> See attached file
> 
> I expect only to see the creation of a C:\apache-tomcat-10.1.18\webapps-javaee\transaction\ROOT##0001 directory.
> That is where I believe my application to be
> 
> Here is how I have my context defined in server.xml..
> 
> <Host name="transaction"  appBase="webapps-javaee/transaction"   unpackWARs="true" autoDeploy="true" undeployOldVersions="true">
> 
> Is my server.xml wrong?
> When I place my .war in   webapps-javaee\transaction   dir?
> 
> 
> 
> 
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Thursday, February 8, 2024 5:45 PM
> To: users@tomcat.apache.org
> Subject: Re: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure
> 
> [You don't often get email from markt@apache.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Confirmed this is user error. There is no bug in the migration tool.
> 
> Steps to demonstrate this:
> 
> - Create new, blank Eclipse dynamic web project
> - Add provided servlet code
> - Add required libraries
> - Remove referenced to internal logging code
> - Add web.xml with basic mapping to "/test"
> - Export WAR file
> - Deploy to Tomcat
> - Start Tomcat
> - Request servlet
> 
> Servlet loads and then reports an exception during init. That is fine.
> It proves that the servlet was loaded which is all we care about at this point.
> 
> - Use migration tool to migrate WAR
> - Deploy migrated WAR to Tomcat 10.1.x
> - Start Tomcat
> - Request servlet
> 
> Servlet loads and then reports an exception during init. Again, this is fine as it proves that the Servlet has been converted correctly and can be loaded by Tomcat 10.1.x.
> 
> Best guess, the Eclipse project isn't configured correctly to compile the web application for Tomcat 10.1.x.
> 
> At this point the simplest solution is likely to be:
> 
> - take the WAR file that works on Tomcat 9
> - drop in webapps-javaee in Tomcat 10 and let Tomcat convert it
>     automatically
> 
> Mark
> 
> 
> On 08/02/2024 20:28, Rick Noel wrote:
>> No I cannot compile from command line.
>>
>> But I do not really care how eclipse compiles my class anyway.
>> All I know is that eclipse compiles the class without errors. Using
>> the jars I tell it to. (all the jars run through the migration tool) But Tomcat 10 can not compile the class using those same migrated jar files.
>>
>> And my class has no use of javax.server  classes in it.
>> All the javax.server classes are only in the third part jar files
>> which are supposed to have been converted to use  jakarta.server
>> classes
>>
>> Is this not a bug with Tomcat migration tool?
>>
>> Again here is my class that does not compile on Tomcat 10...........
>> It has no reference to  javax.server
>>
>>
>> package com.radiovoodoo.xmlrpc;
>>
>> import java.io.IOException;
>> import java.net.MalformedURLException; import java.net.URL;
>>
>> import org.apache.xmlrpc.XmlRpcException;
>> import org.apache.xmlrpc.XmlRpcRequest; import
>> org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.Authenticati
>> onHandler; import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
>> import org.apache.xmlrpc.server.PropertyHandlerMapping;
>> import org.apache.xmlrpc.webserver.XmlRpcServlet;
>>
>> import com.radiovoodoo.util.Log;
>>
>> /**
>>    * @(#)RVXmlRpcServlet.java
>>    *
>>    * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
>>    *
>>    * @author  Hank Zill <hz...@radiovoodoo.com>
>>    * @version 1.0
>>    *
>>    * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
>>    */
>>
>> public class RVXmlRpcServlet
>>      extends XmlRpcServlet
>> {
>>      /**
>>       *  this init parameter defines the path to the property file from
>>       *  which to load the XML RPC handler mappings.
>>       *
>>       *  the path is relative to the CLASSPATH
>>       */
>>      public static final String RESOURCE_PATH = "property-file-path";
>>
>>      protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
>>         throws XmlRpcException
>>      {
>>         PropertyHandlerMapping mapping = null;
>>
>>         /* String resourcePath = getInitParameter( RESOURCE_PATH );
>>
>>         if ( resourcePath == null )
>>         {
>>            throw new XmlRpcException( "No property file defined.  This servlet must have the init-param " + RESOURCE_PATH + " set." );
>>         } */
>>         String resourcePath = "somefile.properties";
>>
>>         URL url = null;
>>          try {
>>                url = getServletContext().getResource( resourcePath );
>>          } catch (MalformedURLException e1) {
>>                throw new XmlRpcException( resourcePath + " " + e1 );
>>          }
>>
>>         if (url == null)
>>         {
>>            throw new XmlRpcException("Failed to locate resource " + resourcePath );
>>         }
>>         try
>>         {
>>            mapping = newPropertyHandlerMapping(url);
>>         }
>>         catch (IOException e)
>>         {
>>            throw new XmlRpcException("Failed to load resource " + url + ": " + e.getMessage(), e);
>>         }
>>
>>         if ( mapping == null )
>>            Log.debug( "HandlerMapping is null" );
>>         else
>>         {
>>            String[] methods = mapping.getListMethods();
>>
>>            for ( int x = 0; x < methods.length; x++ )
>>            {
>>               Log.debug( "method: " + methods[x] );
>>            }
>>         }
>>
>>         mapping.setAuthenticationHandler(new AuthenticationHandler() {
>>           //rick removed override annotaion so this class will compile on java 1.5
>>                //@Override
>>                public boolean isAuthorized(XmlRpcRequest arg0) throws XmlRpcException {
>>                        return true;
>>                }
>>         });
>>
>>         return mapping;
>>      }
>> }
>>
>>
>>
>>
>>
>> Rick Noel
>> Systems Programmer | Westwood One
>> RNoel@westwoodone.com
>>
>> -----Original Message-----
>> From: Rob Sargent <rs...@xmission.com>
>> Sent: Thursday, February 8, 2024 1:54 PM
>> To: Tomcat Users List <us...@tomcat.apache.org>
>> Subject: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool
>> failure
>>
>> [You don't often get email from rsargent@xmission.com. Learn why this
>> is important at https://aka.ms/LearnAboutSenderIdentification ]
>>
>>> On Feb 8, 2024, at 9:04 AM, Rick Noel <RN...@westwoodone.com.invalid> wrote:
>>>
>>> I built  my app in Eclipse  and the build path is set to use the migrated jar.
>>> It compiles without error on Eclipse and using the migrated jar.  I
>>> have that same migrated jar in the Tomcat lib But when tomcat 10
>>> compiles it does not compile
>>>
>>> I have also used the migration tool on my .war that runs in Tomcat 9 and that war still fails with same compile error.
>>>
>>> So to summarize......... the migration tool fails to convert third
>>> party jar xmlrpc-server3.1.3.jar And it also fails when I use it on my .war ran through the migration tool.
>>>
>>>
>>> Rick Noel
>>> Systems Programmer | Westwood One
>>> RNoel@westwoodone.com
>>>
>>
>> Can you build from the command  line?  Who knows what eclipse does
>> under the covers
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

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


RE: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Rick Noel <RN...@westwoodone.com.INVALID>.
Thank you so much Mark for working with me on this issue!
I am taking your recommendation to create a   webapps-javaee directory and place my Tomcat 9 running war file into
that dir so that Tomcat does the compile correctly.

Only problem is that now I cannot figure out what is the correct URL path to my servlet!

When I place the .war, the old way with the .war  being in  webapps/transaction,    my tomcat cat log says.......

Deploying web application directory [C:\apache-tomcat-9.0.73\webapps\transaction
And I see my application at 
C:\apache-tomcat-9.0.73\webapps\transaction\ROOT##0001

And I can hit my servlet via.......

http://localhost:8588/XmlRpc

BUT when I place my .war in webapps-javaee\transaction the tomcat cat log says......

Deploying web application directory [C:\apache-tomcat-10.1.18\webapps-javaee\transaction\transaction

And I cannot hit either..

http://localhost:8588/XmlRpc 
or
http://localhost:8588/transaction/XmlRpc


The creation of the C:\apache-tomcat-10.1.18\webapps-javaee\transaction\transaction  directory is baffling me
See attached file

I expect only to see the creation of a C:\apache-tomcat-10.1.18\webapps-javaee\transaction\ROOT##0001 directory.
That is where I believe my application to be

Here is how I have my context defined in server.xml..

<Host name="transaction"  appBase="webapps-javaee/transaction"   unpackWARs="true" autoDeploy="true" undeployOldVersions="true">

Is my server.xml wrong?
When I place my .war in   webapps-javaee\transaction   dir?




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

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

Confirmed this is user error. There is no bug in the migration tool.

Steps to demonstrate this:

- Create new, blank Eclipse dynamic web project
- Add provided servlet code
- Add required libraries
- Remove referenced to internal logging code
- Add web.xml with basic mapping to "/test"
- Export WAR file
- Deploy to Tomcat
- Start Tomcat
- Request servlet

Servlet loads and then reports an exception during init. That is fine.
It proves that the servlet was loaded which is all we care about at this point.

- Use migration tool to migrate WAR
- Deploy migrated WAR to Tomcat 10.1.x
- Start Tomcat
- Request servlet

Servlet loads and then reports an exception during init. Again, this is fine as it proves that the Servlet has been converted correctly and can be loaded by Tomcat 10.1.x.

Best guess, the Eclipse project isn't configured correctly to compile the web application for Tomcat 10.1.x.

At this point the simplest solution is likely to be:

- take the WAR file that works on Tomcat 9
- drop in webapps-javaee in Tomcat 10 and let Tomcat convert it
   automatically

Mark


On 08/02/2024 20:28, Rick Noel wrote:
> No I cannot compile from command line.
>
> But I do not really care how eclipse compiles my class anyway.
> All I know is that eclipse compiles the class without errors. Using 
> the jars I tell it to. (all the jars run through the migration tool) But Tomcat 10 can not compile the class using those same migrated jar files.
>
> And my class has no use of javax.server  classes in it.
> All the javax.server classes are only in the third part jar files 
> which are supposed to have been converted to use  jakarta.server 
> classes
>
> Is this not a bug with Tomcat migration tool?
>
> Again here is my class that does not compile on Tomcat 10...........
> It has no reference to  javax.server
>
>
> package com.radiovoodoo.xmlrpc;
>
> import java.io.IOException;
> import java.net.MalformedURLException; import java.net.URL;
>
> import org.apache.xmlrpc.XmlRpcException;
> import org.apache.xmlrpc.XmlRpcRequest; import 
> org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.Authenticati
> onHandler; import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
> import org.apache.xmlrpc.server.PropertyHandlerMapping;
> import org.apache.xmlrpc.webserver.XmlRpcServlet;
>
> import com.radiovoodoo.util.Log;
>
> /**
>   * @(#)RVXmlRpcServlet.java
>   *
>   * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
>   *
>   * @author  Hank Zill <hz...@radiovoodoo.com>
>   * @version 1.0
>   *
>   * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
>   */
>
> public class RVXmlRpcServlet
>     extends XmlRpcServlet
> {
>     /**
>      *  this init parameter defines the path to the property file from
>      *  which to load the XML RPC handler mappings.
>      *
>      *  the path is relative to the CLASSPATH
>      */
>     public static final String RESOURCE_PATH = "property-file-path";
>
>     protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
>        throws XmlRpcException
>     {
>        PropertyHandlerMapping mapping = null;
>
>        /* String resourcePath = getInitParameter( RESOURCE_PATH );
>
>        if ( resourcePath == null )
>        {
>           throw new XmlRpcException( "No property file defined.  This servlet must have the init-param " + RESOURCE_PATH + " set." );
>        } */
>        String resourcePath = "somefile.properties";
>
>        URL url = null;
>         try {
>               url = getServletContext().getResource( resourcePath );
>         } catch (MalformedURLException e1) {
>               throw new XmlRpcException( resourcePath + " " + e1 );
>         }
>
>        if (url == null)
>        {
>           throw new XmlRpcException("Failed to locate resource " + resourcePath );
>        }
>        try
>        {
>           mapping = newPropertyHandlerMapping(url);
>        }
>        catch (IOException e)
>        {
>           throw new XmlRpcException("Failed to load resource " + url + ": " + e.getMessage(), e);
>        }
>
>        if ( mapping == null )
>           Log.debug( "HandlerMapping is null" );
>        else
>        {
>           String[] methods = mapping.getListMethods();
>
>           for ( int x = 0; x < methods.length; x++ )
>           {
>              Log.debug( "method: " + methods[x] );
>           }
>        }
>
>        mapping.setAuthenticationHandler(new AuthenticationHandler() {
>          //rick removed override annotaion so this class will compile on java 1.5
>               //@Override
>               public boolean isAuthorized(XmlRpcRequest arg0) throws XmlRpcException {
>                       return true;
>               }
>        });
>
>        return mapping;
>     }
> }
>
>
>
>
>
> Rick Noel
> Systems Programmer | Westwood One
> RNoel@westwoodone.com
>
> -----Original Message-----
> From: Rob Sargent <rs...@xmission.com>
> Sent: Thursday, February 8, 2024 1:54 PM
> To: Tomcat Users List <us...@tomcat.apache.org>
> Subject: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool 
> failure
>
> [You don't often get email from rsargent@xmission.com. Learn why this 
> is important at https://aka.ms/LearnAboutSenderIdentification ]
>
>> On Feb 8, 2024, at 9:04 AM, Rick Noel <RN...@westwoodone.com.invalid> wrote:
>>
>> I built  my app in Eclipse  and the build path is set to use the migrated jar.
>> It compiles without error on Eclipse and using the migrated jar.  I 
>> have that same migrated jar in the Tomcat lib But when tomcat 10 
>> compiles it does not compile
>>
>> I have also used the migration tool on my .war that runs in Tomcat 9 and that war still fails with same compile error.
>>
>> So to summarize......... the migration tool fails to convert third 
>> party jar xmlrpc-server3.1.3.jar And it also fails when I use it on my .war ran through the migration tool.
>>
>>
>> Rick Noel
>> Systems Programmer | Westwood One
>> RNoel@westwoodone.com
>>
>
> Can you build from the command  line?  Who knows what eclipse does 
> under the covers
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Re: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Mark Thomas <ma...@apache.org>.
Confirmed this is user error. There is no bug in the migration tool.

Steps to demonstrate this:

- Create new, blank Eclipse dynamic web project
- Add provided servlet code
- Add required libraries
- Remove referenced to internal logging code
- Add web.xml with basic mapping to "/test"
- Export WAR file
- Deploy to Tomcat
- Start Tomcat
- Request servlet

Servlet loads and then reports an exception during init. That is fine. 
It proves that the servlet was loaded which is all we care about at this 
point.

- Use migration tool to migrate WAR
- Deploy migrated WAR to Tomcat 10.1.x
- Start Tomcat
- Request servlet

Servlet loads and then reports an exception during init. Again, this is 
fine as it proves that the Servlet has been converted correctly and can 
be loaded by Tomcat 10.1.x.

Best guess, the Eclipse project isn't configured correctly to compile 
the web application for Tomcat 10.1.x.

At this point the simplest solution is likely to be:

- take the WAR file that works on Tomcat 9
- drop in webapps-javaee in Tomcat 10 and let Tomcat convert it
   automatically

Mark


On 08/02/2024 20:28, Rick Noel wrote:
> No I cannot compile from command line.
> 
> But I do not really care how eclipse compiles my class anyway.
> All I know is that eclipse compiles the class without errors. Using the jars I tell it to. (all the jars run through the migration tool)
> But Tomcat 10 can not compile the class using those same migrated jar files.
> 
> And my class has no use of javax.server  classes in it.
> All the javax.server classes are only in the third part jar files which are supposed to have been converted to use  jakarta.server classes
> 
> Is this not a bug with Tomcat migration tool?
> 
> Again here is my class that does not compile on Tomcat 10...........
> It has no reference to  javax.server
> 
> 
> package com.radiovoodoo.xmlrpc;
> 
> import java.io.IOException;
> import java.net.MalformedURLException;
> import java.net.URL;
> 
> import org.apache.xmlrpc.XmlRpcException;
> import org.apache.xmlrpc.XmlRpcRequest;
> import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler;
> import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
> import org.apache.xmlrpc.server.PropertyHandlerMapping;
> import org.apache.xmlrpc.webserver.XmlRpcServlet;
> 
> import com.radiovoodoo.util.Log;
> 
> /**
>   * @(#)RVXmlRpcServlet.java
>   *
>   * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
>   *
>   * @author  Hank Zill <hz...@radiovoodoo.com>
>   * @version 1.0
>   *
>   * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
>   */
> 
> public class RVXmlRpcServlet
>     extends XmlRpcServlet
> {
>     /**
>      *  this init parameter defines the path to the property file from
>      *  which to load the XML RPC handler mappings.
>      *
>      *  the path is relative to the CLASSPATH
>      */
>     public static final String RESOURCE_PATH = "property-file-path";
> 
>     protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
>        throws XmlRpcException
>     {
>        PropertyHandlerMapping mapping = null;
> 
>        /* String resourcePath = getInitParameter( RESOURCE_PATH );
>        
>        if ( resourcePath == null )
>        {
>           throw new XmlRpcException( "No property file defined.  This servlet must have the init-param " + RESOURCE_PATH + " set." );
>        } */
>        String resourcePath = "somefile.properties";
> 
>        URL url = null;
>    	  try {
> 		url = getServletContext().getResource( resourcePath );
> 	  } catch (MalformedURLException e1) {
> 		throw new XmlRpcException( resourcePath + " " + e1 );
> 	  }
> 
>        if (url == null)
>        {
>           throw new XmlRpcException("Failed to locate resource " + resourcePath );
>        }
>        try
>        {
>           mapping = newPropertyHandlerMapping(url);
>        }
>        catch (IOException e)
>        {
>           throw new XmlRpcException("Failed to load resource " + url + ": " + e.getMessage(), e);
>        }
> 
>        if ( mapping == null )
>           Log.debug( "HandlerMapping is null" );
>        else
>        {
>           String[] methods = mapping.getListMethods();
> 
>           for ( int x = 0; x < methods.length; x++ )
>           {
>              Log.debug( "method: " + methods[x] );
>           }
>        }
>        
>        mapping.setAuthenticationHandler(new AuthenticationHandler() {
>          //rick removed override annotaion so this class will compile on java 1.5
> 		//@Override
> 		public boolean isAuthorized(XmlRpcRequest arg0) throws XmlRpcException {
> 			return true;
> 		}
>        });
> 
>        return mapping;
>     }
> }
> 
> 
> 
> 
> 
> Rick Noel
> Systems Programmer | Westwood One
> RNoel@westwoodone.com
> 
> -----Original Message-----
> From: Rob Sargent <rs...@xmission.com>
> Sent: Thursday, February 8, 2024 1:54 PM
> To: Tomcat Users List <us...@tomcat.apache.org>
> Subject: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure
> 
> [You don't often get email from rsargent@xmission.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
>> On Feb 8, 2024, at 9:04 AM, Rick Noel <RN...@westwoodone.com.invalid> wrote:
>>
>> I built  my app in Eclipse  and the build path is set to use the migrated jar.
>> It compiles without error on Eclipse and using the migrated jar.  I
>> have that same migrated jar in the Tomcat lib But when tomcat 10
>> compiles it does not compile
>>
>> I have also used the migration tool on my .war that runs in Tomcat 9 and that war still fails with same compile error.
>>
>> So to summarize......... the migration tool fails to convert third
>> party jar xmlrpc-server3.1.3.jar And it also fails when I use it on my .war ran through the migration tool.
>>
>>
>> Rick Noel
>> Systems Programmer | Westwood One
>> RNoel@westwoodone.com
>>
> 
> Can you build from the command  line?  Who knows what eclipse does under the covers
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

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


RE: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Rick Noel <RN...@westwoodone.com.INVALID>.
No I cannot compile from command line.

But I do not really care how eclipse compiles my class anyway.
All I know is that eclipse compiles the class without errors. Using the jars I tell it to. (all the jars run through the migration tool)
But Tomcat 10 can not compile the class using those same migrated jar files.

And my class has no use of javax.server  classes in it.
All the javax.server classes are only in the third part jar files which are supposed to have been converted to use  jakarta.server classes

Is this not a bug with Tomcat migration tool?

Again here is my class that does not compile on Tomcat 10...........
It has no reference to  javax.server


package com.radiovoodoo.xmlrpc;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.XmlRpcRequest;
import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler;
import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
import org.apache.xmlrpc.server.PropertyHandlerMapping;
import org.apache.xmlrpc.webserver.XmlRpcServlet;

import com.radiovoodoo.util.Log;

/**
 * @(#)RVXmlRpcServlet.java
 *
 * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
 *
 * @author  Hank Zill <hz...@radiovoodoo.com>
 * @version 1.0
 *
 * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
 */

public class RVXmlRpcServlet
   extends XmlRpcServlet
{
   /**
    *  this init parameter defines the path to the property file from
    *  which to load the XML RPC handler mappings.
    *
    *  the path is relative to the CLASSPATH  
    */
   public static final String RESOURCE_PATH = "property-file-path";

   protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() 
      throws XmlRpcException
   {
      PropertyHandlerMapping mapping = null;

      /* String resourcePath = getInitParameter( RESOURCE_PATH );
      
      if ( resourcePath == null )
      {
         throw new XmlRpcException( "No property file defined.  This servlet must have the init-param " + RESOURCE_PATH + " set." );
      } */
      String resourcePath = "somefile.properties";

      URL url = null;
  	  try {
		url = getServletContext().getResource( resourcePath );
	  } catch (MalformedURLException e1) {
		throw new XmlRpcException( resourcePath + " " + e1 );
	  }

      if (url == null) 
      {
         throw new XmlRpcException("Failed to locate resource " + resourcePath );
      }
      try 
      {
         mapping = newPropertyHandlerMapping(url);
      } 
      catch (IOException e) 
      {
         throw new XmlRpcException("Failed to load resource " + url + ": " + e.getMessage(), e);
      }

      if ( mapping == null )
         Log.debug( "HandlerMapping is null" );
      else
      {
         String[] methods = mapping.getListMethods();

         for ( int x = 0; x < methods.length; x++ )
         {
            Log.debug( "method: " + methods[x] );
         }
      }
      
      mapping.setAuthenticationHandler(new AuthenticationHandler() {
        //rick removed override annotaion so this class will compile on java 1.5
		//@Override
		public boolean isAuthorized(XmlRpcRequest arg0) throws XmlRpcException {
			return true;
		}
      });

      return mapping;
   }
}





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

-----Original Message-----
From: Rob Sargent <rs...@xmission.com> 
Sent: Thursday, February 8, 2024 1:54 PM
To: Tomcat Users List <us...@tomcat.apache.org>
Subject: [EXT]Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

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

> On Feb 8, 2024, at 9:04 AM, Rick Noel <RN...@westwoodone.com.invalid> wrote:
>
> I built  my app in Eclipse  and the build path is set to use the migrated jar.
> It compiles without error on Eclipse and using the migrated jar.  I 
> have that same migrated jar in the Tomcat lib But when tomcat 10 
> compiles it does not compile
>
> I have also used the migration tool on my .war that runs in Tomcat 9 and that war still fails with same compile error.
>
> So to summarize......... the migration tool fails to convert third 
> party jar xmlrpc-server3.1.3.jar And it also fails when I use it on my .war ran through the migration tool.
>
>
> Rick Noel
> Systems Programmer | Westwood One
> RNoel@westwoodone.com
>

Can you build from the command  line?  Who knows what eclipse does under the covers
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@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.


Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Rob Sargent <rs...@xmission.com>.

> On Feb 8, 2024, at 9:04 AM, Rick Noel <RN...@westwoodone.com.invalid> wrote:
> 
> I built  my app in Eclipse  and the build path is set to use the migrated jar.
> It compiles without error on Eclipse and using the migrated jar.  I have that same migrated jar in the Tomcat lib
> But when tomcat 10 compiles it does not compile
> 
> I have also used the migration tool on my .war that runs in Tomcat 9 and that war still fails with same compile error.
> 
> So to summarize......... the migration tool fails to convert third party jar xmlrpc-server3.1.3.jar
> And it also fails when I use it on my .war ran through the migration tool.
> 
> 
> Rick Noel
> Systems Programmer | Westwood One
> RNoel@westwoodone.com
> 

Can you build from the command  line?  Who knows what eclipse does under the covers 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Rick Noel <RN...@westwoodone.com.INVALID>.
I built  my app in Eclipse  and the build path is set to use the migrated jar.
It compiles without error on Eclipse and using the migrated jar.  I have that same migrated jar in the Tomcat lib
But when tomcat 10 compiles it does not compile

I have also used the migration tool on my .war that runs in Tomcat 9 and that war still fails with same compile error.

So to summarize......... the migration tool fails to convert third party jar xmlrpc-server3.1.3.jar
And it also fails when I use it on my .war ran through the migration tool.


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

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

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

On 08/02/2024 14:38, Rick Noel wrote:
> My code uses no javax.server  code other that what is in the third party jar.

Then you need to fix your build system that is compiling your code against the original xmlrpc-server3.1.3.jar rather than the migrated version.

> Is it not the third part jar that needs to stop using javax.server ?

No. It is the compiled form of your code that has the issue.

When you compile your class it retains a reference to the version of org.apache.xmlrpc.webserver.XmlRpcServlet that it was compiled against.
You can't just swap the xmlrpc-server3.1.3.jar at runtime. You have to use the migrated JAR at compile time as well.

Mark


>
> Where in my code does it use javax.server, other than from classes in package org.apache.xmlrpc?
>
> package com.radiovoodoo.xmlrpc;
>
> import java.io.IOException;
> import java.net.MalformedURLException; import java.net.URL;
>
> import org.apache.xmlrpc.XmlRpcException;
> import org.apache.xmlrpc.XmlRpcRequest; import 
> org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.Authenticati
> onHandler; import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
> import org.apache.xmlrpc.server.PropertyHandlerMapping;
> import org.apache.xmlrpc.webserver.XmlRpcServlet;
>
> import com.radiovoodoo.util.Log;
>
> /**
>   * @(#)RVXmlRpcServlet.java
>   *
>   * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
>   *
>   * @author  Hank Zill <hz...@radiovoodoo.com>
>   * @version 1.0
>   *
>   * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
>   */
>
> public class RVXmlRpcServlet
>     extends XmlRpcServlet
> {
>     /**
>      *  this init parameter defines the path to the property file from
>      *  which to load the XML RPC handler mappings.
>      *
>      *  the path is relative to the CLASSPATH
>      */
>     public static final String RESOURCE_PATH = "property-file-path";
>
>     protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
>        throws XmlRpcException
>     {
>        PropertyHandlerMapping mapping = null;
>
>        /* String resourcePath = getInitParameter( RESOURCE_PATH );
>
>        if ( resourcePath == null )
>        {
>           throw new XmlRpcException( "No property file defined.  This servlet must have the init-param " + RESOURCE_PATH + " set." );
>        } */
>        String resourcePath = "/WEB-INF/somefile";
>
>        URL url = null;
>         try {
>               url = getServletContext().getResource( resourcePath );
>         } catch (MalformedURLException e1) {
>               throw new XmlRpcException( resourcePath + " " + e1 );
>         }
>
>        if (url == null)
>        {
>           throw new XmlRpcException("Failed to locate resource " + resourcePath );
>        }
>        try
>        {
>           mapping = newPropertyHandlerMapping(url);
>        }
>        catch (IOException e)
>        {
>           throw new XmlRpcException("Failed to load resource " + url + ": " + e.getMessage(), e);
>        }
>
>        if ( mapping == null )
>           Log.debug( "HandlerMapping is null" );
>        else
>        {
>           String[] methods = mapping.getListMethods();
>
>           for ( int x = 0; x < methods.length; x++ )
>           {
>              Log.debug( "method: " + methods[x] );
>           }
>        }
>
>        mapping.setAuthenticationHandler(new AuthenticationHandler() {
>          //rick removed override annotaion so this class will compile on java 1.5
>               //@Override
>               public boolean isAuthorized(XmlRpcRequest arg0) throws XmlRpcException {
>                       return true;
>               }
>        });
>
>        return mapping;
>     }
> }
> Rick Noel
> Systems Programmer | Westwood One
> RNoel@westwoodone.com
>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Thursday, February 8, 2024 9:27 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure
>
> [You don't often get email from markt@apache.org. Learn why this is 
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 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
>> RNoel@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 markt@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
>>> RNoel@westwoodone.com
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


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


Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Mark Thomas <ma...@apache.org>.
On 08/02/2024 14:38, Rick Noel wrote:
> My code uses no javax.server  code other that what is in the third party jar.

Then you need to fix your build system that is compiling your code 
against the original xmlrpc-server3.1.3.jar rather than the migrated 
version.

> Is it not the third part jar that needs to stop using javax.server ?

No. It is the compiled form of your code that has the issue.

When you compile your class it retains a reference to the version of 
org.apache.xmlrpc.webserver.XmlRpcServlet that it was compiled against. 
You can't just swap the xmlrpc-server3.1.3.jar at runtime. You have to 
use the migrated JAR at compile time as well.

Mark


> 
> Where in my code does it use javax.server, other than from classes in package org.apache.xmlrpc?
> 
> package com.radiovoodoo.xmlrpc;
> 
> import java.io.IOException;
> import java.net.MalformedURLException;
> import java.net.URL;
> 
> import org.apache.xmlrpc.XmlRpcException;
> import org.apache.xmlrpc.XmlRpcRequest;
> import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler;
> import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
> import org.apache.xmlrpc.server.PropertyHandlerMapping;
> import org.apache.xmlrpc.webserver.XmlRpcServlet;
> 
> import com.radiovoodoo.util.Log;
> 
> /**
>   * @(#)RVXmlRpcServlet.java
>   *
>   * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
>   *
>   * @author  Hank Zill <hz...@radiovoodoo.com>
>   * @version 1.0
>   *
>   * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
>   */
> 
> public class RVXmlRpcServlet
>     extends XmlRpcServlet
> {
>     /**
>      *  this init parameter defines the path to the property file from
>      *  which to load the XML RPC handler mappings.
>      *
>      *  the path is relative to the CLASSPATH
>      */
>     public static final String RESOURCE_PATH = "property-file-path";
> 
>     protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
>        throws XmlRpcException
>     {
>        PropertyHandlerMapping mapping = null;
> 
>        /* String resourcePath = getInitParameter( RESOURCE_PATH );
>        
>        if ( resourcePath == null )
>        {
>           throw new XmlRpcException( "No property file defined.  This servlet must have the init-param " + RESOURCE_PATH + " set." );
>        } */
>        String resourcePath = "/WEB-INF/somefile";
> 
>        URL url = null;
>    	  try {
> 		url = getServletContext().getResource( resourcePath );
> 	  } catch (MalformedURLException e1) {
> 		throw new XmlRpcException( resourcePath + " " + e1 );
> 	  }
> 
>        if (url == null)
>        {
>           throw new XmlRpcException("Failed to locate resource " + resourcePath );
>        }
>        try
>        {
>           mapping = newPropertyHandlerMapping(url);
>        }
>        catch (IOException e)
>        {
>           throw new XmlRpcException("Failed to load resource " + url + ": " + e.getMessage(), e);
>        }
> 
>        if ( mapping == null )
>           Log.debug( "HandlerMapping is null" );
>        else
>        {
>           String[] methods = mapping.getListMethods();
> 
>           for ( int x = 0; x < methods.length; x++ )
>           {
>              Log.debug( "method: " + methods[x] );
>           }
>        }
>        
>        mapping.setAuthenticationHandler(new AuthenticationHandler() {
>          //rick removed override annotaion so this class will compile on java 1.5
> 		//@Override
> 		public boolean isAuthorized(XmlRpcRequest arg0) throws XmlRpcException {
> 			return true;
> 		}
>        });
> 
>        return mapping;
>     }
> }
> Rick Noel
> Systems Programmer | Westwood One
> RNoel@westwoodone.com
> 
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Thursday, February 8, 2024 9:27 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure
> 
> [You don't often get email from markt@apache.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> 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
>> RNoel@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 markt@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
>>> RNoel@westwoodone.com
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

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


RE: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Rick Noel <RN...@westwoodone.com.INVALID>.
My code uses no javax.server  code other that what is in the third party jar.
Is it not the third part jar that needs to stop using javax.server ? 

Where in my code does it use javax.server, other than from classes in package org.apache.xmlrpc?

package com.radiovoodoo.xmlrpc;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.XmlRpcRequest;
import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.AuthenticationHandler;
import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
import org.apache.xmlrpc.server.PropertyHandlerMapping;
import org.apache.xmlrpc.webserver.XmlRpcServlet;

import com.radiovoodoo.util.Log;

/**
 * @(#)RVXmlRpcServlet.java
 *
 * new XmlRpcServlet, which extends the default Apache XmlRpcServlet
 *
 * @author  Hank Zill <hz...@radiovoodoo.com>
 * @version 1.0
 *
 * Copyright(c) 2005 RadioVoodoo, Inc. All Rights Reserved.
 */

public class RVXmlRpcServlet
   extends XmlRpcServlet
{
   /**
    *  this init parameter defines the path to the property file from
    *  which to load the XML RPC handler mappings.
    *
    *  the path is relative to the CLASSPATH  
    */
   public static final String RESOURCE_PATH = "property-file-path";

   protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() 
      throws XmlRpcException
   {
      PropertyHandlerMapping mapping = null;

      /* String resourcePath = getInitParameter( RESOURCE_PATH );
      
      if ( resourcePath == null )
      {
         throw new XmlRpcException( "No property file defined.  This servlet must have the init-param " + RESOURCE_PATH + " set." );
      } */
      String resourcePath = "/WEB-INF/somefile";

      URL url = null;
  	  try {
		url = getServletContext().getResource( resourcePath );
	  } catch (MalformedURLException e1) {
		throw new XmlRpcException( resourcePath + " " + e1 );
	  }

      if (url == null) 
      {
         throw new XmlRpcException("Failed to locate resource " + resourcePath );
      }
      try 
      {
         mapping = newPropertyHandlerMapping(url);
      } 
      catch (IOException e) 
      {
         throw new XmlRpcException("Failed to load resource " + url + ": " + e.getMessage(), e);
      }

      if ( mapping == null )
         Log.debug( "HandlerMapping is null" );
      else
      {
         String[] methods = mapping.getListMethods();

         for ( int x = 0; x < methods.length; x++ )
         {
            Log.debug( "method: " + methods[x] );
         }
      }
      
      mapping.setAuthenticationHandler(new AuthenticationHandler() {
        //rick removed override annotaion so this class will compile on java 1.5
		//@Override
		public boolean isAuthorized(XmlRpcRequest arg0) throws XmlRpcException {
			return true;
		}
      });

      return mapping;
   }
}
Rick Noel
Systems Programmer | Westwood One
RNoel@westwoodone.com

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

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

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
> RNoel@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 markt@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
>> RNoel@westwoodone.com
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


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


Re: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Mark Thomas <ma...@apache.org>.
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
> RNoel@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 markt@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
>> RNoel@westwoodone.com
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

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


RE: [EXT]Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Rick Noel <RN...@westwoodone.com.INVALID>.
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........

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
RNoel@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 markt@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
> RNoel@westwoodone.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jakartaee-migration-1.0.7 migration tool failure

Posted by Mark Thomas <ma...@apache.org>.
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
> RNoel@westwoodone.com
> 
> 

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