部署适配器时出现内容丢失错误 "JAXRSApplicationClass"?
I am getting content missing error "JAXRSApplicationClass" when deploying adapter?
我遇到了这个错误。
java.lang.RuntimeException: cvc-complex-type.2.4.a: Invalid content
was found starting with element 'JAXRSApplicationClass'. One of
'{runOnNode, debugPort, connectivity}' is expected.
适配器 xml 在这里。
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed Materials - Property of IBM
5725-I43 (C) Copyright IBM Corp. 2011, 2016. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
-->
<mfp:adapter name="CardServices"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mfp="http://www.ibm.com/mfp/integration"
xmlns:http="http://www.ibm.com/mfp/integration/http">
<displayName>CardServices</displayName>
<description>CardServices</description>
<JAXRSApplicationClass>com.slap.bank.ServicesApplication</JAXRSApplicationClass>
<property name="DB_url" displayName="Database URL" defaultValue="jdbc:oracle:thin:@192.168.0.15:1521:xe" />
<property name="DB_username" displayName="User Name" defaultValue="BANK_NEW" />
<property name="DB_password" displayName="Password" defaultValue="BANK_LOCAL" />
</mfp:adapter>
根据此文档 https://www.ibm.com/support/knowledgecenter/en/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/devref/r_structure_of_adapter_xml_file.html 需要 JAXRSApplicationClass
之前的 connectivity
元素
尝试在 Worklight 8 中部署,而不是在 Worklight 7 中部署。它将解决问题。
我遇到了这个错误。
java.lang.RuntimeException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'JAXRSApplicationClass'. One of '{runOnNode, debugPort, connectivity}' is expected.
适配器 xml 在这里。
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed Materials - Property of IBM
5725-I43 (C) Copyright IBM Corp. 2011, 2016. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
-->
<mfp:adapter name="CardServices"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mfp="http://www.ibm.com/mfp/integration"
xmlns:http="http://www.ibm.com/mfp/integration/http">
<displayName>CardServices</displayName>
<description>CardServices</description>
<JAXRSApplicationClass>com.slap.bank.ServicesApplication</JAXRSApplicationClass>
<property name="DB_url" displayName="Database URL" defaultValue="jdbc:oracle:thin:@192.168.0.15:1521:xe" />
<property name="DB_username" displayName="User Name" defaultValue="BANK_NEW" />
<property name="DB_password" displayName="Password" defaultValue="BANK_LOCAL" />
</mfp:adapter>
根据此文档 https://www.ibm.com/support/knowledgecenter/en/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/devref/r_structure_of_adapter_xml_file.html 需要 JAXRSApplicationClass
之前的 connectivity
元素
尝试在 Worklight 8 中部署,而不是在 Worklight 7 中部署。它将解决问题。