Re: Re: HTTP to HTTPS redirect not happening

2019-07-22 Thread Konstantin Kolinko
вс, 21 июл. 2019 г. в 00:09, Richard Huntrods :
>
> I still am having trouble understanding why the web application's
> WEB-INF/web.xml would be the appropriate place to put the change when I
> want to affect ROOT. I would have thought webapps/ROOT/WEB-INF/web.xml
> would have been the correct one.

Every web application has its own set of files, rooted to its own
directory or zipped as war file.

The "WEB-INF/web.xml" file is one of those files.

The "WEB-INF/web.xml" file for the "ROOT" web application is indeed
$CATALINA_BASE/webapps/ROOT/WEB-INF/web.xml.

The file for the "manager" web application is
$CATALINA_BASE/webapps/manager/WEB-INF/web.xml.

and so on.

The global defaults file "$CATALINA_BASE/conf/web.xml" should not be modified.

> which is considered "more elegant" or better

+1 to Martynas's answer.

The web.xml is defined by specification, better understood and better
tested, and is supported by other Servlet Containers besides Apache
Tomcat. In general, there should be more people who are able to help
with it, compared to helping with a RewriteValve.

(Though if there are a lot of Apache HTTPD Server administrators
around you, the rewrite syntax will be more familiar to them).

Best regards,
Konstantin Kolinko

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



Re: [OT] Tomcat 9.0.20 : send email on errors

2019-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Konstantin,

On 7/22/19 17:11, Konstantin Kolinko wrote:
> пн, 22 июл. 2019 г. в 20:38, Robert Hicks
> :
>> 
>> Using the default logging (java.util.logging) is it possible to
>> have Tomcat itself (not a jsp or servlet) send an email if it is
>> unable to log or there are errors in its log files?
> 
> This question reminds me of Zawinski's Law.

LOL

For reference, for those who are unfamiliar:

https://en.wikipedia.org/wiki/Jamie_Zawinski#Principles

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl02LDwACgkQHPApP6U8
pFjYGhAAmfv0QoP3lVpZgZ5lWMmqoFMeRqB8LG30XRJfm2AmCKJHrGQbdupXGZjX
JqJUFO6qfAurkP1qmR4GDv7vzLA4p0ePJCc5MRbtnG+pkdjFANZyDwugM71glYvA
9pwAWZzWL69QfQ9UCIJSGbjiEhGyEdLUjRDbyo0vVSfY7PG4feuD1cXeEGEac34e
zqGBmBRPie7IsPZPFfRMkXpegjboXJundcfmxJL0qrSKxjs15fQ10QgIe9hjHWMc
n9jIhs23Eyko3bMYoc/7u4brhchWE0eM3A6haTW0UGiFhCPEiL/Dqa7QXMtCZvel
+H+DEpQWsRpqHyHPdlVQiLsExbBTw4wdHCtk+i1XSTf9qxyismjMXEiYZpxIeuTI
0Hi2C8B/pOuKli5kVzfNhTcnZ/S/+/PCezL4gnw0+9QVP7FQ635qF1sn22TJH7Cy
zbmlKzqrBT5Rt2jeADNtOtpJE2f3R42O6iACwsROav5O2LmwuJXSHBWGctNHtv0P
8GmQh4hwQ0VjgbLJBr0JMvFdiZiIUVX83DY9Ydh2WhT4AKt4EqmzJ3WaJscCFhVZ
SL1c/RhEjuM6EKPXApsG1bsu6/jQaZ/jNJuTLIq0Ui5BWgZimiwzN0rwLk2vDOwc
fWXPkMhg50DfkXaSVNLXSV1wUvIDee6YERhzhtVg7VDiHJvdbx8=
=hjeA
-END PGP SIGNATURE-

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



Re: WAR file not deploying correctly

2019-07-22 Thread Konstantin Kolinko
пн, 22 июл. 2019 г. в 11:28, Victor WILLART :
>
> 22-Jul-2019 09:36:31.598 SEVERE 
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
> org.apache.catalina.startup.ExpandWar.deleteDir [C:\Program Files\Apache 
> Software Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0\config] 
> could not be completely deleted. The presence of the remaining files may 
> cause problems

As you can see from the above log message, Tomcat was unable to delete
the "config" directory. Thus your stopping and undeploying a web
application was not completed.

Best regards,
Konstantin Kolinko

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



Re: Tomcat 9.0.20 : send email on errors

2019-07-22 Thread Konstantin Kolinko
пн, 22 июл. 2019 г. в 20:38, Robert Hicks :
>
> Using the default logging (java.util.logging) is it possible to have Tomcat
> itself (not a jsp or servlet) send an email if it is unable to log or there
> are errors in its log files?

This question reminds me of Zawinski's Law.

Reliable monitoring would better be performed by some external tool.

> The scenario I am thinking of would be if the logging file system is full
> or unavailable due to other issues.

java.util.logging has an internal mechanism to handle fatal errors.

To reference some source code - looking at some version of JDK 8, see
the files in
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/logging

For example, see how StreamHandler.publish() handles errors (lines of
225-228 of StreamHandler.java). If it is unable to write a message it
does

[[[
} catch (Exception ex) {
 reportError(null, ex, ErrorManager.WRITE_FAILURE);
}
]]]

The actual processing of the error is delegated to a
java.util.logging.ErrorManager.  The default implementation just
prints to System.err once and ignores further errors, but I think it
is configurable.

I hope this helps.

Best regards,
Konstantin Kolinko

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



Re: [EXTERNAL] Re: cglib jars always give errors with different versions when start Tomcat 9.0.13

2019-07-22 Thread Konstantin Kolinko
пн, 22 июл. 2019 г. в 23:15, Hua, Gary - Saint Louis, MO - Contractor
:
>
> Chris:
>
> We inherited this web application from previous vendor IBM.The original 
> version of hibernate related jars are: cglib-2.1.jar, ehcache-1.1.jar, 
> hibernate3.jar(3.1.0)
>
> This web application was deployed to WebSphere server and it works fine so 
> far, but now our client need to switch to Tomcat server. The web application 
> works okay in my local Tomcat 9.0.13 server in eclipse, but when I deploy it 
> to our web server, those errors occur when I start the server.

1. Why not the current version of Tomcat 9 (9.0.22) ?

2. Does the class mentioned in a NoClassDefFoundError exist in exactly
one of the jars that you are using (and no more than one jar)?

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



RE: [EXTERNAL] Re: cglib jars always give errors with different versions when start Tomcat 9.0.13

2019-07-22 Thread Hua, Gary - Saint Louis, MO - Contractor
Chris:

We inherited this web application from previous vendor IBM.The original 
version of hibernate related jars are: cglib-2.1.jar, ehcache-1.1.jar, 
hibernate3.jar(3.1.0)

This web application was deployed to WebSphere server and it works fine so far, 
but now our client need to switch to Tomcat server. The web application works 
okay in my local Tomcat 9.0.13 server in eclipse, but when I deploy it to our 
web server, those errors occur when I start the server. 

Thanks.
Gary

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, July 22, 2019 1:39 PM
To: Tomcat Users List ; Hua, Gary - Saint Louis, MO - 
Contractor 
Subject: [EXTERNAL] Re: cglib jars always give errors with different versions 
when start Tomcat 9.0.13

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Gary,

On 7/22/19 11:03, Hua, Gary - Saint Louis, MO - Contractor wrote:
> All:
> 
> I deployed a web application to the Tomcat 9.0.13 server, under the 
> WEB-INF/lib there are Hibernate related jar files. When I start the 
> server, it give me errors in many Hibernate mapping classes:
> 
> 1991 [main] ERROR proxy.BasicLazyInitializer  - CGLIB Enhancement
> failed: com.usps.nom.tops.model.impl.ComputedHardCloseoutImpl
> java.lang.NoClassDefFoundError: Could not initialize class 
> net.sf.cglib.proxy.Enhancer at 
> org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInit
ializer.java:116)
>
> 
at
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.
java:41)
> 
> The original Cglib version is cglib-2.1.jar, and I try the latest 
> cglib-3.2.12.jar, the original error is gone but a different error 
> show up:
> 
> 1619 [main] ERROR proxy.BasicLazyInitializer  - CGLIB Enhancement
> failed: com.usps.nom.tops.model.transportation.AplDispatch
> java.lang.NoClassDefFoundError:
> net.sf.cglib.core.AbstractClassGenerator at 
> org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInit
ializer.java:116)
>
> 
at
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.
java:41)
> at
> org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTup
lizer.java:161)
>
> 
> 
> I have tried different versions of Cglib jars file:
> 
> cglib-2.1.jar, cglib-2.1_3.jar, cglib-3.2.1.jar, cglib-3.2.12.jar, 
> cglib-nodep-2.1.jar, cglib-nodep-3.2.12.jar
> 
> But they always give me one of the above errors.
> 
> The other Hibernate related jars under WEB-INF/lib are:
> ehcache-1.1.jar, ehcache-core-2.4.8.jar, hibernate3.jar(3.1.0)
> 
> If I start the Tomcat server locally in my Eclipse project , there is 
> no such errors. Can anybody help? Thanks

Those are lots of different arbitrary versions of the same library. Do you know 
which one your application actually requires?

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl02AtEACgkQHPApP6U8
pFiFNA//YwVQFO76x4PzASXTxOFNWsT8e/PgUEGPqawSPyPMjGvxgXiptILR7PlQ
CfwuzUz3s7lTI7voahzH7MF4lK1jTMjVYGwgXOeOSB0YwqaY78/TW2T0hgCK1MpZ
OMzKI4F8laLCjordQnv8z+wN4ckXO9eISHoPv210MtIjUuStJzBv1Vcnpcb1BcHs
lXw2ilMhF1PgDf3sSnRBB6+ANBSroy4yBRo4sQV+0hdF2rnhAn/meZdze/HVPWMQ
yKfNM4VcoG4EVydcs39qPAI+83ofACgQL7STF4iWKguNDJJfYk9gA9UkVXUD7YHc
uWjfEyd9qThV5q6+LdFygRCzusgXSS2MuU0L43Jl9yTO88bqKJ3nhO9g95g3g247
0oEiH/DmDNK7YWIlgUA1BJWfCbwJ/9RdTdpZivoPJpPYec1cg3dj1vWqTWBhRzeX
N29zhEvIcKaG+daHgkxvujfgRUWB8gCCsLU7szROM2e8A+3BWPA0XHjXm3fAsNnh
KLnGT7RlXJD30UM8E3okbfu2sWWl59P0cjVvXNsgKgFriiAk2No83ROUQIBGVFsQ
sVmtsjnga35QlPtAPa7yDdvZsYNlQRsr+ggbFu8aopHJ9MCFUVR9z3cU2Rne+NKH
wZ4JHm2dRHxgCONWwqnGyPFGf5/6eevqkJsuIg4XKu/YDyFcxns=
=5U3Y
-END PGP SIGNATURE-

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



Re: cglib jars always give errors with different versions when start Tomcat 9.0.13

2019-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Gary,

On 7/22/19 11:03, Hua, Gary - Saint Louis, MO - Contractor wrote:
> All:
> 
> I deployed a web application to the Tomcat 9.0.13 server, under the
> WEB-INF/lib there are Hibernate related jar files. When I start the
> server, it give me errors in many Hibernate mapping classes:
> 
> 1991 [main] ERROR proxy.BasicLazyInitializer  - CGLIB Enhancement
> failed: com.usps.nom.tops.model.impl.ComputedHardCloseoutImpl 
> java.lang.NoClassDefFoundError: Could not initialize class
> net.sf.cglib.proxy.Enhancer at
> org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInit
ializer.java:116)
>
> 
at
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.
java:41)
> 
> The original Cglib version is cglib-2.1.jar, and I try the latest
> cglib-3.2.12.jar, the original error is gone but a different error
> show up:
> 
> 1619 [main] ERROR proxy.BasicLazyInitializer  - CGLIB Enhancement
> failed: com.usps.nom.tops.model.transportation.AplDispatch 
> java.lang.NoClassDefFoundError:
> net.sf.cglib.core.AbstractClassGenerator at
> org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInit
ializer.java:116)
>
> 
at
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.
java:41)
> at
> org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTup
lizer.java:161)
>
> 
> 
> I have tried different versions of Cglib jars file:
> 
> cglib-2.1.jar, cglib-2.1_3.jar, cglib-3.2.1.jar, cglib-3.2.12.jar,
> cglib-nodep-2.1.jar, cglib-nodep-3.2.12.jar
> 
> But they always give me one of the above errors.
> 
> The other Hibernate related jars under WEB-INF/lib are:
> ehcache-1.1.jar, ehcache-core-2.4.8.jar, hibernate3.jar(3.1.0)
> 
> If I start the Tomcat server locally in my Eclipse project , there
> is no such errors. Can anybody help? Thanks

Those are lots of different arbitrary versions of the same library. Do
you know which one your application actually requires?

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl02AtEACgkQHPApP6U8
pFiFNA//YwVQFO76x4PzASXTxOFNWsT8e/PgUEGPqawSPyPMjGvxgXiptILR7PlQ
CfwuzUz3s7lTI7voahzH7MF4lK1jTMjVYGwgXOeOSB0YwqaY78/TW2T0hgCK1MpZ
OMzKI4F8laLCjordQnv8z+wN4ckXO9eISHoPv210MtIjUuStJzBv1Vcnpcb1BcHs
lXw2ilMhF1PgDf3sSnRBB6+ANBSroy4yBRo4sQV+0hdF2rnhAn/meZdze/HVPWMQ
yKfNM4VcoG4EVydcs39qPAI+83ofACgQL7STF4iWKguNDJJfYk9gA9UkVXUD7YHc
uWjfEyd9qThV5q6+LdFygRCzusgXSS2MuU0L43Jl9yTO88bqKJ3nhO9g95g3g247
0oEiH/DmDNK7YWIlgUA1BJWfCbwJ/9RdTdpZivoPJpPYec1cg3dj1vWqTWBhRzeX
N29zhEvIcKaG+daHgkxvujfgRUWB8gCCsLU7szROM2e8A+3BWPA0XHjXm3fAsNnh
KLnGT7RlXJD30UM8E3okbfu2sWWl59P0cjVvXNsgKgFriiAk2No83ROUQIBGVFsQ
sVmtsjnga35QlPtAPa7yDdvZsYNlQRsr+ggbFu8aopHJ9MCFUVR9z3cU2Rne+NKH
wZ4JHm2dRHxgCONWwqnGyPFGf5/6eevqkJsuIg4XKu/YDyFcxns=
=5U3Y
-END PGP SIGNATURE-

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



Re: How to restrict the AWS ELB IP url acceess from tomcat

2019-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Naga,

On 7/21/19 13:00, Naga Ramesh wrote:
> We have configured the tomcat8 version with AWS ELB and mapped to
> specific domain name. but url accessing with ELB ip's also.
> 
> So we need to restrict the url access with IP, please let us know
> what are all the configurations changes needed on tomcat end.

Can you ask this in a different way? I can't understand what you are
asking.

Are you trying to limit the IP addresses which can reach Tomcat? Are
you trying to change the URL that users use to access Tomcat?

Maybe show us what you want to do and how it fails to work as expected
when you try it.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl02BDgACgkQHPApP6U8
pFi47hAAm+c8UpjJvG6q6KZ043yuVdNGXjWDzUiwD62JCVaJYgvEqZBy9VM/NWOK
0Gu8/fn6dN5D1eV5kqwBMybf9N7K+dFNheOreodH3FY6FUxKCKmXZK+gcgUQthDR
OvDr1SmI9Gfk7dWJfKLi1reCIMFjZO/jPOHXli+Fc6sZncyOEAH6JJvUEk9mtHHo
owMEjmOWjUdjywvcF/Dga3jz+Mrb7skxuFDi+Dz9MiguaKLndKBK0vlNwMgIYske
oMci8oGVumzPeNBIVxotbtzL7+9nvd14x87ELfTYkFdx8RP9iRJnyaSj6xfAWJFk
bzwPRCNZRtmrmo+MigYLafILrcOqSfK3rrX8EZYt0CDxu5F7AYLXFuAgdw+SBrUy
js5h6eahQUjp5GgJBgqyRG+9y2eRQ5q8vpyKFYzMQiVLBplHRvJ/tr0pXnJohVIQ
6XBuD3uBnxpt9QaK+9tFA6ZCPJsR3l3qQNYCmBjVhypjTtgrhdG8ynOF2RqLbPiO
mIXY60OHDQbVNkOQ3df6PwjdDtbZUQMyPFovwf8lf8X6Bc4hNoip/BpAiN83RzuM
rXLDsBQsvHs34H4V47i92GvZ/IH6lVDkCUYGoI2u4kpXD4Pdk89NL8/nST7zlFlQ
R1/CmiCaJaEXvrricyeS7BEcV0limoUuNU2QgS6SQwlJxJQMZt0=
=+f1G
-END PGP SIGNATURE-

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



Re: Tomcat 9.0.20 : send email on errors

2019-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Robert,

On 7/22/19 13:37, Robert Hicks wrote:
> Using the default logging (java.util.logging) is it possible to
> have Tomcat itself (not a jsp or servlet) send an email if it is
> unable to log or there are errors in its log files?
> 
> The scenario I am thinking of would be if the logging file system
> is full or unavailable due to other issues.

I don't think JULI can email at all under its normal
deployment/configuration. You will have to add more code/libs just to
get email to work.

As for falling-back to email if "normal" logging fails? You'd probably
have to implement your own component for the logging system to do
that. (I don't know what JULI calls the components that actually e.g.
write to log files -- log4j calls them "Appenders" FWIW.)

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl02A2kACgkQHPApP6U8
pFhyXg/9FnuyhBjtPdENW5d5QYBHGUdS1ZscyhBb//XfY/adkLkklR4pKCA0YGTj
64pCwWEwkQCCg4LHkSTNSkM5VHAc/vqTqfX9s2kiKgHdN7KWJq+Z/vxKokVVBd61
62GpQka+NRPCx+LByqLGpJ+LlsMqd+DKSsKt9e1P875c8HTMtkMwrmUphp7xsD96
vK74wUmTSypWkQIZcw5GwZnrnPL29GLy+sUx7XwkGbDZvs+Vyw9UibsVAbr1YAbw
l0qxq85BPxiqYffm50TgVhUwohrVPd8f/RLKjx5ICHdtFovC4DbpRoIQhEEbNDgR
+VYSPPQLefohe94ffedG7BmZ+HdCCD5IBpi0mUq56lRCE56XVm1+1VUv2RAOerhB
zn6xslaLt5YSIzbnRTiNLQi08odBUmxOZ+5NbG6BlaCzOkjb6/ruRAq7XB9yMElI
c+WV54DF7fiejToIIWey9Ky7/uBvFsuvj8lqxIfNT5jzvs/X+ma5wIWnKBJ2gTcV
FmqNeINUUBnT9SVNm1wKNA809bpwOglmPHOeGwvfALqW8MX7Puqj0X4wjqle4+P1
TwtMjKowt2NTmzpMO+ho2nNP3/OTF5ufP07S92OkHXujsn6K54hduQwqhwB5eCjA
k1IP2SRi91HGhc/CDk+Oq6m2rQQSVvcTggyhiog655QIy51EJF0=
=Wa6H
-END PGP SIGNATURE-

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



Tomcat 9.0.20 : send email on errors

2019-07-22 Thread Robert Hicks
Using the default logging (java.util.logging) is it possible to have Tomcat
itself (not a jsp or servlet) send an email if it is unable to log or there
are errors in its log files?

The scenario I am thinking of would be if the logging file system is full
or unavailable due to other issues.

Thanks,

Bob


cglib jars always give errors with different versions when start Tomcat 9.0.13

2019-07-22 Thread Hua, Gary - Saint Louis, MO - Contractor
All:

I deployed a web application to the Tomcat 9.0.13 server, under the 
WEB-INF/lib there are Hibernate related jar files. When I start the server, it 
give me errors in many Hibernate mapping classes:

1991 [main] ERROR proxy.BasicLazyInitializer  - CGLIB Enhancement failed: 
com.usps.nom.tops.model.impl.ComputedHardCloseoutImpl
java.lang.NoClassDefFoundError: Could not initialize class 
net.sf.cglib.proxy.Enhancer
at 
org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
at 
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)

The original Cglib version is cglib-2.1.jar, and I try the latest 
cglib-3.2.12.jar, the original error is gone but a different error show up:

1619 [main] ERROR proxy.BasicLazyInitializer  - CGLIB Enhancement failed: 
com.usps.nom.tops.model.transportation.AplDispatch
java.lang.NoClassDefFoundError: net.sf.cglib.core.AbstractClassGenerator
at 
org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
at 
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
at 
org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)


I have tried different versions of Cglib jars file:

cglib-2.1.jar, cglib-2.1_3.jar, cglib-3.2.1.jar, cglib-3.2.12.jar, 
cglib-nodep-2.1.jar, cglib-nodep-3.2.12.jar

But they always give me one of the above errors.

The other Hibernate related jars under WEB-INF/lib are: ehcache-1.1.jar, 
ehcache-core-2.4.8.jar, hibernate3.jar(3.1.0)

If I start the Tomcat server locally in my Eclipse project , there is no such 
errors. Can anybody help? Thanks


 Gary Hua
 USPS - St. Louis - TOPS Team
 Phone: 314-923-2522
 E-Mail: gary@usps.gov



RE: [EXTERNAL] Re: WAR file not deploying correctly

2019-07-22 Thread Victor Willart (NOVOTEK Benelux)


> -Original Message-
> From: André Warnier (tomcat) 
> Sent: Monday, July 22, 2019 12:26
> To: users@tomcat.apache.org
> Subject: [EXTERNAL] Re: WAR file not deploying correctly
> 
> On 22.07.2019 10:27, Victor WILLART wrote:
> > Hi,
> >
> >
> > Thanks for your answers. I am sorry I can't use the prefix indentation for
> replies yet. Next time I am going to use it with my other mail addresses with
> which I just subscribed !
> >
> >
> > @André
> >
> > I am not sure for the platform I am using, maybe you mean Polymer ?
> 
> I mean Windows, Linux, ..  (OS)
> 

Windows 64 bits

> >
> >
> > @Konstantin
> >
> > My back up files are not in any folders from Tomcat.
> >
> >
> > @Christopher
> >
> > This command is really handy, I didn't know about it. But It' returning the
> entire structure of my app folder so I think my WAR file is good, at least it
> isn't empty.
> >
> >
> > Below are the logs I found in Catalina.2019-07-22.log
> >
> > I am not sure if everything is related to my problem, but the first lines 
> > seem
> to be struggling with this config folder ...
> >
> >
> > ---
> >
> > 22-Jul-2019 09:36:31.598 SEVERE
> > [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> > org.apache.catalina.startup.ExpandWar.deleteDir [C:\Program
> > Files\Apache Software Foundation\Tomcat
> > 8.0\webapps\ProductionMetricsApp-0.3.0\config] could not be completely
> > deleted. The presence of the remaining files may cause problems
> > 22-Jul-2019 09:36:31.598 SEVERE
> > [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> > org.apache.catalina.startup.ExpandWar.deleteDir [C:\Program
> > Files\Apache Software Foundation\Tomcat
> > 8.0\webapps\ProductionMetricsApp-0.3.0] could not be completely
> > deleted. The presence of the remaining files may cause problems
> > 22-Jul-2019 09:36:31.599 SEVERE
> > [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> > org.apache.catalina.startup.ExpandWar.delete [C:\Program Files\Apache
> > Software Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0]
> > could not be completely deleted. The presence of the remaining files
> > may cause problems
> > 22-Jul-2019 09:36:31.623 SEVERE [localhost-startStop-2]
> org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial
> connections of pool.
> >   java.sql.SQLException: Unable to load class:
> com.microsoft.sqlserver.jdbc.SQLServerDriver from
> ClassLoader:java.net.URLClassLoader@72ea2f77;ClassLoader:WebappClassLo
> ader
> >context: ProductionMetricsApp-0.3.0
> >delegate: false
> > --> Parent Classloader:
> > java.net.URLClassLoader@72ea2f77
> >   at
> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(Pooled
> Connection.java:280)
> >   at
> org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.
> java:200)
> >   at
> org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(Connection
> Pool.java:708)
> >   at
> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(Connectio
> nPool.java:642)
> >   at
> org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:464)
> >   at
> org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:14
> 1)
> >   at
> org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProx
> y.java:115)
> >   at
> org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.
> java:102)
> >   at
> com.GEDIGAPP.EncryptedDataSourceFactory.createDataSource(EncryptedD
> ataSourceFactory.java:50)
> >   at
> org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSou
> rceFactory.java:241)
> >   at
> org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java
> :94)
> >   at javax.naming.spi.NamingManager.getObjectInstance(Unknown
> Source)
> >   at org.apache.naming.NamingContext.lookup(NamingContext.java:841)
> >   at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> >   at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
> >   at org.apache.naming.NamingContext.lookup(NamingContext.java:166)
> >   at
> org.apache.catalina.core.NamingContextListener.addResource(NamingCont
> extListener.java:1084)
> >   at
> org.apache.catalina.core.NamingContextListener.createNamingContext(Na
> mingContextListener.java:663)
> >   at
> org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingCont
> extListener.java:256)
> >   at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.
> java:95)
> >   at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:9
> 0)
> >   at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.jav
> a:5154)
> >   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >   at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :725)
> >   at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
> >   at
> 

Re: WAR file not deploying correctly

2019-07-22 Thread tomcat

On 22.07.2019 10:27, Victor WILLART wrote:

Hi,


Thanks for your answers. I am sorry I can't use the prefix indentation for 
replies yet. Next time I am going to use it with my other mail addresses with 
which I just subscribed !


@André

I am not sure for the platform I am using, maybe you mean Polymer ?


I mean Windows, Linux, ..  (OS)




@Konstantin

My back up files are not in any folders from Tomcat.


@Christopher

This command is really handy, I didn't know about it. But It' returning the 
entire structure of my app folder so I think my WAR file is good, at least it 
isn't empty.


Below are the logs I found in Catalina.2019-07-22.log

I am not sure if everything is related to my problem, but the first lines seem 
to be struggling with this config folder ...


---

22-Jul-2019 09:36:31.598 SEVERE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.startup.ExpandWar.deleteDir [C:\Program Files\Apache 
Software Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0\config] could 
not be completely deleted. The presence of the remaining files may cause 
problems
22-Jul-2019 09:36:31.598 SEVERE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.startup.ExpandWar.deleteDir [C:\Program Files\Apache 
Software Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0] could not be 
completely deleted. The presence of the remaining files may cause problems
22-Jul-2019 09:36:31.599 SEVERE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.startup.ExpandWar.delete [C:\Program Files\Apache Software 
Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0] could not be 
completely deleted. The presence of the remaining files may cause problems
22-Jul-2019 09:36:31.623 SEVERE [localhost-startStop-2] 
org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial 
connections of pool.
  java.sql.SQLException: Unable to load class: 
com.microsoft.sqlserver.jdbc.SQLServerDriver from 
ClassLoader:java.net.URLClassLoader@72ea2f77;ClassLoader:WebappClassLoader
   context: ProductionMetricsApp-0.3.0
   delegate: false
--> Parent Classloader:
java.net.URLClassLoader@72ea2f77
  at 
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:280)
  at 
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)
  at 
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:708)
  at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:642)
  at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:464)
  at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:141)
  at 
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115)
  at 
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102)
  at 
com.GEDIGAPP.EncryptedDataSourceFactory.createDataSource(EncryptedDataSourceFactory.java:50)
  at 
org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:241)
  at 
org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:94)
  at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:841)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:166)
  at 
org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1084)
  at 
org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:663)
  at 
org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:256)
  at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
  at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
  at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1795)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Unable to load class: 

RE: WAR file not deploying correctly

2019-07-22 Thread Victor WILLART
Hi,


Thanks for your answers. I am sorry I can't use the prefix indentation for 
replies yet. Next time I am going to use it with my other mail addresses with 
which I just subscribed !


@André

I am not sure for the platform I am using, maybe you mean Polymer ?


@Konstantin

My back up files are not in any folders from Tomcat.


@Christopher

This command is really handy, I didn't know about it. But It' returning the 
entire structure of my app folder so I think my WAR file is good, at least it 
isn't empty.


Below are the logs I found in Catalina.2019-07-22.log

I am not sure if everything is related to my problem, but the first lines seem 
to be struggling with this config folder ...


---

22-Jul-2019 09:36:31.598 SEVERE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.startup.ExpandWar.deleteDir [C:\Program Files\Apache 
Software Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0\config] could 
not be completely deleted. The presence of the remaining files may cause 
problems
22-Jul-2019 09:36:31.598 SEVERE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.startup.ExpandWar.deleteDir [C:\Program Files\Apache 
Software Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0] could not be 
completely deleted. The presence of the remaining files may cause problems
22-Jul-2019 09:36:31.599 SEVERE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.startup.ExpandWar.delete [C:\Program Files\Apache Software 
Foundation\Tomcat 8.0\webapps\ProductionMetricsApp-0.3.0] could not be 
completely deleted. The presence of the remaining files may cause problems
22-Jul-2019 09:36:31.623 SEVERE [localhost-startStop-2] 
org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial 
connections of pool.
 java.sql.SQLException: Unable to load class: 
com.microsoft.sqlserver.jdbc.SQLServerDriver from 
ClassLoader:java.net.URLClassLoader@72ea2f77;ClassLoader:WebappClassLoader
  context: ProductionMetricsApp-0.3.0
  delegate: false
--> Parent Classloader:
java.net.URLClassLoader@72ea2f77
 at 
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:280)
 at 
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)
 at 
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:708)
 at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:642)
 at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:464)
 at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:141)
 at 
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115)
 at 
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102)
 at 
com.GEDIGAPP.EncryptedDataSourceFactory.createDataSource(EncryptedDataSourceFactory.java:50)
 at 
org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:241)
 at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:94)
 at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:841)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:166)
 at 
org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1084)
 at 
org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:663)
 at 
org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:256)
 at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
 at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
 at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
 at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1795)
 at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Unable to load class: 
com.microsoft.sqlserver.jdbc.SQLServerDriver from 
ClassLoader:java.net.URLClassLoader@72ea2f77;ClassLoader:WebappClassLoader