Willem Jiang created SMX4-1140:
----------------------------------

             Summary: Hadoop-core bundle throws nosuchelement exception.
                 Key: SMX4-1140
                 URL: https://issues.apache.org/jira/browse/SMX4-1140
             Project: ServiceMix 4
          Issue Type: Improvement
          Components: Bundles
         Environment: Apache Karaf 2.2.7, Camel 2.10-SNAPSHOT
            Reporter: Willem Jiang
            Assignee: Willem Jiang
             Fix For: 4.4.2


We using the hadoop-core bundle with camel-hdfs within Apache Karaf. You will 
get this exception.
{code}
 Exception in thread "SpringOsgiExtenderThread-16" 
org.apache.camel.FailedToCreateProducerException: Failed to create Producer for 
endpoint: 
Endpoint[hdfs://localhost/tmp/simple-file?splitStrategy=IDLE%3A1000%2CBYTES%3A5].
 Reason: java.util.NoSuchElementException
at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:380)
at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:107)
at org.apache.camel.impl.ProducerCache.startProducer(ProducerCache.java:138)
at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:163)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:70)
at 
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:70)
at 
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at 
org.apache.camel.processor.interceptor.TraceInterceptor.doStart(TraceInterceptor.java:444)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:70)
at 
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:70)
at 
org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:983)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:70)
at org.apache.camel.processor.DefaultChannel.doStart(DefaultChannel.java:150)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:82)
at 
org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:927)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:70)
at 
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:70)
at 
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:77)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.impl.RouteService.startChildService(RouteService.java:248)
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:142)
at 
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1871)
at 
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1799)
at 
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1584)
at 
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1472)
at 
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1356)
at 
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:169)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at 
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1324)
at 
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:213)
at 
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:108)
at 
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:240)
at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at 
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
at 
org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at 
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at 
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at 
org.apache.hadoop.security.UserGroupInformation.<init>(UserGroupInformation.java:374)
at 
org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:395)
at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1418)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1319)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:226)
at org.apache.camel.component.hdfs.HdfsInfo.<init>(HdfsInfo.java:34)
at 
org.apache.camel.component.hdfs.HdfsOutputStream.createOutputStream(HdfsOutputStream.java:48)
at org.apache.camel.component.hdfs.HdfsProducer.doStart(HdfsProducer.java:93)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:378)
... 70 more

{code}

As karaf provides the Subject information by default, we need to make sure 
hadoop can get the User.class information first.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to