geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Kleineikenscheidt (JIRA)" <j...@apache.org>
Subject [jira] Updated: (XBEAN-39) NPE in XBeanHelper.createBeanDefinitionReader with some Classloaders
Date Thu, 10 Aug 2006 22:12:14 GMT
     [ http://issues.apache.org/jira/browse/XBEAN-39?page=all ]

Stefan Kleineikenscheidt updated XBEAN-39:
------------------------------------------

    Attachment: XBEAN-39.patch

Attached second version of the patch.  As Guillaume suggested, The XBeanHelper tries to load
a Spring 2.0 class.  If that fails, it knows we are on Spring 1.2.x:

    public static XmlBeanDefinitionReader createBeanDefinitionReader(
                    SpringApplicationContext applicationContext,
                    BeanDefinitionRegistry registry,
                    List xmlPreprocessors) {
        
        String version = "2.0";
        
        try {
            Class spring20Clazz = Class.forName("org.springframework.core.AttributeAccessorSupport");
            version = "2.0";
        } catch(ClassNotFoundException e) {
            version = "1.2.8";
        }
        
....

    }
}

> NPE in XBeanHelper.createBeanDefinitionReader with some Classloaders
> --------------------------------------------------------------------
>
>                 Key: XBEAN-39
>                 URL: http://issues.apache.org/jira/browse/XBEAN-39
>             Project: XBean
>          Issue Type: Bug
>    Affects Versions: 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
>            Reporter: Stefan Kleineikenscheidt
>         Attachments: XBEAN-39.patch, XBEAN-39.patch
>
>
> XBean fails on systems with some classloaders, which do not return sensible values from
the following methods
>   pkg.getImplementationVersion();  or
>   cl.getResourceAsStream(name);
> This leads to 
> a) a NPE thrown by SpringVersion.getVersion,
> b) the property files with custom mappings are not found.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message