java.lang.IllegalArgumentException:无法解析占位符' hbase.properties'在字符串值" file:// $ {hbase.properties}"

时间:2016-07-06 19:47:37

标签: java xml hbase spring-data

我遇到了一些麻烦,无法弄清楚原因。我一直在说:

 Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'hbase.properties' in string value "file://${hbase.properties}"

在我的context.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:hdp="http://www.springframework.org/schema/hadoop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd  http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd http://www.springframework.org/schema/context  http://www.springframework.org/schema/context/spring-context.xsd ">


    <context:property-placeholder location="hbase.properties"/>

    <context:component-scan base-package="com.hyatt.rtap.viewer"/>

    <hdp:configuration id="hadoopConfiguration">
        fs.defaultFS=hdfs://localhost:8080
    </hdp:configuration>


    <hdp:hbase-configuration configuration-ref="hadoopConfiguration"  zk-quorum="${hbase.zk.host}" zk-port="${hbase.zk.port}"/>




</beans>

我的hbase.properties如下:

hbase.zk.host=sandbox.hortonworks.com
hbase.zk.port=2181

我无法弄清楚如何解决这个问题。

0 个答案:

没有答案