spring hadoop : unable to set the configuration getting Found ambiguous parameter type

2014-10-22T02:22:28

I was trying to create a util class for performing Hadoop copy in Spring XD, I defined configuration as below

<int:channel id="input"/>
<int:service-activator input-channel="input" ref="utilhandler" />
<bean id="utilhandler" class="com.test.hadoop.HadoopUtil"/>
<hdp:configuration  register-url-handler="false" properties-location="${xd.config.home}/hadoop.properties" >
    fs.defaultFS=${fsUri}

</hdp:configuration>
</beans> 

below is the snippet bean class import org.apache.hadoop.conf.Configuration; public class HadoopUtil implements InitializingBean{

      private String destinationDir;
private FsShell shell;
      @Autowired
private Configuration configuration;
public Configuration getHadoopConfiguration()
{
    return configuration;
}

when I execute, I am getting below exception

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.ServiceActivatorFactor
yBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Found ambiguous parameter type [class java.lan
g.Void] for method match: [public org.apache.hadoop.conf.Configuration com.test.hadoop.HadoopUtil.getHadoopConfiguration(), public void com.test.hadoop.HadoopUtil.setConfiguration(org.apache.hadoop.conf.Configuration)]
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)

Please help

Copyright License:
Author:「chandra」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/26493588/spring-hadoop-unable-to-set-the-configuration-getting-found-ambiguous-paramete

About “spring hadoop : unable to set the configuration getting Found ambiguous parameter type” questions

I was trying to create a util class for performing Hadoop copy in Spring XD, I defined configuration as below &lt;int:channel id="input"/&gt; &lt;int:service-activator input-channel="input" ref="
I am trying to configure beans for Hadoop/Hive environment. According to documentation I need Apache Hadoop Configuration class, which should be autowired. See: http://docs.spring.io/spring-hadoop/...
I'm using Project Reactor with Spring Integration to read from Kafka and write to MongoDB, and I the Kafka consume works well, but the .handle(MongoDb.reactiveOutboundChannelAdapter(mongoFactory)) ...
I'm using Hadoop 1.2.1 and Spring Hadoop 1.0.2 I wanted to check the Spring autowiring in a Hadoop Mapper. I wrote this configuration file: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans .
I want to enable Hive in my Spring Hadoop project. I understand that we can't use JavaConfiguration so I am using XML. I have an error regarding the Spring Namespace. Error starting
What is the current state of JavaConfig support? As I see it's possible to set up Hadoop configuration this way: http://docs.spring.io/spring-hadoop/docs/2.2.0.RELEASE/reference/html/springandhadoop-
I'm looking to use spring for apache hadoop and spring MVC to write a servlet that interacts with hadoop. Since hadoop-core has dependencies on jetty and tomcat I needed to exclude them as outline...
In the Hadoop CLI, there is a --config parameter that I can set in order to overwrite the default configuration directory. I was wondering if there is some attribute in the Configuration object (or
Trying to turn Spring Integration xml config into Java config. This is the xml config: https://github.com/spring-projects/spring-integration-samples/blob/master/basic/tcp-client-server/src/main/res...
I am new to spring integration dsl . As part of learning i converted one XML based to Java DSL configuration Here is the link for xml configuration. https://dzone.com/articles/spring-integration-

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.