运行mondrian时,web.xml数据源异常
在mondrian web.xml配置文件中有如下代码:
<param-name>connectString</param-name>
?? ?<param-value>Provider=mondrian;Jdbc=jdbc:mysql://localhost:3307/foodmart?user=root&password=root;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.mysql.jdbc.Driver;</param-value>
</context-param>
在解析时,抛出异常“?The reference to?entity?"password"?must end with the?';' delimiter”
解决:
将&字符需要转义成&因此改成
<param-value>Provider=mondrian;Jdbc=jdbc:mysql://localhost:3307/foodmart?user=root&password=root;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.mysql.jdbc.Driver;</param-value>
就可以了