[jboss-dev] AbstractTypeMetaData.preinstantiatedLookup() hides exception stacktrace

Galder Zamarreno galder.zamarreno at redhat.com
Mon Feb 11 05:10:48 EST 2008


Ales Justin wrote:
> Don't blame your problems on the stack trace. :-)
> 
> 1st one is obvious, and no stack trace would tell you more.
> The 2nd needs a bit more, probably 3sec of a look at xml. ;-)

Your missing the point. It's not about how easily the exception can be 
resolved. An Exception contains a message and a stacktrace. To log 
Exception information partially is IMO a bad practice.

> 
> Galder Zamarreno wrote:
>> Hi,
>>
>> Just running some tests in trunk and I'm seeing some exceptions 
>> without stacktrace:
>>
>> 2008-02-11 00:54:23,416 WARN 
>> [org.jboss.beans.metadata.plugins.AbstractListMetaData] Exception in 
>> preinstantiated lookup for: 
>> TomcatClusteringEvictionConfig.evictionRegionConfigs, 
>> org.jboss.cache.config.ConfigurationException: 
>> org.jboss.cache.config.ConfigurationException: timeToLiveSeconds must 
>> be configured to a value greater than or equal to 0
>> ....
>>
>> 2008-02-11 00:54:59,867 WARN 
>> [org.jboss.beans.metadata.plugins.AbstractListMetaData] Exception in 
>> preinstantiated lookup for: 
>> EJB3SFSBEvictionConfig.evictionRegionConfigs, 
>> org.jboss.cache.config.ConfigurationException: 
>> java.lang.ClassCastException: 
>> org.jboss.cache.eviction.NullEvictionPolicyConfig
>>
>> Shouldn't AbstractTypeMetaData.preinstantiatedLookup() print the 
>> stacktrace? That would certainly help debugging them :)
>>
>> So, instead of:
>>
>> catch (Throwable t)
>> {
>>   log.warn("Exception in preinstantiated lookup for: " + beanName + 
>> "." + propertyName + ", " + t);
>> }
>>
>> do:
>>
>> catch (Throwable t)
>> {
>>   log.warn("Exception in preinstantiated lookup for: " + beanName + 
>> "." + propertyName, t);
>> }
>>
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development

-- 
Galder Zamarreño
Sr. Software Maintenance Engineer
JBoss, a division of Red Hat



More information about the jboss-development mailing list