我试过this,但我收到此错误
XmlBeanDefinitionStoreException: Line 67 in XML document from file [C:\pentaho2
biserver-ce\pentaho-solutions\system\pentahoObjects.spring.xml] is invalid; nes
ed exception is org.xml.sax.SAXParseException; lineNumber: 67; columnNumber: 50
The value of attribute "value" associated with an element type "property" must
not contain the '<' character.
抱怨<property name="datasourceNameFormat" value="<![CDATA[{0}-{1}]]>
有关导致此错误的原因的任何想法,或者是否有其他方法可以执行此操作 感谢
答案 0 :(得分:1)
我不确定你的方式,但有可能有动态的jndi。你可以在xaction中使用jndi变量,并且可以在xaction中使用它来区分目标数据库。
<inputs>
<JNDDDI type="string">
<sources>
<request>JNDDDI</request>
</sources>
<default-value><![CDATA[jndi_database1]]></default-value>
</JNDDDI>
...
<action-definition>
<component-name>SQLLookupRule</component-name>
<action-type>hourly</action-type>
<action-inputs>
<JNDDDI type="string"/>
</action-inputs>
<action-outputs>
<prepared_component type="sql-query"/>
</action-outputs>
<component-definition>
<jndi>{JNDDDI}</jndi>
<query><![CDATA[select ...from ...]]></query>
<live><![CDATA[true]]></live>
</component-definition>
如果你使用JasperReport组件也一样。