[ 
http://jira.codehaus.org/browse/JIBX-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski closed JIBX-166.
--------------------------------


> org.jibx.runtime.impl.UnmarshallingContext.createReaderFactory(String) throws 
> NoClassDefFoundError
> --------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-166
>                 URL: http://jira.codehaus.org/browse/JIBX-166
>             Project: JiBX
>          Issue Type: Bug
>          Components: core
>    Affects Versions: JiBX 1.1.3
>         Environment: Java 1.6.0, Jetty 6.1.3, Linux x64
>            Reporter: Paul Ferraro
>            Assignee: Dennis Sosnoski
>            Priority: Critical
>             Fix For: JiBX 1.1.5
>
>
> In the org.jibx.runtime.impl.UnmarshallingContext.createReaderFactory(String) 
> method, if the specified IXMLReaderFactory class name cannot be found in the 
> context class loader of the current thread, JiBX attempts to load the class 
> using the class loader that loaded the UnmarshallingContext class itself via 
> the following code on line 174:
>     loader = UnmarshallingContext.class.getClassLoader()
> However, since the static createReaderFactory(String) method was itself 
> called from a static initializer block within UnmarshallingContext (lines 71, 
> 74, 82), this code will always throw a NoClassDefFoundError, since the 
> UnmarshallingContext class is not yet loaded.  It won't be until the static 
> initializer completes successfully.
> I propose the following simple change to line 174:
>     loader = IUnmarshallingContext.class.getClassLoader();
> We can be certain that this class is already loaded.

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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to