[ 
https://issues.apache.org/activemq/browse/AMQ-1229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned AMQ-1229:
--------------------------------

    Assignee:     (was: Claus Ibsen)

Sorry I was looking at CAMEL-1301 that had a link to this one.

> Thread.currentThread().getContextClassLoader() null in 
> FactoryFinder.newInstance
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-1229
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1229
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>            Reporter: John McLeroy
>             Fix For: 5.0.0
>
>         Attachments: FactoryFinder.java
>
>   Original Estimate: 5 minutes
>  Remaining Estimate: 5 minutes
>
> org.apache.activemq.util.FactoryFinder.doFindFactoryProperies() correctly 
> consults the current class's loader if 
> Thread.currentThread().getContextClassLoader() is null:
>         ClassLoader classLoader = 
> Thread.currentThread().getContextClassLoader();
>         if (classLoader == null) classLoader = getClass().getClassLoader();
> newInstance(), however, generates a null pointer exception if 
> Thread.currentThread().getContextClassLoader() is null:
>         Class clazz;
>         try {
>             clazz = 
> Thread.currentThread().getContextClassLoader().loadClass(className);
>         } catch (ClassNotFoundException e) {
>             clazz = FactoryFinder.class.getClassLoader().loadClass(className);
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to