使用表达式 get-property 时 WSO2 Developer Studio (3.7.1) 错误 [英] WSO2 Developer Studio (3.7.1) error when using expression get-property

查看:23
本文介绍了使用表达式 get-property 时 WSO2 Developer Studio (3.7.1) 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've been trying use Developer Studio to get a PayloadFactory Mediator to populate an argument from an expression get-property('PropertyName').

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

When I try to switch from Design to Source view, I get the following error:

无法更新源视图.已检测到以下错误.详情请查看错误日志.

Cannot update source view. The following error(s) have been detected. Please see the error log for more details.

原因:XPathFactory#newInstance() 未能为默认对象模型: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:非法的配置文件语法

Reason: XPathFactory#newInstance()failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: bundleresource://1009.fwk1013423070:21/META-INF/services/java.xml.xpath.XPathFactory2: Illegal configuration-file syntax

但是,如果我直接在运行的 ESB 上编辑 PayloadFactory,如下所示,它可以正常工作.

However if I edit the PayloadFactory directly on the running ESB as follows, it works fine.

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

推荐答案

当我输入这个问题时,我发现了答案.我想我会在这里发布它以使其可供其他人搜索,因为此处 wso2 的问答比率低于可行社区所需的比率.

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.

当我设置系统学习 wso2 时,我从安装 Java 8 开始,因为 Java 网站表明 Java 7 正在被强制替换.安装并运行 wso2 ESB 后,我注意到不支持 Java 8 的警告.然后我安装了 Java 7 并进行了(我认为的)必要的更改,以将所有基于 wso2 的东西都指向使用 Java 7.结果是正在运行的 ESB 已成功切换到 Java 7,但 Developer Studio 却没有.

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.

我最终不得不从系统中删除所有版本的 Java 并仅重新安装 Java 7.之后,Developer Studio 对 XPath 表达式没有任何问题.

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.

这篇关于使用表达式 get-property 时 WSO2 Developer Studio (3.7.1) 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆