问题
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.
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
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>
回答1:
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.
来源:https://stackoverflow.com/questions/28701229/wso2-developer-studio-3-7-1-error-when-using-expression-get-property