Re: Unable to start application

2023-03-18 Thread Kevin Huntly
I can't use tomcat 10 because of the switch to jakarta for the servlet
container - I'd have to rewrite a lot of code. That being said, I got it
fixed:

All JDBC and JNDI lookups were prefixed with "java:comp/env/" and things
worked. Clearly, IBM's WebSphere does this for you, since that's primarily
what I develop against...


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Sat, Mar 18, 2023 at 6:31 PM John Dale (DB2DOM) 
wrote:

> Here's what I use for development:
>
> apache-tomcat-10.0.6
>
> java --version
> openjdk 11.0.9.1 2020-11-04
> OpenJDK Runtime Environment (build 11.0.9.1+1-post-Raspbian-1deb10u2)
> OpenJDK Server VM (build 11.0.9.1+1-post-Raspbian-1deb10u2, mixed mode)
>
> I have tremendous success running this combination.
>
> For production ..
>
> Raspbian flows through to ubuntu/debian with practically no issues
> except Pi has a problem with ipchainining and NAT.
>
> Start firing away to jcdw...@gmail.com with questions regarding MySQL.
>
> I'll do what I can.
>
> John
>
>
> On 3/18/23, Kevin Huntly  wrote:
> > Hey Everyone,
> >
> > Is this possibly happening because I'm using JDK19 and not 8 or 9?
> > 
> >
> > Kevin Huntly
> > Email: kmhun...@gmail.com
> > Cell: 716/424-3311
> > 
> >
> > -BEGIN GEEK CODE BLOCK-
> > Version: 1.0
> > GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > G++ e(+) h--- r+++ y+++*
> > --END GEEK CODE BLOCK--
> >
> >
> > On Sat, Mar 18, 2023 at 5:10 PM Kevin Huntly  wrote:
> >
> >> Hey John - if you're out there can you email me direct? I have a MySQL
> >> admin question if you have the time and the inclination
> >> 
> >>
> >> Kevin Huntly
> >> Email: kmhun...@gmail.com
> >> Cell: 716/424-3311
> >> 
> >>
> >> -BEGIN GEEK CODE BLOCK-
> >> Version: 1.0
> >> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> >> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> >> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> >> G++ e(+) h--- r+++ y+++*
> >> --END GEEK CODE BLOCK--
> >>
> >>
> >> On Sat, Mar 18, 2023 at 1:40 PM Kevin Huntly 
> wrote:
> >>
> >>> any other ideas guys? I want to migrate a bunch of really awful apps
> off
> >>> our primary application server so they don't cause us headaches
> anymore.
> >>> if
> >>> I can't get one app working I have no hope of getting others to work
> lol
> >>>
> >>> On Sat, Mar 18, 2023, 09:16 John Dale (DB2DOM) 
> >>> wrote:
> >>>
>  Thanks Mark - are statics reloaded now, too?
> 
>  I touch web.xml and it's reloaded successfully hundreds of times.
> 
>  But I don't use war files so I can use git to version and transfer my
>  builds ... maybe that's the reason?
> 
>  John
> 
> 
>  On 3/18/23, Mark Thomas  wrote:
>  > On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
>  >> ok - "mnet" should be "ment"
>  >
>  >  From the logs excerpt I saw earlier in the thread, that needs
> fixing
>  > (although it was only a test element). I don't think it will break
>  > anything else but better to remove the noise from the logs.
>  >
>  >> I figured I'd spell that out and behave like a compiler.  :)
>  >>
>  >> I would also move that configuration into server.xml (it's a major
>  >> difference between your configuration and mine).
>  >
>  > That configuration style is NOT recommended. It means you have no
>  choice
>  > but to restart Tomcat if you change the Context configuration. If it
>  > is
>  > in a separate Context file, Tomcat will reload the web application
>  > automatically if you change the Context file.
>  >
>  > Stick with:
>  >
> 
> /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml
>  >
>  > Do NOT specify a path attribute for the Context. It will be ignored.
>  >
>  > Where is the JDBC driver located? It needs to be in
>  ${CATALINA_BASE}/lib
>  > and not part of the WAR.
>  >
>  > Can we see the full logs from a clean start-up please?
>  >
>  > Mark
>  >
>  >
>  >>
>  >> Lastly, maybe to help debug a future issue, did you compile your
>  >> project files against the tomcat libs included with your
>  >> distribution,
>  >> or did you drop them into this version of tomcat from another
>  >> version?
>  >>   Probably won't matter since you should be coded to the
> interfaces,

Re: Unable to start application

2023-03-18 Thread John Dale (DB2DOM)
Here's what I use for development:

apache-tomcat-10.0.6

java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Raspbian-1deb10u2)
OpenJDK Server VM (build 11.0.9.1+1-post-Raspbian-1deb10u2, mixed mode)

I have tremendous success running this combination.

For production ..

Raspbian flows through to ubuntu/debian with practically no issues
except Pi has a problem with ipchainining and NAT.

Start firing away to jcdw...@gmail.com with questions regarding MySQL.

I'll do what I can.

John


On 3/18/23, Kevin Huntly  wrote:
> Hey Everyone,
>
> Is this possibly happening because I'm using JDK19 and not 8 or 9?
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Sat, Mar 18, 2023 at 5:10 PM Kevin Huntly  wrote:
>
>> Hey John - if you're out there can you email me direct? I have a MySQL
>> admin question if you have the time and the inclination
>> 
>>
>> Kevin Huntly
>> Email: kmhun...@gmail.com
>> Cell: 716/424-3311
>> 
>>
>> -BEGIN GEEK CODE BLOCK-
>> Version: 1.0
>> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
>> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
>> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
>> G++ e(+) h--- r+++ y+++*
>> --END GEEK CODE BLOCK--
>>
>>
>> On Sat, Mar 18, 2023 at 1:40 PM Kevin Huntly  wrote:
>>
>>> any other ideas guys? I want to migrate a bunch of really awful apps off
>>> our primary application server so they don't cause us headaches anymore.
>>> if
>>> I can't get one app working I have no hope of getting others to work lol
>>>
>>> On Sat, Mar 18, 2023, 09:16 John Dale (DB2DOM) 
>>> wrote:
>>>
 Thanks Mark - are statics reloaded now, too?

 I touch web.xml and it's reloaded successfully hundreds of times.

 But I don't use war files so I can use git to version and transfer my
 builds ... maybe that's the reason?

 John


 On 3/18/23, Mark Thomas  wrote:
 > On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
 >> ok - "mnet" should be "ment"
 >
 >  From the logs excerpt I saw earlier in the thread, that needs fixing
 > (although it was only a test element). I don't think it will break
 > anything else but better to remove the noise from the logs.
 >
 >> I figured I'd spell that out and behave like a compiler.  :)
 >>
 >> I would also move that configuration into server.xml (it's a major
 >> difference between your configuration and mine).
 >
 > That configuration style is NOT recommended. It means you have no
 choice
 > but to restart Tomcat if you change the Context configuration. If it
 > is
 > in a separate Context file, Tomcat will reload the web application
 > automatically if you change the Context file.
 >
 > Stick with:
 >
 /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml
 >
 > Do NOT specify a path attribute for the Context. It will be ignored.
 >
 > Where is the JDBC driver located? It needs to be in
 ${CATALINA_BASE}/lib
 > and not part of the WAR.
 >
 > Can we see the full logs from a clean start-up please?
 >
 > Mark
 >
 >
 >>
 >> Lastly, maybe to help debug a future issue, did you compile your
 >> project files against the tomcat libs included with your
 >> distribution,
 >> or did you drop them into this version of tomcat from another
 >> version?
 >>   Probably won't matter since you should be coded to the interfaces,
 >> but one never knows.
 >>
 >> John
 >>
 >> On 3/17/23, Kevin Huntly  wrote:
 >>> no I think it has something to do with it but I'm not sure. I'll
 >>> try
 >>> taking
 >>> out the environment values and see what happens
 >>>
 >>> On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 
 >>> wrote:
 >>>
  In the log you sent below, I see a typo:
  Context/Environmnet
 
  Does that have something to do with it, or is this a typo in
  tomcat
  logging?
 
 
 
 
  On 3/17/23, Kevin Huntly  wrote:
 > yes, under Catalina/localhost
 >
 > On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM)
 > 
  wrote:
 >
 >> Are you modifying a context.xml file in the conf folder?
 >>
 >> On 3/17/23, Kevin Huntly  wrote:
 >>> Also of note:
 >>>
 >>> 17-Mar-2023 17:25:42.113 INFO [main]
 >>> org.apache.catalina.

Re: SSL issue

2023-03-18 Thread John Dale (DB2DOM)
Noted - excellent!

On 3/18/23, Kevin Huntly  wrote:
> I was able to read the keystore with both openssl and keytool, but for some
> reason the private key within the pkcs#12 file had a different password
> than the keystone password. I ended up just rebuilding the cert and the
> keystore, and it's working now. Thanks !
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Sat, Mar 18, 2023 at 3:27 PM Thomas Hoffmann (Speed4Trade GmbH)
>  wrote:
>
>> Hello,
>>
>> the relevant error is:
>> Caused by: javax.crypto.BadPaddingException: Given final block not
>> properly padded. Such issues can arise if a bad key is used during
>> decryption.
>>
>> It seems there is something wrong with your keystore.
>> Are both, private and public key in the p12 file?
>> Can you check the contents with keytool?
>> Alternatively, you can also use pem files, they are more readable than
>> p12.
>>
>> Greetings, Thomas
>>
>> > -Ursprüngliche Nachricht-
>> > Von: Kevin Huntly 
>> > Gesendet: Samstag, 18. März 2023 19:15
>> > An: users@tomcat.apache.org
>> > Betreff: SSL issue
>> >
>> > Hello Everyone,
>> >
>> > I'm having an issue with my SSL connector:
>> >
>> > 
>> > 18-Mar-2023 14:12:46.996 SEVERE [main]
>> > org.apache.catalina.util.LifecycleBase.handleSubClassException Failed
>> > to
>> > initialize component
>> [Connector[org.apache.coyote.http11.Http11Nio2Protocol-
>> > 8443]]
>> > org.apache.catalina.LifecycleException: Protocol handler
>> initialization
>> > failed
>> > at
>> > org.apache.catalina.connector.Connector.initInternal(Connector.java:1014)
>> > at
>> > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
>> > at
>> >
>> org.apache.catalina.core.StandardService.initInternal(StandardService.java:549
>> > )
>> > at
>> > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
>> > at
>> >
>> org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1032)
>> > at
>> > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
>> > at
>> > org.apache.catalina.startup.Catalina.load(Catalina.java:724)
>> > at
>> > org.apache.catalina.startup.Catalina.load(Catalina.java:746)
>> > at
>> >
>> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMeth
>> > odHandleAccessor.java:104)
>> > at
>> > java.base/java.lang.reflect.Method.invoke(Method.java:578)
>> > at
>> > org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
>> > at
>> > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
>> > Caused by: java.lang.IllegalArgumentException: Get Key failed:
>> > Given final block not properly padded. Such issues can arise if a bad
>> key is used
>> > during decryption.
>> > at
>> > org.apache.tomcat.util.net
>> .AbstractJsseEndpoint.createSSLContext(AbstractJsse
>> > Endpoint.java:107)
>> > at
>> > org.apache.tomcat.util.net
>> .AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoi
>> > nt.java:71)
>> > at
>> > org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:146)
>> > at
>> > org.apache.tomcat.util.net
>> .AbstractEndpoint.bindWithCleanup(AbstractEndpoin
>> > t.java:1302)
>> > at
>> > org.apache.tomcat.util.net
>> .AbstractEndpoint.init(AbstractEndpoint.java:1315)
>> > at
>> > org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:652)
>> > at
>> >
>> org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.j
>> > ava:75)
>> > at
>> > org.apache.catalina.connector.Connector.initInternal(Connector.java:1012)
>> > ... 11 more
>> > Caused by: java.security.UnrecoverableKeyException: Get Key
>> failed:
>> > Given final block not properly padded. Such issues can arise if a bad
>> key is used
>> > during decryption.
>> > at
>> >
>> java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.j
>> > ava:454)
>> > at
>> >
>> java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator
>> > .java:91)
>> > at
>> > java.base/java.security.KeyStore.getKey(KeyStore.java:1077)
>> > at
>> > org.apache.tomcat.util.net
>> .SSLUtilBase.getKeyManagers(SSLUtilBase.java:353)
>> > at
>> > org.apache.tomcat.util.net
>> .SSLUtilBase.createSSLContext(SSLUtilBase.java:246)
>> > at
>> >

Re: SSL issue

2023-03-18 Thread John Dale (DB2DOM)
What kind of key are you using?

I generate my certs with certbot.

The result needs to be converted thusly to be used:
openssl pkcs12 -export -out mykey-bundle.pfx -inkey myprivkey.pem -in
cert.pem -certfile chain.pem -password
pass:superdupersecretnoteventhealiensknow

Is this a possible source of the issue?


On 3/18/23, Kevin Huntly  wrote:
> Hello Everyone,
>
> I'm having an issue with my SSL connector:
>
> 
> 18-Mar-2023 14:12:46.996 SEVERE [main]
> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
> initialize component
> [Connector[org.apache.coyote.http11.Http11Nio2Protocol-8443]]
> org.apache.catalina.LifecycleException: Protocol handler
> initialization failed
> at
> org.apache.catalina.connector.Connector.initInternal(Connector.java:1014)
> at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> at
> org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
> at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> at
> org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1032)
> at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> at
> org.apache.catalina.startup.Catalina.load(Catalina.java:724)
> at
> org.apache.catalina.startup.Catalina.load(Catalina.java:746)
> at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
> at
> java.base/java.lang.reflect.Method.invoke(Method.java:578)
> at
> org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
> Caused by: java.lang.IllegalArgumentException: Get Key failed:
> Given final block not properly padded. Such issues can arise if a bad key
> is used during decryption.
> at
> org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:107)
> at
> org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
> at
> org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:146)
> at
> org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1302)
> at
> org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1315)
> at
> org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:652)
> at
> org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:75)
> at
> org.apache.catalina.connector.Connector.initInternal(Connector.java:1012)
> ... 11 more
> Caused by: java.security.UnrecoverableKeyException: Get Key failed:
> Given final block not properly padded. Such issues can arise if a bad key
> is used during decryption.
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:454)
> at
> java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:91)
> at
> java.base/java.security.KeyStore.getKey(KeyStore.java:1077)
> at
> org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:353)
> at
> org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246)
> at
> org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:105)
> ... 18 more
> Caused by: javax.crypto.BadPaddingException: Given final block not
> properly padded. Such issues can arise if a bad key is used during
> decryption.
> at
> java.base/com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:861)
> at
> java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:941)
> at
> java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:734)
> at
> java.base/com.sun.crypto.provider.PBES2Core.engineDoFinal(PBES2Core.java:310)
> at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2207)
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore.lambda$engineGetKey$0(PKCS12KeyStore.java:370)
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore$RetryWithZero.run(PKCS12KeyStore.java:257)
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:361)
> ... 23 more
> 
>
> And my SSL config:
>
> 
>  protocol="org.apache.coyote.http11.Http11Nio2Protocol"
> sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"
> address="0.0.0.0" port="8443" maxHttpHeaderSize="8192"
> maxThreads="150" minSpareThreads="25" enableLookups="f

Re: Unable to start application

2023-03-18 Thread Kevin Huntly
Hey Everyone,

Is this possibly happening because I'm using JDK19 and not 8 or 9?


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Sat, Mar 18, 2023 at 5:10 PM Kevin Huntly  wrote:

> Hey John - if you're out there can you email me direct? I have a MySQL
> admin question if you have the time and the inclination
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Sat, Mar 18, 2023 at 1:40 PM Kevin Huntly  wrote:
>
>> any other ideas guys? I want to migrate a bunch of really awful apps off
>> our primary application server so they don't cause us headaches anymore. if
>> I can't get one app working I have no hope of getting others to work lol
>>
>> On Sat, Mar 18, 2023, 09:16 John Dale (DB2DOM)  wrote:
>>
>>> Thanks Mark - are statics reloaded now, too?
>>>
>>> I touch web.xml and it's reloaded successfully hundreds of times.
>>>
>>> But I don't use war files so I can use git to version and transfer my
>>> builds ... maybe that's the reason?
>>>
>>> John
>>>
>>>
>>> On 3/18/23, Mark Thomas  wrote:
>>> > On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
>>> >> ok - "mnet" should be "ment"
>>> >
>>> >  From the logs excerpt I saw earlier in the thread, that needs fixing
>>> > (although it was only a test element). I don't think it will break
>>> > anything else but better to remove the noise from the logs.
>>> >
>>> >> I figured I'd spell that out and behave like a compiler.  :)
>>> >>
>>> >> I would also move that configuration into server.xml (it's a major
>>> >> difference between your configuration and mine).
>>> >
>>> > That configuration style is NOT recommended. It means you have no
>>> choice
>>> > but to restart Tomcat if you change the Context configuration. If it is
>>> > in a separate Context file, Tomcat will reload the web application
>>> > automatically if you change the Context file.
>>> >
>>> > Stick with:
>>> >
>>> /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml
>>> >
>>> > Do NOT specify a path attribute for the Context. It will be ignored.
>>> >
>>> > Where is the JDBC driver located? It needs to be in
>>> ${CATALINA_BASE}/lib
>>> > and not part of the WAR.
>>> >
>>> > Can we see the full logs from a clean start-up please?
>>> >
>>> > Mark
>>> >
>>> >
>>> >>
>>> >> Lastly, maybe to help debug a future issue, did you compile your
>>> >> project files against the tomcat libs included with your distribution,
>>> >> or did you drop them into this version of tomcat from another version?
>>> >>   Probably won't matter since you should be coded to the interfaces,
>>> >> but one never knows.
>>> >>
>>> >> John
>>> >>
>>> >> On 3/17/23, Kevin Huntly  wrote:
>>> >>> no I think it has something to do with it but I'm not sure. I'll try
>>> >>> taking
>>> >>> out the environment values and see what happens
>>> >>>
>>> >>> On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 
>>> >>> wrote:
>>> >>>
>>>  In the log you sent below, I see a typo:
>>>  Context/Environmnet
>>> 
>>>  Does that have something to do with it, or is this a typo in tomcat
>>>  logging?
>>> 
>>> 
>>> 
>>> 
>>>  On 3/17/23, Kevin Huntly  wrote:
>>> > yes, under Catalina/localhost
>>> >
>>> > On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM) 
>>>  wrote:
>>> >
>>> >> Are you modifying a context.xml file in the conf folder?
>>> >>
>>> >> On 3/17/23, Kevin Huntly  wrote:
>>> >>> Also of note:
>>> >>>
>>> >>> 17-Mar-2023 17:25:42.113 INFO [main]
>>> >>> org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
>>> >>> deployment descriptor
>>> >>>
>>> >>
>>> 
>>> [/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml]
>>> >>> 17-Mar-2023 17:25:42.174 WARNING [main]
>>> >>> org.apache.tomcat.util.digester.Digester.endElement No rules
>>> found
>>> >> matching
>>> >>> [Context/Environmnet]
>>> >>> 
>>> >>>
>>> >>> Kevin Huntly
>>> >>> Email: kmhun...@gmail.com
>>> >>> Cell: 716/424-3311
>>> >>> 
>>> >>>
>>> >>> -BEGIN GEEK CODE BLOCK-
>>> >>> Version: 1.0
>>> >>> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
>>> >>> W+++ N+ o K(+

AW: SSL issue

2023-03-18 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello Kevin,

That's why I also suggest to use PEM format.
You don’t have to deal with two passwords and the files can be open in a normal 
editor.
Copy & paste also works easily in PEM format.

Glad it works now.
Greetings, Thomas

> -Ursprüngliche Nachricht-
> Von: Kevin Huntly 
> Gesendet: Samstag, 18. März 2023 20:30
> An: Tomcat Users List 
> Betreff: Re: SSL issue
> 
> I was able to read the keystore with both openssl and keytool, but for some
> reason the private key within the pkcs#12 file had a different password than 
> the
> keystone password. I ended up just rebuilding the cert and the keystore, and 
> it's
> working now. Thanks !
> 
> 
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
> 
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
> 
> 
> On Sat, Mar 18, 2023 at 3:27 PM Thomas Hoffmann (Speed4Trade GmbH)
>  wrote:
> 
> > Hello,
> >
> > the relevant error is:
> > Caused by: javax.crypto.BadPaddingException: Given final block not
> > properly padded. Such issues can arise if a bad key is used during
> > decryption.
> >
> > It seems there is something wrong with your keystore.
> > Are both, private and public key in the p12 file?
> > Can you check the contents with keytool?
> > Alternatively, you can also use pem files, they are more readable than p12.
> >
> > Greetings, Thomas
> >
> > > -Ursprüngliche Nachricht-
> > > Von: Kevin Huntly 
> > > Gesendet: Samstag, 18. März 2023 19:15
> > > An: users@tomcat.apache.org
> > > Betreff: SSL issue
> > >
> > > Hello Everyone,
> > >
> > > I'm having an issue with my SSL connector:
> > >
> > > 
> > > 18-Mar-2023 14:12:46.996 SEVERE [main]
> > > org.apache.catalina.util.LifecycleBase.handleSubClassException
> > > Failed to initialize component
> > [Connector[org.apache.coyote.http11.Http11Nio2Protocol-
> > > 8443]]
> > > org.apache.catalina.LifecycleException: Protocol handler
> > initialization
> > > failed
> > > at
> > > org.apache.catalina.connector.Connector.initInternal(Connector.java:1014)
> > > at
> > > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> > > at
> > >
> > org.apache.catalina.core.StandardService.initInternal(StandardService.
> > java:549
> > > )
> > > at
> > > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> > > at
> > >
> > org.apache.catalina.core.StandardServer.initInternal(StandardServer.ja
> > va:1032)
> > > at
> > > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> > > at
> > > org.apache.catalina.startup.Catalina.load(Catalina.java:724)
> > > at
> > > org.apache.catalina.startup.Catalina.load(Catalina.java:746)
> > > at
> > >
> > java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Direc
> > tMeth
> > > odHandleAccessor.java:104)
> > > at
> > > java.base/java.lang.reflect.Method.invoke(Method.java:578)
> > > at
> > > org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
> > > at
> > > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
> > > Caused by: java.lang.IllegalArgumentException: Get Key failed:
> > > Given final block not properly padded. Such issues can arise if a
> > > bad
> > key is used
> > > during decryption.
> > > at
> > > org.apache.tomcat.util.net
> > .AbstractJsseEndpoint.createSSLContext(AbstractJsse
> > > Endpoint.java:107)
> > > at
> > > org.apache.tomcat.util.net
> > .AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoi
> > > nt.java:71)
> > > at
> > > org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:146)
> > > at
> > > org.apache.tomcat.util.net
> > .AbstractEndpoint.bindWithCleanup(AbstractEndpoin
> > > t.java:1302)
> > > at
> > > org.apache.tomcat.util.net
> > .AbstractEndpoint.init(AbstractEndpoint.java:1315)
> > > at
> > > org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:652)
> > > at
> > >
> > org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Pro
> > tocol.j
> > > ava:75)
> > > at
> > > org.apache.catalina.connector.Connector.initInternal(Connector.java:1012)
> > > ... 11 more
> > > Caused by: java.security.UnrecoverableKeyException: Get Key
> > failed:
> > > Given final block not properly padded. Such issues can arise if a
> > > bad
> > key is used
> > > during decryption.
> > > at
> > >
> > java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeySto
> > re.j
> > 

Re: Unable to start application

2023-03-18 Thread Kevin Huntly
Hey John - if you're out there can you email me direct? I have a MySQL
admin question if you have the time and the inclination


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Sat, Mar 18, 2023 at 1:40 PM Kevin Huntly  wrote:

> any other ideas guys? I want to migrate a bunch of really awful apps off
> our primary application server so they don't cause us headaches anymore. if
> I can't get one app working I have no hope of getting others to work lol
>
> On Sat, Mar 18, 2023, 09:16 John Dale (DB2DOM)  wrote:
>
>> Thanks Mark - are statics reloaded now, too?
>>
>> I touch web.xml and it's reloaded successfully hundreds of times.
>>
>> But I don't use war files so I can use git to version and transfer my
>> builds ... maybe that's the reason?
>>
>> John
>>
>>
>> On 3/18/23, Mark Thomas  wrote:
>> > On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
>> >> ok - "mnet" should be "ment"
>> >
>> >  From the logs excerpt I saw earlier in the thread, that needs fixing
>> > (although it was only a test element). I don't think it will break
>> > anything else but better to remove the noise from the logs.
>> >
>> >> I figured I'd spell that out and behave like a compiler.  :)
>> >>
>> >> I would also move that configuration into server.xml (it's a major
>> >> difference between your configuration and mine).
>> >
>> > That configuration style is NOT recommended. It means you have no choice
>> > but to restart Tomcat if you change the Context configuration. If it is
>> > in a separate Context file, Tomcat will reload the web application
>> > automatically if you change the Context file.
>> >
>> > Stick with:
>> >
>> /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml
>> >
>> > Do NOT specify a path attribute for the Context. It will be ignored.
>> >
>> > Where is the JDBC driver located? It needs to be in ${CATALINA_BASE}/lib
>> > and not part of the WAR.
>> >
>> > Can we see the full logs from a clean start-up please?
>> >
>> > Mark
>> >
>> >
>> >>
>> >> Lastly, maybe to help debug a future issue, did you compile your
>> >> project files against the tomcat libs included with your distribution,
>> >> or did you drop them into this version of tomcat from another version?
>> >>   Probably won't matter since you should be coded to the interfaces,
>> >> but one never knows.
>> >>
>> >> John
>> >>
>> >> On 3/17/23, Kevin Huntly  wrote:
>> >>> no I think it has something to do with it but I'm not sure. I'll try
>> >>> taking
>> >>> out the environment values and see what happens
>> >>>
>> >>> On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 
>> >>> wrote:
>> >>>
>>  In the log you sent below, I see a typo:
>>  Context/Environmnet
>> 
>>  Does that have something to do with it, or is this a typo in tomcat
>>  logging?
>> 
>> 
>> 
>> 
>>  On 3/17/23, Kevin Huntly  wrote:
>> > yes, under Catalina/localhost
>> >
>> > On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM) 
>>  wrote:
>> >
>> >> Are you modifying a context.xml file in the conf folder?
>> >>
>> >> On 3/17/23, Kevin Huntly  wrote:
>> >>> Also of note:
>> >>>
>> >>> 17-Mar-2023 17:25:42.113 INFO [main]
>> >>> org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
>> >>> deployment descriptor
>> >>>
>> >>
>> 
>> [/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml]
>> >>> 17-Mar-2023 17:25:42.174 WARNING [main]
>> >>> org.apache.tomcat.util.digester.Digester.endElement No rules found
>> >> matching
>> >>> [Context/Environmnet]
>> >>> 
>> >>>
>> >>> Kevin Huntly
>> >>> Email: kmhun...@gmail.com
>> >>> Cell: 716/424-3311
>> >>> 
>> >>>
>> >>> -BEGIN GEEK CODE BLOCK-
>> >>> Version: 1.0
>> >>> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
>> >>> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
>> >>> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
>> >>> G++ e(+) h--- r+++ y+++*
>> >>> --END GEEK CODE BLOCK--
>> >>>
>> >>>
>> >>> On Fri, Mar 17, 2023 at 5:24 PM Kevin Huntly 
>> >>> wrote:
>> >>>
>>  Here's my santized server.xml and context.xml
>> 
>>  server.xml -> https://pastebin.com/Bj6Wh0qU
>>  context.xml -> https://pastebin.com/Z3dBf3eK
>> 
>> >>>
>> >>
>> >>
>> -
>> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> >> For additional commands, e-mai

Re: SSL issue

2023-03-18 Thread Kevin Huntly
I was able to read the keystore with both openssl and keytool, but for some
reason the private key within the pkcs#12 file had a different password
than the keystone password. I ended up just rebuilding the cert and the
keystore, and it's working now. Thanks !


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Sat, Mar 18, 2023 at 3:27 PM Thomas Hoffmann (Speed4Trade GmbH)
 wrote:

> Hello,
>
> the relevant error is:
> Caused by: javax.crypto.BadPaddingException: Given final block not
> properly padded. Such issues can arise if a bad key is used during
> decryption.
>
> It seems there is something wrong with your keystore.
> Are both, private and public key in the p12 file?
> Can you check the contents with keytool?
> Alternatively, you can also use pem files, they are more readable than p12.
>
> Greetings, Thomas
>
> > -Ursprüngliche Nachricht-
> > Von: Kevin Huntly 
> > Gesendet: Samstag, 18. März 2023 19:15
> > An: users@tomcat.apache.org
> > Betreff: SSL issue
> >
> > Hello Everyone,
> >
> > I'm having an issue with my SSL connector:
> >
> > 
> > 18-Mar-2023 14:12:46.996 SEVERE [main]
> > org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
> > initialize component
> [Connector[org.apache.coyote.http11.Http11Nio2Protocol-
> > 8443]]
> > org.apache.catalina.LifecycleException: Protocol handler
> initialization
> > failed
> > at
> > org.apache.catalina.connector.Connector.initInternal(Connector.java:1014)
> > at
> > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> > at
> >
> org.apache.catalina.core.StandardService.initInternal(StandardService.java:549
> > )
> > at
> > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> > at
> >
> org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1032)
> > at
> > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> > at
> > org.apache.catalina.startup.Catalina.load(Catalina.java:724)
> > at
> > org.apache.catalina.startup.Catalina.load(Catalina.java:746)
> > at
> >
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMeth
> > odHandleAccessor.java:104)
> > at
> > java.base/java.lang.reflect.Method.invoke(Method.java:578)
> > at
> > org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
> > at
> > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
> > Caused by: java.lang.IllegalArgumentException: Get Key failed:
> > Given final block not properly padded. Such issues can arise if a bad
> key is used
> > during decryption.
> > at
> > org.apache.tomcat.util.net
> .AbstractJsseEndpoint.createSSLContext(AbstractJsse
> > Endpoint.java:107)
> > at
> > org.apache.tomcat.util.net
> .AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoi
> > nt.java:71)
> > at
> > org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:146)
> > at
> > org.apache.tomcat.util.net
> .AbstractEndpoint.bindWithCleanup(AbstractEndpoin
> > t.java:1302)
> > at
> > org.apache.tomcat.util.net
> .AbstractEndpoint.init(AbstractEndpoint.java:1315)
> > at
> > org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:652)
> > at
> >
> org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.j
> > ava:75)
> > at
> > org.apache.catalina.connector.Connector.initInternal(Connector.java:1012)
> > ... 11 more
> > Caused by: java.security.UnrecoverableKeyException: Get Key
> failed:
> > Given final block not properly padded. Such issues can arise if a bad
> key is used
> > during decryption.
> > at
> >
> java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.j
> > ava:454)
> > at
> >
> java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator
> > .java:91)
> > at
> > java.base/java.security.KeyStore.getKey(KeyStore.java:1077)
> > at
> > org.apache.tomcat.util.net
> .SSLUtilBase.getKeyManagers(SSLUtilBase.java:353)
> > at
> > org.apache.tomcat.util.net
> .SSLUtilBase.createSSLContext(SSLUtilBase.java:246)
> > at
> > org.apache.tomcat.util.net
> .AbstractJsseEndpoint.createSSLContext(AbstractJsse
> > Endpoint.java:105)
> > ... 18 more
> > Caused by: javax.crypto.BadPaddingException: Given final block
> not

AW: SSL issue

2023-03-18 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello,

the relevant error is:
Caused by: javax.crypto.BadPaddingException: Given final block not properly 
padded. Such issues can arise if a bad key is used during decryption.

It seems there is something wrong with your keystore.
Are both, private and public key in the p12 file?
Can you check the contents with keytool?
Alternatively, you can also use pem files, they are more readable than p12.

Greetings, Thomas

> -Ursprüngliche Nachricht-
> Von: Kevin Huntly 
> Gesendet: Samstag, 18. März 2023 19:15
> An: users@tomcat.apache.org
> Betreff: SSL issue
> 
> Hello Everyone,
> 
> I'm having an issue with my SSL connector:
> 
> 
> 18-Mar-2023 14:12:46.996 SEVERE [main]
> org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
> initialize component [Connector[org.apache.coyote.http11.Http11Nio2Protocol-
> 8443]]
> org.apache.catalina.LifecycleException: Protocol handler 
> initialization
> failed
> at
> org.apache.catalina.connector.Connector.initInternal(Connector.java:1014)
> at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> at
> org.apache.catalina.core.StandardService.initInternal(StandardService.java:549
> )
> at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> at
> org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1032)
> at
> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
> at
> org.apache.catalina.startup.Catalina.load(Catalina.java:724)
> at
> org.apache.catalina.startup.Catalina.load(Catalina.java:746)
> at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMeth
> odHandleAccessor.java:104)
> at
> java.base/java.lang.reflect.Method.invoke(Method.java:578)
> at
> org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
> Caused by: java.lang.IllegalArgumentException: Get Key failed:
> Given final block not properly padded. Such issues can arise if a bad key is 
> used
> during decryption.
> at
> org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsse
> Endpoint.java:107)
> at
> org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoi
> nt.java:71)
> at
> org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:146)
> at
> org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoin
> t.java:1302)
> at
> org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1315)
> at
> org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:652)
> at
> org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.j
> ava:75)
> at
> org.apache.catalina.connector.Connector.initInternal(Connector.java:1012)
> ... 11 more
> Caused by: java.security.UnrecoverableKeyException: Get Key failed:
> Given final block not properly padded. Such issues can arise if a bad key is 
> used
> during decryption.
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.j
> ava:454)
> at
> java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator
> .java:91)
> at
> java.base/java.security.KeyStore.getKey(KeyStore.java:1077)
> at
> org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:353)
> at
> org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246)
> at
> org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsse
> Endpoint.java:105)
> ... 18 more
> Caused by: javax.crypto.BadPaddingException: Given final block not
> properly padded. Such issues can arise if a bad key is used during decryption.
> at
> java.base/com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:861)
> at
> java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.jav
> a:941)
> at
> java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:734)
> at
> java.base/com.sun.crypto.provider.PBES2Core.engineDoFinal(PBES2Core.java:3
> 10)
> at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2207)
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore.lambda$engineGetKey$0(PKCS1
> 2KeyStore.java:370)
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore$RetryWithZero.run(PKCS12KeySt
> ore.java:257)
> at
> java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.j
> ava:361)
> ... 23 more
> 
> 
> And my SSL con

SSL issue

2023-03-18 Thread Kevin Huntly
Hello Everyone,

I'm having an issue with my SSL connector:


18-Mar-2023 14:12:46.996 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
initialize component
[Connector[org.apache.coyote.http11.Http11Nio2Protocol-8443]]
org.apache.catalina.LifecycleException: Protocol handler
initialization failed
at
org.apache.catalina.connector.Connector.initInternal(Connector.java:1014)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at
org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1032)
at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at
org.apache.catalina.startup.Catalina.load(Catalina.java:724)
at
org.apache.catalina.startup.Catalina.load(Catalina.java:746)
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at
java.base/java.lang.reflect.Method.invoke(Method.java:578)
at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
Caused by: java.lang.IllegalArgumentException: Get Key failed:
Given final block not properly padded. Such issues can arise if a bad key
is used during decryption.
at
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:107)
at
org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
at
org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:146)
at
org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1302)
at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1315)
at
org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:652)
at
org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:75)
at
org.apache.catalina.connector.Connector.initInternal(Connector.java:1012)
... 11 more
Caused by: java.security.UnrecoverableKeyException: Get Key failed:
Given final block not properly padded. Such issues can arise if a bad key
is used during decryption.
at
java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:454)
at
java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:91)
at
java.base/java.security.KeyStore.getKey(KeyStore.java:1077)
at
org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:353)
at
org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246)
at
org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:105)
... 18 more
Caused by: javax.crypto.BadPaddingException: Given final block not
properly padded. Such issues can arise if a bad key is used during
decryption.
at
java.base/com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:861)
at
java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:941)
at
java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:734)
at
java.base/com.sun.crypto.provider.PBES2Core.engineDoFinal(PBES2Core.java:310)
at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2207)
at
java.base/sun.security.pkcs12.PKCS12KeyStore.lambda$engineGetKey$0(PKCS12KeyStore.java:370)
at
java.base/sun.security.pkcs12.PKCS12KeyStore$RetryWithZero.run(PKCS12KeyStore.java:257)
at
java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:361)
... 23 more


And my SSL config:










So, what am I doing wrong here?


Kevin Huntly
Email: kmhun...@gmail.com


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


Re: Unable to start application

2023-03-18 Thread Kevin Huntly
any other ideas guys? I want to migrate a bunch of really awful apps off
our primary application server so they don't cause us headaches anymore. if
I can't get one app working I have no hope of getting others to work lol

On Sat, Mar 18, 2023, 09:16 John Dale (DB2DOM)  wrote:

> Thanks Mark - are statics reloaded now, too?
>
> I touch web.xml and it's reloaded successfully hundreds of times.
>
> But I don't use war files so I can use git to version and transfer my
> builds ... maybe that's the reason?
>
> John
>
>
> On 3/18/23, Mark Thomas  wrote:
> > On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
> >> ok - "mnet" should be "ment"
> >
> >  From the logs excerpt I saw earlier in the thread, that needs fixing
> > (although it was only a test element). I don't think it will break
> > anything else but better to remove the noise from the logs.
> >
> >> I figured I'd spell that out and behave like a compiler.  :)
> >>
> >> I would also move that configuration into server.xml (it's a major
> >> difference between your configuration and mine).
> >
> > That configuration style is NOT recommended. It means you have no choice
> > but to restart Tomcat if you change the Context configuration. If it is
> > in a separate Context file, Tomcat will reload the web application
> > automatically if you change the Context file.
> >
> > Stick with:
> >
> /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml
> >
> > Do NOT specify a path attribute for the Context. It will be ignored.
> >
> > Where is the JDBC driver located? It needs to be in ${CATALINA_BASE}/lib
> > and not part of the WAR.
> >
> > Can we see the full logs from a clean start-up please?
> >
> > Mark
> >
> >
> >>
> >> Lastly, maybe to help debug a future issue, did you compile your
> >> project files against the tomcat libs included with your distribution,
> >> or did you drop them into this version of tomcat from another version?
> >>   Probably won't matter since you should be coded to the interfaces,
> >> but one never knows.
> >>
> >> John
> >>
> >> On 3/17/23, Kevin Huntly  wrote:
> >>> no I think it has something to do with it but I'm not sure. I'll try
> >>> taking
> >>> out the environment values and see what happens
> >>>
> >>> On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 
> >>> wrote:
> >>>
>  In the log you sent below, I see a typo:
>  Context/Environmnet
> 
>  Does that have something to do with it, or is this a typo in tomcat
>  logging?
> 
> 
> 
> 
>  On 3/17/23, Kevin Huntly  wrote:
> > yes, under Catalina/localhost
> >
> > On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM) 
>  wrote:
> >
> >> Are you modifying a context.xml file in the conf folder?
> >>
> >> On 3/17/23, Kevin Huntly  wrote:
> >>> Also of note:
> >>>
> >>> 17-Mar-2023 17:25:42.113 INFO [main]
> >>> org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
> >>> deployment descriptor
> >>>
> >>
> 
> [/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml]
> >>> 17-Mar-2023 17:25:42.174 WARNING [main]
> >>> org.apache.tomcat.util.digester.Digester.endElement No rules found
> >> matching
> >>> [Context/Environmnet]
> >>> 
> >>>
> >>> Kevin Huntly
> >>> Email: kmhun...@gmail.com
> >>> Cell: 716/424-3311
> >>> 
> >>>
> >>> -BEGIN GEEK CODE BLOCK-
> >>> Version: 1.0
> >>> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> >>> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> >>> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> >>> G++ e(+) h--- r+++ y+++*
> >>> --END GEEK CODE BLOCK--
> >>>
> >>>
> >>> On Fri, Mar 17, 2023 at 5:24 PM Kevin Huntly 
> >>> wrote:
> >>>
>  Here's my santized server.xml and context.xml
> 
>  server.xml -> https://pastebin.com/Bj6Wh0qU
>  context.xml -> https://pastebin.com/Z3dBf3eK
> 
> >>>
> >>
> >>
> -
> >> 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
> 
> 
> >>>
> >>
> >> -
> >> 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

Re: Unable to start application

2023-03-18 Thread John Dale (DB2DOM)
Thanks Mark - are statics reloaded now, too?

I touch web.xml and it's reloaded successfully hundreds of times.

But I don't use war files so I can use git to version and transfer my
builds ... maybe that's the reason?

John


On 3/18/23, Mark Thomas  wrote:
> On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
>> ok - "mnet" should be "ment"
>
>  From the logs excerpt I saw earlier in the thread, that needs fixing
> (although it was only a test element). I don't think it will break
> anything else but better to remove the noise from the logs.
>
>> I figured I'd spell that out and behave like a compiler.  :)
>>
>> I would also move that configuration into server.xml (it's a major
>> difference between your configuration and mine).
>
> That configuration style is NOT recommended. It means you have no choice
> but to restart Tomcat if you change the Context configuration. If it is
> in a separate Context file, Tomcat will reload the web application
> automatically if you change the Context file.
>
> Stick with:
> /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml
>
> Do NOT specify a path attribute for the Context. It will be ignored.
>
> Where is the JDBC driver located? It needs to be in ${CATALINA_BASE}/lib
> and not part of the WAR.
>
> Can we see the full logs from a clean start-up please?
>
> Mark
>
>
>>
>> Lastly, maybe to help debug a future issue, did you compile your
>> project files against the tomcat libs included with your distribution,
>> or did you drop them into this version of tomcat from another version?
>>   Probably won't matter since you should be coded to the interfaces,
>> but one never knows.
>>
>> John
>>
>> On 3/17/23, Kevin Huntly  wrote:
>>> no I think it has something to do with it but I'm not sure. I'll try
>>> taking
>>> out the environment values and see what happens
>>>
>>> On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 
>>> wrote:
>>>
 In the log you sent below, I see a typo:
 Context/Environmnet

 Does that have something to do with it, or is this a typo in tomcat
 logging?




 On 3/17/23, Kevin Huntly  wrote:
> yes, under Catalina/localhost
>
> On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM) 
 wrote:
>
>> Are you modifying a context.xml file in the conf folder?
>>
>> On 3/17/23, Kevin Huntly  wrote:
>>> Also of note:
>>>
>>> 17-Mar-2023 17:25:42.113 INFO [main]
>>> org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
>>> deployment descriptor
>>>
>>
 [/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml]
>>> 17-Mar-2023 17:25:42.174 WARNING [main]
>>> org.apache.tomcat.util.digester.Digester.endElement No rules found
>> matching
>>> [Context/Environmnet]
>>> 
>>>
>>> Kevin Huntly
>>> Email: kmhun...@gmail.com
>>> Cell: 716/424-3311
>>> 
>>>
>>> -BEGIN GEEK CODE BLOCK-
>>> Version: 1.0
>>> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
>>> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
>>> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
>>> G++ e(+) h--- r+++ y+++*
>>> --END GEEK CODE BLOCK--
>>>
>>>
>>> On Fri, Mar 17, 2023 at 5:24 PM Kevin Huntly 
>>> wrote:
>>>
 Here's my santized server.xml and context.xml

 server.xml -> https://pastebin.com/Bj6Wh0qU
 context.xml -> https://pastebin.com/Z3dBf3eK

>>>
>>
>> -
>> 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


>>>
>>
>> -
>> 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
>
>

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



Re: AW: Unable to start application

2023-03-18 Thread John Dale (DB2DOM)
Still at it I see!  :)

Would you mind clearing and inspecting all logs very closely after reboot?

Maybe it would also be useful to undeploy, capture logs, and diff them
(never tried that, seemed like a good idea)?

Sometimes it's a single word in the log file that triggers the
solution, and doing diligent inspection of the logs after each change
is a good idea to avoid compounding variables.

John


On 3/18/23, Kevin Huntly  wrote:
> morning all,
>
> you are correct, i forgot to chmod 644 the jar when I copied it - I did
> that, restarted, no change, I turned off selinux and restarted, no change.
> 
>
> Kevin Huntly
> Email: kmhun...@gmail.com
> Cell: 716/424-3311
> 
>
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
>
>
> On Sat, Mar 18, 2023 at 7:16 AM Simon Matter 
> wrote:
>
>> Hi,
>>
>> > On 18/03/2023 10:43, Thomas Hoffmann (Speed4Trade GmbH) wrote:
>> >> Hello,
>> >>
>> >>> -Ursprüngliche Nachricht-
>> >>> Von: Kevin Huntly 
>> >>> Gesendet: Samstag, 18. März 2023 11:10
>> >>> An: Tomcat Users List 
>> >>> Betreff: Re: Unable to start application
>> >>>
>> >>> Here are the logs -
>> >>> https://drive.google.com/file/d/1jBsNaW_bQJ4KcDSvucJ5QWo642He6bgb/view
>> >>> ?usp=sharing
>> >>>
>> >>> The JDBC driver is located under /opt/mysql/, and I added that path
>> >>> to
>> >>> catalina.properties under the common loader. I did try to move it
>> >>> into
>> >>> ${catalina.home}/lib, this did not change anything.
>> >>> 
>> >>
>> >>
>> >> This message looks strange:
>> >> 18-Mar-2023 06:06:13.305 WARNING [main]
>> >> org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem
>> >> with
>> >> JAR file
>> >>
>> [/opt/Apache/Tomcat/apache-tomcat-9.0.73/lib/mysql-connector-j-8.0.32.jar],
>> >> exists: [true], canRead: [false]
>> >>
>> >> It seems that it cant load the jdbc driver from that path.
>> >> Could you download the jar again from the mysql website and replace
>> >> it?
>> >> Can you open/unpack the jar without errors?
>> >
>> > More likely a permissions problem. That warning is generated before
>> > Tomcat tries loading the file. It means a call to
>> > java.io.File.canRead()
>> > returned false.
>> >
>> > Mark
>>
>> Since this is on RHEL, it could also be an SELinux problem where access
>> to
>> the JAR is denied.
>>
>> Regards,
>> Simon
>>
>>
>> -
>> 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



Re: AW: Unable to start application

2023-03-18 Thread Kevin Huntly
morning all,

you are correct, i forgot to chmod 644 the jar when I copied it - I did
that, restarted, no change, I turned off selinux and restarted, no change.


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Sat, Mar 18, 2023 at 7:16 AM Simon Matter  wrote:

> Hi,
>
> > On 18/03/2023 10:43, Thomas Hoffmann (Speed4Trade GmbH) wrote:
> >> Hello,
> >>
> >>> -Ursprüngliche Nachricht-
> >>> Von: Kevin Huntly 
> >>> Gesendet: Samstag, 18. März 2023 11:10
> >>> An: Tomcat Users List 
> >>> Betreff: Re: Unable to start application
> >>>
> >>> Here are the logs -
> >>> https://drive.google.com/file/d/1jBsNaW_bQJ4KcDSvucJ5QWo642He6bgb/view
> >>> ?usp=sharing
> >>>
> >>> The JDBC driver is located under /opt/mysql/, and I added that path to
> >>> catalina.properties under the common loader. I did try to move it into
> >>> ${catalina.home}/lib, this did not change anything.
> >>> 
> >>
> >>
> >> This message looks strange:
> >> 18-Mar-2023 06:06:13.305 WARNING [main]
> >> org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with
> >> JAR file
> >>
> [/opt/Apache/Tomcat/apache-tomcat-9.0.73/lib/mysql-connector-j-8.0.32.jar],
> >> exists: [true], canRead: [false]
> >>
> >> It seems that it cant load the jdbc driver from that path.
> >> Could you download the jar again from the mysql website and replace it?
> >> Can you open/unpack the jar without errors?
> >
> > More likely a permissions problem. That warning is generated before
> > Tomcat tries loading the file. It means a call to java.io.File.canRead()
> > returned false.
> >
> > Mark
>
> Since this is on RHEL, it could also be an SELinux problem where access to
> the JAR is denied.
>
> Regards,
> Simon
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 9.0.72 Firefox issue with 204 response (Empty Body)

2023-03-18 Thread Mark Thomas

That looks like a browser bug then. You'll need to raise that with Firefox.

Also, the CSP doesn't look quite right.

"...form-action 'self'; https:;..."

should probably be:

"...form-action 'self' https:;..."

Mark


On 17/03/2023 23:34, Bhavesh Mistry wrote:

Hi Tomcat Team and Mark,

I am able to reproduce the problem with your sample app. *CSP large 
header is causing this problem we attached it to ALL responses.  This 
custom header.  I am not sure if this is a tomcat issue or Firefox. *We 
get *NS_ERROR_ABORT*.   Sorry, it took a while but the issue is 
reproducible with CSP or Large header.


Sample: 
https://github.com/bmistry13/tomat-204-issue/blob/main/no-content-test.war 


web.xml
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
"
         xmlns="http://java.sun.com/xml/ns/javaee 
"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_4_0.xsd 
"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
 
https://java.sun.com/xml/ns/javaee/web-app_4_0.xsd 
"

         id="Versa"
         version="4.0">

     testa

*    
         TESTServlet
         AjaxTestServlet
         AjaxServletTest
     

     
         AjaxTestServlet
         /test
     *
     
         60
         COOKIE
         
            true
            true
         
     
     
         
             HTTPSOnly
             /*
         
     
     
         
             
         
     
     
         js
         application/javascript
     

~

--- JSP change



   
src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js 
<http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js>">


     function test() {

      for (let i = 5; i < 10; i++) {
         $.ajax({
             async: true,
             type: "GET",
             url: "/no-content-test/test?q=test1",
             contentType: "application/json; charset=utf-8",
             dataType: "json",
             success: function (response) {
                 alert(response.status);
             }
         });
         }
         for (let i = 5; i < 10; i++) {
         $.ajax({
             async: true,
             type: "GET",
             url: "/no-content-test/test?q=test2",
             contentType: "application/json; charset=utf-8",
             dataType: "json",
             success: function (response) {
                 alert(response.d);
             }
         });
         }
     }

     Clinking on button to ajax test onclick='test();' value='Click Me and See Dev Tool Netowrk Tab'/>

   

--

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class AjaxServletTest extends HttpServlet {

 private static final String CSP_HEADER ="Content-Security-Policy";

 private static final String CSP_HEADER_POLICY ="default-src 'self' https:;font-src 'self' data: 
https://fonts.googleapis.com/  
https://fonts.gstatic.com ; script-src 'self' " +
 "'sha256-BdZ62JYXk9kaPAizrIertjvay2mtb//aXKRFuOz6RLI=' 
'sha256-Rv1DFftLIYbmrwNcvKH3vd+fs4aXTb6/RNjTs7CLJOg=' " +
 "'sha256-BDvo3wEMDWiXAoVw9mYgGW9GCvsvo3ECBHjc4FzPky8=' 'unsafe-eval' 
https://maps.googleapis.com/maps/api/geocode/json 
 
https://maps.googleapis.com/  " +
 "https://*.tile.openstreetmap.org  
https://export.highcharts.com/  
https://code.highcharts.com/ ; img-src 
'self' blob: " +
 "data: https://maps.googleapis.com/maps/api/geocode/json 
 
https://maps.gstatic.com/  
https://maps.googleapis.com/  
https://*.tile.openstreetmap.org  " +
 "https://chart.apis.google.com/  
https://export.highcharts.com/ ; 
style-src 'self' 'unsafe-inline' data: " +
 "https://maps.googleapis.com/maps/api/geocode/json 
 
https://*.tile.openstreetmap.org  " +
 "https://fonts.googleapis.com/  
https://export.highcharts.com/

Re: AW: Unable to start application

Hi,

> On 18/03/2023 10:43, Thomas Hoffmann (Speed4Trade GmbH) wrote:
>> Hello,
>>
>>> -Ursprüngliche Nachricht-
>>> Von: Kevin Huntly 
>>> Gesendet: Samstag, 18. März 2023 11:10
>>> An: Tomcat Users List 
>>> Betreff: Re: Unable to start application
>>>
>>> Here are the logs -
>>> https://drive.google.com/file/d/1jBsNaW_bQJ4KcDSvucJ5QWo642He6bgb/view
>>> ?usp=sharing
>>>
>>> The JDBC driver is located under /opt/mysql/, and I added that path to
>>> catalina.properties under the common loader. I did try to move it into
>>> ${catalina.home}/lib, this did not change anything.
>>> 
>>
>>
>> This message looks strange:
>> 18-Mar-2023 06:06:13.305 WARNING [main]
>> org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with
>> JAR file
>> [/opt/Apache/Tomcat/apache-tomcat-9.0.73/lib/mysql-connector-j-8.0.32.jar],
>> exists: [true], canRead: [false]
>>
>> It seems that it cant load the jdbc driver from that path.
>> Could you download the jar again from the mysql website and replace it?
>> Can you open/unpack the jar without errors?
>
> More likely a permissions problem. That warning is generated before
> Tomcat tries loading the file. It means a call to java.io.File.canRead()
> returned false.
>
> Mark

Since this is on RHEL, it could also be an SELinux problem where access to
the JAR is denied.

Regards,
Simon


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



Re: AW: Unable to start application


On 18/03/2023 10:43, Thomas Hoffmann (Speed4Trade GmbH) wrote:

Hello,


-Ursprüngliche Nachricht-
Von: Kevin Huntly 
Gesendet: Samstag, 18. März 2023 11:10
An: Tomcat Users List 
Betreff: Re: Unable to start application

Here are the logs -
https://drive.google.com/file/d/1jBsNaW_bQJ4KcDSvucJ5QWo642He6bgb/view
?usp=sharing

The JDBC driver is located under /opt/mysql/, and I added that path to
catalina.properties under the common loader. I did try to move it into
${catalina.home}/lib, this did not change anything.

  


This message looks strange:
18-Mar-2023 06:06:13.305 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with JAR 
file 
[/opt/Apache/Tomcat/apache-tomcat-9.0.73/lib/mysql-connector-j-8.0.32.jar], 
exists: [true], canRead: [false]

It seems that it cant load the jdbc driver from that path.
Could you download the jar again from the mysql website and replace it?
Can you open/unpack the jar without errors?


More likely a permissions problem. That warning is generated before 
Tomcat tries loading the file. It means a call to java.io.File.canRead() 
returned false.


Mark




Greetings, Thomas





-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Sat, Mar 18, 2023 at 3:16 AM Mark Thomas  wrote:


On 17/03/2023 23:18, John Dale (DB2DOM) wrote:

ok - "mnet" should be "ment"


  From the logs excerpt I saw earlier in the thread, that needs fixing
(although it was only a test element). I don't think it will break
anything else but better to remove the noise from the logs.


I figured I'd spell that out and behave like a compiler.  :)

I would also move that configuration into server.xml (it's a major
difference between your configuration and mine).


That configuration style is NOT recommended. It means you have no
choice but to restart Tomcat if you change the Context configuration.
If it is in a separate Context file, Tomcat will reload the web
application automatically if you change the Context file.

Stick with:

/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolut
ions.xml

Do NOT specify a path attribute for the Context. It will be ignored.

Where is the JDBC driver located? It needs to be in
${CATALINA_BASE}/lib and not part of the WAR.

Can we see the full logs from a clean start-up please?

Mark




Lastly, maybe to help debug a future issue, did you compile your
project files against the tomcat libs included with your
distribution, or did you drop them into this version of tomcat from another

version?

   Probably won't matter since you should be coded to the interfaces,
but one never knows.

John

On 3/17/23, Kevin Huntly  wrote:

no I think it has something to do with it but I'm not sure. I'll
try

taking

out the environment values and see what happens

On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 

wrote:



In the log you sent below, I see a typo:
Context/Environmnet

Does that have something to do with it, or is this a typo in
tomcat logging?




On 3/17/23, Kevin Huntly  wrote:

yes, under Catalina/localhost

On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM)


wrote:



Are you modifying a context.xml file in the conf folder?

On 3/17/23, Kevin Huntly  wrote:

Also of note:

17-Mar-2023 17:25:42.113 INFO [main]
org.apache.catalina.startup.HostConfig.deployDescriptor
Deploying deployment descriptor






[/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolu
tions.xml]

17-Mar-2023 17:25:42.174 WARNING [main]
org.apache.tomcat.util.digester.Digester.endElement No rules
found

matching

[Context/Environmnet]


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Fri, Mar 17, 2023 at 5:24 PM Kevin Huntly

wrote:


Here's my santized server.xml and context.xml

server.xml -> https://pastebin.com/Bj6Wh0qU context.xml ->
https://pastebin.com/Z3dBf3eK






- 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







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



--

AW: Unable to start application

Hello,

> -Ursprüngliche Nachricht-
> Von: Kevin Huntly 
> Gesendet: Samstag, 18. März 2023 11:10
> An: Tomcat Users List 
> Betreff: Re: Unable to start application
> 
> Here are the logs -
> https://drive.google.com/file/d/1jBsNaW_bQJ4KcDSvucJ5QWo642He6bgb/view
> ?usp=sharing
> 
> The JDBC driver is located under /opt/mysql/, and I added that path to
> catalina.properties under the common loader. I did try to move it into
> ${catalina.home}/lib, this did not change anything.
> 
 

This message looks strange:
18-Mar-2023 06:06:13.305 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with JAR 
file 
[/opt/Apache/Tomcat/apache-tomcat-9.0.73/lib/mysql-connector-j-8.0.32.jar], 
exists: [true], canRead: [false]

It seems that it cant load the jdbc driver from that path.
Could you download the jar again from the mysql website and replace it?
Can you open/unpack the jar without errors?

Greetings, Thomas



> 
> -BEGIN GEEK CODE BLOCK-
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> --END GEEK CODE BLOCK--
> 
> 
> On Sat, Mar 18, 2023 at 3:16 AM Mark Thomas  wrote:
> 
> > On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
> > > ok - "mnet" should be "ment"
> >
> >  From the logs excerpt I saw earlier in the thread, that needs fixing
> > (although it was only a test element). I don't think it will break
> > anything else but better to remove the noise from the logs.
> >
> > > I figured I'd spell that out and behave like a compiler.  :)
> > >
> > > I would also move that configuration into server.xml (it's a major
> > > difference between your configuration and mine).
> >
> > That configuration style is NOT recommended. It means you have no
> > choice but to restart Tomcat if you change the Context configuration.
> > If it is in a separate Context file, Tomcat will reload the web
> > application automatically if you change the Context file.
> >
> > Stick with:
> >
> > /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolut
> > ions.xml
> >
> > Do NOT specify a path attribute for the Context. It will be ignored.
> >
> > Where is the JDBC driver located? It needs to be in
> > ${CATALINA_BASE}/lib and not part of the WAR.
> >
> > Can we see the full logs from a clean start-up please?
> >
> > Mark
> >
> >
> > >
> > > Lastly, maybe to help debug a future issue, did you compile your
> > > project files against the tomcat libs included with your
> > > distribution, or did you drop them into this version of tomcat from 
> > > another
> version?
> > >   Probably won't matter since you should be coded to the interfaces,
> > > but one never knows.
> > >
> > > John
> > >
> > > On 3/17/23, Kevin Huntly  wrote:
> > >> no I think it has something to do with it but I'm not sure. I'll
> > >> try
> > taking
> > >> out the environment values and see what happens
> > >>
> > >> On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 
> > wrote:
> > >>
> > >>> In the log you sent below, I see a typo:
> > >>> Context/Environmnet
> > >>>
> > >>> Does that have something to do with it, or is this a typo in
> > >>> tomcat logging?
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> On 3/17/23, Kevin Huntly  wrote:
> >  yes, under Catalina/localhost
> > 
> >  On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM)
> >  
> > >>> wrote:
> > 
> > > Are you modifying a context.xml file in the conf folder?
> > >
> > > On 3/17/23, Kevin Huntly  wrote:
> > >> Also of note:
> > >>
> > >> 17-Mar-2023 17:25:42.113 INFO [main]
> > >> org.apache.catalina.startup.HostConfig.deployDescriptor
> > >> Deploying deployment descriptor
> > >>
> > >
> > >>>
> > [/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolu
> > tions.xml]
> > >> 17-Mar-2023 17:25:42.174 WARNING [main]
> > >> org.apache.tomcat.util.digester.Digester.endElement No rules
> > >> found
> > > matching
> > >> [Context/Environmnet]
> > >> 
> > >>
> > >> Kevin Huntly
> > >> Email: kmhun...@gmail.com
> > >> Cell: 716/424-3311
> > >> 
> > >>
> > >> -BEGIN GEEK CODE BLOCK-
> > >> Version: 1.0
> > >> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> > >> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> > >> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> > >> G++ e(+) h--- r+++ y+++*
> > >> --END GEEK CODE BLOCK--
> > >>
> > >>
> > >> On Fri, Mar 17, 2023 at 5:24 PM Kevin Huntly
> > >> 
> > >> wrote:
> > >>
> > >>> Here's my santized server.xml and context.xml
> > >>>
> > >>> server.xml -> https://pastebin.com/Bj6Wh0qU context.xml ->
> > >>> https://pastebin.com/Z3dBf3eK
> > >>>
> > >>
> > >>>

Re: Unable to start application

Here are the logs -
https://drive.google.com/file/d/1jBsNaW_bQJ4KcDSvucJ5QWo642He6bgb/view?usp=sharing

The JDBC driver is located under /opt/mysql/, and I added that path to
catalina.properties under the common loader. I did try to move it into
${catalina.home}/lib, this did not change anything.


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Sat, Mar 18, 2023 at 3:16 AM Mark Thomas  wrote:

> On 17/03/2023 23:18, John Dale (DB2DOM) wrote:
> > ok - "mnet" should be "ment"
>
>  From the logs excerpt I saw earlier in the thread, that needs fixing
> (although it was only a test element). I don't think it will break
> anything else but better to remove the noise from the logs.
>
> > I figured I'd spell that out and behave like a compiler.  :)
> >
> > I would also move that configuration into server.xml (it's a major
> > difference between your configuration and mine).
>
> That configuration style is NOT recommended. It means you have no choice
> but to restart Tomcat if you change the Context configuration. If it is
> in a separate Context file, Tomcat will reload the web application
> automatically if you change the Context file.
>
> Stick with:
>
> /opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml
>
> Do NOT specify a path attribute for the Context. It will be ignored.
>
> Where is the JDBC driver located? It needs to be in ${CATALINA_BASE}/lib
> and not part of the WAR.
>
> Can we see the full logs from a clean start-up please?
>
> Mark
>
>
> >
> > Lastly, maybe to help debug a future issue, did you compile your
> > project files against the tomcat libs included with your distribution,
> > or did you drop them into this version of tomcat from another version?
> >   Probably won't matter since you should be coded to the interfaces,
> > but one never knows.
> >
> > John
> >
> > On 3/17/23, Kevin Huntly  wrote:
> >> no I think it has something to do with it but I'm not sure. I'll try
> taking
> >> out the environment values and see what happens
> >>
> >> On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM) 
> wrote:
> >>
> >>> In the log you sent below, I see a typo:
> >>> Context/Environmnet
> >>>
> >>> Does that have something to do with it, or is this a typo in tomcat
> >>> logging?
> >>>
> >>>
> >>>
> >>>
> >>> On 3/17/23, Kevin Huntly  wrote:
>  yes, under Catalina/localhost
> 
>  On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM) 
> >>> wrote:
> 
> > Are you modifying a context.xml file in the conf folder?
> >
> > On 3/17/23, Kevin Huntly  wrote:
> >> Also of note:
> >>
> >> 17-Mar-2023 17:25:42.113 INFO [main]
> >> org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
> >> deployment descriptor
> >>
> >
> >>>
> [/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml]
> >> 17-Mar-2023 17:25:42.174 WARNING [main]
> >> org.apache.tomcat.util.digester.Digester.endElement No rules found
> > matching
> >> [Context/Environmnet]
> >> 
> >>
> >> Kevin Huntly
> >> Email: kmhun...@gmail.com
> >> Cell: 716/424-3311
> >> 
> >>
> >> -BEGIN GEEK CODE BLOCK-
> >> Version: 1.0
> >> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> >> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> >> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> >> G++ e(+) h--- r+++ y+++*
> >> --END GEEK CODE BLOCK--
> >>
> >>
> >> On Fri, Mar 17, 2023 at 5:24 PM Kevin Huntly 
> >> wrote:
> >>
> >>> Here's my santized server.xml and context.xml
> >>>
> >>> server.xml -> https://pastebin.com/Bj6Wh0qU
> >>> context.xml -> https://pastebin.com/Z3dBf3eK
> >>>
> >>
> >
> > -
> > 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
> >>>
> >>>
> >>
> >
> > -
> > 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 c

Re: Unable to start application


On 17/03/2023 23:18, John Dale (DB2DOM) wrote:

ok - "mnet" should be "ment"


From the logs excerpt I saw earlier in the thread, that needs fixing 
(although it was only a test element). I don't think it will break 
anything else but better to remove the noise from the logs.



I figured I'd spell that out and behave like a compiler.  :)

I would also move that configuration into server.xml (it's a major
difference between your configuration and mine). 


That configuration style is NOT recommended. It means you have no choice 
but to restart Tomcat if you change the Context configuration. If it is 
in a separate Context file, Tomcat will reload the web application 
automatically if you change the Context file.


Stick with:
/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml

Do NOT specify a path attribute for the Context. It will be ignored.

Where is the JDBC driver located? It needs to be in ${CATALINA_BASE}/lib 
and not part of the WAR.


Can we see the full logs from a clean start-up please?

Mark




Lastly, maybe to help debug a future issue, did you compile your
project files against the tomcat libs included with your distribution,
or did you drop them into this version of tomcat from another version?
  Probably won't matter since you should be coded to the interfaces,
but one never knows.

John

On 3/17/23, Kevin Huntly  wrote:

no I think it has something to do with it but I'm not sure. I'll try taking
out the environment values and see what happens

On Fri, Mar 17, 2023, 19:11 John Dale (DB2DOM)  wrote:


In the log you sent below, I see a typo:
Context/Environmnet

Does that have something to do with it, or is this a typo in tomcat
logging?




On 3/17/23, Kevin Huntly  wrote:

yes, under Catalina/localhost

On Fri, Mar 17, 2023, 19:07 John Dale (DB2DOM) 

wrote:



Are you modifying a context.xml file in the conf folder?

On 3/17/23, Kevin Huntly  wrote:

Also of note:

17-Mar-2023 17:25:42.113 INFO [main]
org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
deployment descriptor




[/opt/Apache/Tomcat/apache-tomcat-9.0.73/conf/Catalina/localhost/esolutions.xml]

17-Mar-2023 17:25:42.174 WARNING [main]
org.apache.tomcat.util.digester.Digester.endElement No rules found

matching

[Context/Environmnet]


Kevin Huntly
Email: kmhun...@gmail.com
Cell: 716/424-3311


-BEGIN GEEK CODE BLOCK-
Version: 1.0
GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
G++ e(+) h--- r+++ y+++*
--END GEEK CODE BLOCK--


On Fri, Mar 17, 2023 at 5:24 PM Kevin Huntly 
wrote:


Here's my santized server.xml and context.xml

server.xml -> https://pastebin.com/Bj6Wh0qU
context.xml -> https://pastebin.com/Z3dBf3eK





-
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






-
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