TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

Ravi Kumar-2
Dear Tomcat Team,

We are upgrading the tomcat web server getting used in our web application.
Currently we are using tomcat 7 and now migrating to TOMCAT 9.0.43.
We have an existing  HTTPS based application created using tomcat 7.
Now after migration and upgrading to tomcat 9, while starting this same
https application, we are receiving the error message as mentioned below

*SEVERE: Failed to initialize component
[Connector[HTTP/1.1-8443]]java.lang.NoClassDefFoundError:
org/apache/tomcat/util/net/ServerSocketFactory*

 It seems that org.apache.tomcat.util.net.*ServerSocketFaactory *class has
been removed since tomcat 8.5.53 and in Tomcat 9 also.

Requesting for the helpful suggestion to make our existing application
working with Tomcat 9 and to resolve this error.
Please let me know if more information is required.

Regards,
Ravi
Reply | Threaded
Open this post in threaded view
|

Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

Christopher Schultz-2
Ravi,

Please don't email list members directly. I'm happy to offer paid
support if you want to email me directly.

On 2/23/21 05:11, Ravi Kumar wrote:

> We are upgrading the tomcat web server getting used in our web
> application. Currently we are using tomcat 7 and now migrating to TOMCAT
> 9.0.43.
> We have an existing  HTTPS based application created using tomcat 7.
> Now after migration and upgrading to tomcat 9, while starting this same
> https application, we are receiving the error message as mentioned below
> *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> java.lang.NoClassDefFoundError:
> org/apache/tomcat/util/net/ServerSocketFactory*
> *
> *
>   It seems that org.apache.tomcat.util.net
> <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> been removed since tomcat 8.5.53 and in Tomcat 9 also.

Correct.

> Requesting for the helpful suggestion to make our existing application
> working with Tomcat 9 and to resolve this error.
> Please let me know if more information is required.

What do you need this class for? Tomcat's socket handling has been
refactored between 7.x and 8.x and that class was no longer necessary.

If your code uses that class directly, you will have to find another way
to accomplish what you are doing.

So... what are you trying to do?

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

Ravi Kumar-2
Using this Interface , trying to obtain the object of type
ServerSocketFactory in my application.
Could you please point towards any other viable alternative ?

@Override
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
    public ServerSocketFactory
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html>
getServerSocketFactory(AbstractEndpoint abstractendpoint) {
        return new JSSESocketFactory(abstractendpoint);
    }

Thanks in Advance,
Regards,
Ravi

On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
[hidden email]> wrote:

> Ravi,
>
> Please don't email list members directly. I'm happy to offer paid
> support if you want to email me directly.
>
> On 2/23/21 05:11, Ravi Kumar wrote:
> > We are upgrading the tomcat web server getting used in our web
> > application. Currently we are using tomcat 7 and now migrating to TOMCAT
> > 9.0.43.
> > We have an existing  HTTPS based application created using tomcat 7.
> > Now after migration and upgrading to tomcat 9, while starting this same
> > https application, we are receiving the error message as mentioned below
> > *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> > java.lang.NoClassDefFoundError:
> > org/apache/tomcat/util/net/ServerSocketFactory*
> > *
> > *
> >   It seems that org.apache.tomcat.util.net
> > <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> > been removed since tomcat 8.5.53 and in Tomcat 9 also.
>
> Correct.
>
> > Requesting for the helpful suggestion to make our existing application
> > working with Tomcat 9 and to resolve this error.
> > Please let me know if more information is required.
>
> What do you need this class for? Tomcat's socket handling has been
> refactored between 7.x and 8.x and that class was no longer necessary.
>
> If your code uses that class directly, you will have to find another way
> to accomplish what you are doing.
>
> So... what are you trying to do?
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

Christopher Schultz-2
Ravi,

On 2/23/21 10:19, Ravi Kumar wrote:

> Using this Interface , trying to obtain the object of type
> ServerSocketFactory in my application.
> Could you please point towards any other viable alternative ?
>
> @Override
> <http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
>      public ServerSocketFactory
> <http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html>
> getServerSocketFactory(AbstractEndpoint abstractendpoint) {
>          return new JSSESocketFactory(abstractendpoint);
>      }

No, that's "how you are doing it". Nobody just wants to get a reference
to a ServerSocketFactory object because it looks pretty. What are you
actually trying to accomplish?

(e.g. log the TLS protocol, customize the cipher suites, etc.)

-chris

> On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
> [hidden email]> wrote:
>
>> Ravi,
>>
>> Please don't email list members directly. I'm happy to offer paid
>> support if you want to email me directly.
>>
>> On 2/23/21 05:11, Ravi Kumar wrote:
>>> We are upgrading the tomcat web server getting used in our web
>>> application. Currently we are using tomcat 7 and now migrating to TOMCAT
>>> 9.0.43.
>>> We have an existing  HTTPS based application created using tomcat 7.
>>> Now after migration and upgrading to tomcat 9, while starting this same
>>> https application, we are receiving the error message as mentioned below
>>> *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
>>> java.lang.NoClassDefFoundError:
>>> org/apache/tomcat/util/net/ServerSocketFactory*
>>> *
>>> *
>>>    It seems that org.apache.tomcat.util.net
>>> <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
>>> been removed since tomcat 8.5.53 and in Tomcat 9 also.
>>
>> Correct.
>>
>>> Requesting for the helpful suggestion to make our existing application
>>> working with Tomcat 9 and to resolve this error.
>>> Please let me know if more information is required.
>>
>> What do you need this class for? Tomcat's socket handling has been
>> refactored between 7.x and 8.x and that class was no longer necessary.
>>
>> If your code uses that class directly, you will have to find another way
>> to accomplish what you are doing.
>>
>> So... what are you trying to do?
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

remm
On Tue, Feb 23, 2021 at 4:47 PM Christopher Schultz <
[hidden email]> wrote:

> Ravi,
>
> On 2/23/21 10:19, Ravi Kumar wrote:
> > Using this Interface , trying to obtain the object of type
> > ServerSocketFactory in my application.
> > Could you please point towards any other viable alternative ?
> >
> > @Override
> > <http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
> >      public ServerSocketFactory
> > <
> http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html
> >
> > getServerSocketFactory(AbstractEndpoint abstractendpoint) {
> >          return new JSSESocketFactory(abstractendpoint);
> >      }
>
> No, that's "how you are doing it". Nobody just wants to get a reference
> to a ServerSocketFactory object because it looks pretty. What are you
> actually trying to accomplish?
>
> (e.g. log the TLS protocol, customize the cipher suites, etc.)
>

I know people who extended this to add features. The problem is that this
had to go following the removal of java.io in Tomcat, and now the SSLEngine
has to be used instead [compatible with NIO and NIO2]. But it's a huge
change.

Rémy


>
> -chris
>
> > On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
> > [hidden email]> wrote:
> >
> >> Ravi,
> >>
> >> Please don't email list members directly. I'm happy to offer paid
> >> support if you want to email me directly.
> >>
> >> On 2/23/21 05:11, Ravi Kumar wrote:
> >>> We are upgrading the tomcat web server getting used in our web
> >>> application. Currently we are using tomcat 7 and now migrating to
> TOMCAT
> >>> 9.0.43.
> >>> We have an existing  HTTPS based application created using tomcat 7.
> >>> Now after migration and upgrading to tomcat 9, while starting this same
> >>> https application, we are receiving the error message as mentioned
> below
> >>> *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> >>> java.lang.NoClassDefFoundError:
> >>> org/apache/tomcat/util/net/ServerSocketFactory*
> >>> *
> >>> *
> >>>    It seems that org.apache.tomcat.util.net
> >>> <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> >>> been removed since tomcat 8.5.53 and in Tomcat 9 also.
> >>
> >> Correct.
> >>
> >>> Requesting for the helpful suggestion to make our existing application
> >>> working with Tomcat 9 and to resolve this error.
> >>> Please let me know if more information is required.
> >>
> >> What do you need this class for? Tomcat's socket handling has been
> >> refactored between 7.x and 8.x and that class was no longer necessary.
> >>
> >> If your code uses that class directly, you will have to find another way
> >> to accomplish what you are doing.
> >>
> >> So... what are you trying to do?
> >>
> >> -chris
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>