You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Giuseppe Miscione <g....@innovationengineering.eu> on 2013/07/25 10:43:48 UTC
PermissionGatherer misses an Error
Hi all,
I'm using Spring 3.1.2.RELEASE togheter with Quartz 2.2.0 inside
Clerezza and when I start the system I get an annoying exception in
console saying that
org.springframework.scheduling.quartz.CronTriggerBean has an invalid
class hierarchy.
The thing is annoying because I'm not using this class (which, as stated
in its description, it isn't compatible with Quartz 2.x) but the
permissiondescriptions module scans every class in every bundle
searching for Permission classes. The exception is thrown by the
registerPermissions method of
org.apache.clerezza.permissiondescriptions.PermissionGatherer class,
more specifically by the line:
Class<?> clazz = bundle.loadClass(className);
when className is equal to
org.springframework.scheduling.quartz.CronTriggerBean.
This block of code is already wrapped in a sinking try-catch block, but
this block catches only Exception and NoClassDefFoundError errors.
May I suggest to replace the two catches with a more general
try {
...
}
catch(Throwable t){}
that will swallow every problem during this particular bundle analysis
phase?
Regards,
Giuseppe
Re: PermissionGatherer misses an Error
Posted by Reto Bachmann-Gmür <re...@wymiwyg.com>.
Hi Giuseppe
Thanks for reporting this and your solution suggestion. I've created
and resolved CLEREZZA-806.
Cheers,
Reto
On Thu, Jul 25, 2013 at 10:43 AM, Giuseppe Miscione
<g....@innovationengineering.eu> wrote:
> Hi all,
> I'm using Spring 3.1.2.RELEASE togheter with Quartz 2.2.0 inside Clerezza
> and when I start the system I get an annoying exception in console saying
> that org.springframework.scheduling.quartz.CronTriggerBean has an invalid
> class hierarchy.
> The thing is annoying because I'm not using this class (which, as stated in
> its description, it isn't compatible with Quartz 2.x) but the
> permissiondescriptions module scans every class in every bundle searching
> for Permission classes. The exception is thrown by the registerPermissions
> method of org.apache.clerezza.permissiondescriptions.PermissionGatherer
> class, more specifically by the line:
>
> Class<?> clazz = bundle.loadClass(className);
>
> when className is equal to
> org.springframework.scheduling.quartz.CronTriggerBean.
> This block of code is already wrapped in a sinking try-catch block, but this
> block catches only Exception and NoClassDefFoundError errors.
> May I suggest to replace the two catches with a more general
>
> try {
> ...
> }
> catch(Throwable t){}
>
> that will swallow every problem during this particular bundle analysis
> phase?
>
> Regards,
> Giuseppe