1

我一直在尝试使用 Developer Studio 来获取 PayloadFactory Mediator,以从表达式 get-property('PropertyName') 填充参数。

当我尝试从“设计”视图切换到“源代码”视图时,出现以下错误:

无法更新源视图。已检测到以下错误。有关详细信息,请参阅错误日志。

原因:XPathFactory#newInstance() 无法为默认对象模型创建 XPathFactory:http: //java.sun.com/jaxp/xpath/dom并出现 XPathFactoryConfigurationException: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory :bundleresource://1009.fwk1013423070:21/META-INF/services/java.xml.xpath.XPathFactory2:非法配置文件语法

但是,如果我按如下方式在运行的 ESB 上直接编辑 PayloadFactory,它可以正常工作。

   <args>
      <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('PropertyName')" evaluator="xml"></arg>
   </args>
4

1 回答 1

2

As I was typing up this question, I came across the answer. I figured I would post it here to make it searchable for others since the question to answer ratio on here for wso2 is lower than it needs to be for a viable community.

When I was setting up the system to learn wso2, I started out by installing Java 8 since the java web site indicated that Java 7 was being force replaced. After installing and running the wso2 ESB, I noticed a warning that Java 8 was not supported. I then installed Java 7 and made the (I thought) necessary changes to point everything wso2 based to use Java 7. It turned out that the running ESB had successfully switched to Java 7, but Developer Studio had not.

I ended up having to remove all versions of Java from the system and re-install only Java 7. After that, Developer Studio had no issues with the XPath expression.

于 2015-02-24T16:46:42.750 回答