You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Berg, R. van den (Robin)" <Ro...@ing.nl.INVALID> on 2016/12/07 09:01:46 UTC

Migration to Tomcat 8.0 Post/PreResources vs VirtualWebappLoader with optional resources

Hello!
I have an issue that seems not supported anymore with Tomcat 8.
The same problem is also posted in the comments on: https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html

PROBLEM:
We used the virtualWebAppLoader to get some extra libraries and classes that were on the machine on the classloader.
The virtualClasspath-property of the virtualWebAppLoader was a ';'-seperated list of directories. If one of them was empty, that was not a problem.
We used the fact that non-existing/empty directories were not loaded, without any exception. MQ were imported on
Test-acceptance-production. However, in a local/dev-setup we do not provide these libraries, since MQ-services are stubbed out.

We used the {Jar|File|Dir}ResourceSet in the context.xml as replacement for the virtualWebAppLoader, as recommended by the migration guide.
However, these fail when the base-property is non-existent. Therefore, it breaks dev/local.

In the comments in https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html a solution was posted to extend the {Jar|File|Dir}ResourceSet.
However, that solution won't work for us, since we can't provide the tomcat-instances on test-acc-prd with an extra class/library with the extended class. (access-rights/cloud-solution only allows default setup).

PREFERRRED SOLUTION:
Just like the tomcat 7  virtualWebAppLoader we would like the ResourceSet to be optional/non-failing if the resource is not available. Is there any configuration/property I can use to do that?

Thanks,
Kind Regards,

----------------------------------------------------------------
ATTENTION:
The information in this e-mail is confidential and only meant for the intended recipient. If you are not the intended recipient, don't use or disclose it in any way. Please let the sender know and delete the message immediately.
------------------------------------------------------------------------------------------------------

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


RE: Migration to Tomcat 8.0 Post/PreResources vs VirtualWebappLoader with optional resources

Posted by "Berg, R. van den (Robin)" <Ro...@ing.nl.INVALID>.
Hi,

No. For the record: I didn't posted the issue on  https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html. I merely stumbled upon somebody having the same issue. I wanted to file an enhancement request. But, as also noted by the "what to do before posting a bug/enhancement"-page, I wanted to be 
sure there is no solution to this problem yet. 
I was interested whether this was already fixed perhaps, even though I couldn't find anything.
Also, maybe somebody knows a 'workaround', which would me because I don't have time to wait for the enhancement. Furthermore, I can't even use the 
newest version, unfortunately. That depends on the PAAS party.

Kind Regards,

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Wednesday, December 07, 2016 10:58 PM
To: Tomcat Users List <us...@tomcat.apache.org>
Subject: Re: Migration to Tomcat 8.0 Post/PreResources vs VirtualWebappLoader with optional resources

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Robin,

On 12/7/16 4:01 AM, Berg, R. van den (Robin) wrote:
> Hello! I have an issue that seems not supported anymore with Tomcat 8. 
> The same problem is also posted in the comments on:
> https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html
> 
> PROBLEM: We used the virtualWebAppLoader to get some extra libraries 
> and classes that were on the machine on the classloader.
> The virtualClasspath-property of the virtualWebAppLoader was a 
> ';'-seperated list of directories. If one of them was empty, that was 
> not a problem. We used the fact that non-existing/empty directories 
> were not loaded, without any exception. MQ were imported on 
> Test-acceptance-production. However, in a local/dev-setup we do not 
> provide these libraries, since MQ-services are stubbed out.
> 
> We used the {Jar|File|Dir}ResourceSet in the context.xml as 
> replacement for the virtualWebAppLoader, as recommended by the 
> migration guide. However, these fail when the base-property is 
> non-existent. Therefore, it breaks dev/local.
> 
> In the comments in
> https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html a 
> solution was posted to extend the {Jar|File|Dir}ResourceSet.
> However, that solution won't work for us, since we can't provide the 
> tomcat-instances on test-acc-prd with an extra class/library with the 
> extended class. (access-rights/cloud-solution only allows default 
> setup).
> 
> PREFERRRED SOLUTION: Just like the tomcat 7  virtualWebAppLoader we 
> would like the ResourceSet to be optional/non-failing if the resource 
> is not available. Is there any configuration/property I can use to do 
> that?

Did you file an enhancement request as suggested by Konstantin all those months ago?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYSIXzAAoJEBzwKT+lPKRYRlcP/ip62nstdty643NjIdy8ImN4
/lhGdpw9qUfGTDiGF/wtqfOeAcTOIfoH1f0ZmnNaP9lZFMu917IT6Z0y3+fOwwnE
M3GPKBCZTQne3wY2oHqZujv4WVAiYzmcNlPDxeHljxP/aSiAf6DOyaWwGFLlUIml
7RiGBE+oJGQAMhohulPvSlh1ldSAsF637+xJA0O18DpRdSx9ikgDeeodRtA9Ei1d
R8sbZ9atYTqMH9ee4GBkc8yJDfZqf3Fo1FUjKghB3S4M9yxyjKqLqJORrFm4fOLH
PM4Oq7gkLEJNBWhkzABj6ruMw5/PHXrz4BV+K7rapdCSH7Bg5WXASiX0O0Z/rw1G
nVgd4kVwLRqDnRANjyU8+BnzyDq0sQ0Ndp6EZ/Sw4xBnaopQyYX9jsaqkQ8tqSg2
md4LdkX4axn/w0EhnE/XtVLBmmsjC4L7ALuGFleG+Etp2gh3vKE1rmhphwHUqvXX
GEKjR6HnXbCGKwJHkWt9lawpmK8N+VmI9FSbyx0vh4kheMjIUQmkH7uNnJhGOQc4
FO5GrS+zqEJwuDoBVZny2ZjSeOctu5bPJGfwd2nZa0uG8qra6Qhi8RCLSkG2ZPsq
EABJEpoLZMeiB6U6TFNQrxUFUTn1dtLQgQxKdbq8hUxX4n5KMl/12pZNhyapfor4
/PvNObLiXIy6930k/0Ag
=+++8
-----END PGP SIGNATURE-----

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


----------------------------------------------------------------
ATTENTION:
The information in this e-mail is confidential and only meant for the intended recipient. If you are not the intended recipient, don't use or disclose it in any way. Please let the sender know and delete the message immediately.
------------------------------------------------------------------------------------------------------

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


Re: Migration to Tomcat 8.0 Post/PreResources vs VirtualWebappLoader with optional resources

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Robin,

On 12/7/16 4:01 AM, Berg, R. van den (Robin) wrote:
> Hello! I have an issue that seems not supported anymore with Tomcat
> 8. The same problem is also posted in the comments on:
> https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html
> 
> PROBLEM: We used the virtualWebAppLoader to get some extra
> libraries and classes that were on the machine on the classloader. 
> The virtualClasspath-property of the virtualWebAppLoader was a
> ';'-seperated list of directories. If one of them was empty, that
> was not a problem. We used the fact that non-existing/empty
> directories were not loaded, without any exception. MQ were
> imported on Test-acceptance-production. However, in a
> local/dev-setup we do not provide these libraries, since
> MQ-services are stubbed out.
> 
> We used the {Jar|File|Dir}ResourceSet in the context.xml as
> replacement for the virtualWebAppLoader, as recommended by the
> migration guide. However, these fail when the base-property is
> non-existent. Therefore, it breaks dev/local.
> 
> In the comments in
> https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html a
> solution was posted to extend the {Jar|File|Dir}ResourceSet. 
> However, that solution won't work for us, since we can't provide
> the tomcat-instances on test-acc-prd with an extra class/library
> with the extended class. (access-rights/cloud-solution only allows
> default setup).
> 
> PREFERRRED SOLUTION: Just like the tomcat 7  virtualWebAppLoader we
> would like the ResourceSet to be optional/non-failing if the
> resource is not available. Is there any configuration/property I
> can use to do that?

Did you file an enhancement request as suggested by Konstantin all
those months ago?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYSIXzAAoJEBzwKT+lPKRYRlcP/ip62nstdty643NjIdy8ImN4
/lhGdpw9qUfGTDiGF/wtqfOeAcTOIfoH1f0ZmnNaP9lZFMu917IT6Z0y3+fOwwnE
M3GPKBCZTQne3wY2oHqZujv4WVAiYzmcNlPDxeHljxP/aSiAf6DOyaWwGFLlUIml
7RiGBE+oJGQAMhohulPvSlh1ldSAsF637+xJA0O18DpRdSx9ikgDeeodRtA9Ei1d
R8sbZ9atYTqMH9ee4GBkc8yJDfZqf3Fo1FUjKghB3S4M9yxyjKqLqJORrFm4fOLH
PM4Oq7gkLEJNBWhkzABj6ruMw5/PHXrz4BV+K7rapdCSH7Bg5WXASiX0O0Z/rw1G
nVgd4kVwLRqDnRANjyU8+BnzyDq0sQ0Ndp6EZ/Sw4xBnaopQyYX9jsaqkQ8tqSg2
md4LdkX4axn/w0EhnE/XtVLBmmsjC4L7ALuGFleG+Etp2gh3vKE1rmhphwHUqvXX
GEKjR6HnXbCGKwJHkWt9lawpmK8N+VmI9FSbyx0vh4kheMjIUQmkH7uNnJhGOQc4
FO5GrS+zqEJwuDoBVZny2ZjSeOctu5bPJGfwd2nZa0uG8qra6Qhi8RCLSkG2ZPsq
EABJEpoLZMeiB6U6TFNQrxUFUTn1dtLQgQxKdbq8hUxX4n5KMl/12pZNhyapfor4
/PvNObLiXIy6930k/0Ag
=+++8
-----END PGP SIGNATURE-----

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


Re: Migration to Tomcat 8.0 Post/PreResources vs VirtualWebappLoader with optional resources

Posted by Mark Thomas <ma...@apache.org>.
On 07/12/2016 09:01, Berg, R. van den (Robin) wrote:
> Hello!
> I have an issue that seems not supported anymore with Tomcat 8.
> The same problem is also posted in the comments on: https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html
> 
> PROBLEM:
> We used the virtualWebAppLoader to get some extra libraries and classes that were on the machine on the classloader.
> The virtualClasspath-property of the virtualWebAppLoader was a ';'-seperated list of directories. If one of them was empty, that was not a problem.
> We used the fact that non-existing/empty directories were not loaded, without any exception. MQ were imported on
> Test-acceptance-production. However, in a local/dev-setup we do not provide these libraries, since MQ-services are stubbed out.
> 
> We used the {Jar|File|Dir}ResourceSet in the context.xml as replacement for the virtualWebAppLoader, as recommended by the migration guide.
> However, these fail when the base-property is non-existent. Therefore, it breaks dev/local.
> 
> In the comments in https://tomcat.apache.org/tomcat-8.0-doc/config/resources.html a solution was posted to extend the {Jar|File|Dir}ResourceSet.
> However, that solution won't work for us, since we can't provide the tomcat-instances on test-acc-prd with an extra class/library with the extended class. (access-rights/cloud-solution only allows default setup).

Can you not simply create an empty directory in the right place for
dev/local ?

Mark

> 
> PREFERRRED SOLUTION:
> Just like the tomcat 7  virtualWebAppLoader we would like the ResourceSet to be optional/non-failing if the resource is not available. Is there any configuration/property I can use to do that?
> 
> Thanks,
> Kind Regards,
> 
> ----------------------------------------------------------------
> ATTENTION:
> The information in this e-mail is confidential and only meant for the intended recipient. If you are not the intended recipient, don't use or disclose it in any way. Please let the sender know and delete the message immediately.
> ------------------------------------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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