Announcement Announcement Module
No announcement yet.
Corrupt CachedIntrospectionResults-entries Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Corrupt CachedIntrospectionResults-entries

    After upgrading from Glassfish 3.0.1 to Glassfish 3.1.2, we are experiencing problems with NotReadablePropertyException occuring at seemingly random times (I suspect that it happens the first time the class is being used, but I'm not really sure.) Using spring 3.1.0.RELEASE.

    I did some debugging to investigate, and found the following:

    The method call for getting the properties of a bean ends up in BeanWrapperImpl, usually this method:

           private CachedIntrospectionResults getCachedIntrospectionResults() {
    		Assert.state(this.object != null, "BeanWrapper does not hold a bean instance");
    		if (this.cachedIntrospectionResults == null) {
    			this.cachedIntrospectionResults = CachedIntrospectionResults.forClass(getWrappedClass());
    		return this.cachedIntrospectionResults;
    Here, the cachedIntrospectionResults are usually null, but I think it might have had a value sometimes as well. Anyways, when the cachedIntrospectionResults are null, then this method is called (I'll omit the details):
    	static CachedIntrospectionResults forClass(Class beanClass) throws BeansException {
    		CachedIntrospectionResults results;
    		Object value = classCache.get(beanClass);
                    //Find the type of 'value', cast and put in variable 'results'
    		if (results == null) {
                    //create new CachedIntrospectionResults for the class, put into classCache and return it.
    Now here's what I've found during debugging session:

    What is being found in classCache is not correct! The classCache entry for the bean in question contains only a subset of the properties of the bean. When I use the debugger to remove the entry from classCache, forcing it to recreated the CachedIntrospectionResults, it comes out correctly, with all properties present.

    So, either the CachedIntrospectionResults are sometimes created erroneously (I have not seen it happen when creating with debugger), or something happens to corrupt the contents of the cache.

    Does anyone have any clue as to what would cause this?
    Last edited by Tobb; Feb 26th, 2013, 05:15 AM.