Ibm mobilefirst mobileFirst服务器中的运行时环境值正在设置为默认值“worklight”

Ibm mobilefirst mobileFirst服务器中的运行时环境值正在设置为默认值“worklight”,ibm-mobilefirst,mobilefirst-cli,Ibm Mobilefirst,Mobilefirst Cli,我正在使用mobileFirst CLI使用ant脚本部署war文件。提供mfp cli web服务器目录和derby数据库的路径 下面是我的代码: 正在更新server.xml,如下所示: <server description="worklight"> <featureManager> <feature>servlet-3.0</feature> <feature>jndi-1.0</feature>

我正在使用mobileFirst CLI使用ant脚本部署war文件。提供mfp cli web服务器目录和derby数据库的路径

下面是我的代码:

正在更新server.xml,如下所示:

 <server description="worklight">

 <featureManager>
    <feature>servlet-3.0</feature>
    <feature>jndi-1.0</feature>
    <feature>jdbc-4.0</feature>
    <feature>localConnector-1.0</feature>
    <feature>restConnector-1.0</feature>
    <feature>jsp-2.2</feature>
    <feature>appSecurity-1.0</feature>
    <feature>ssl-1.0</feature>
 </featureManager>
 <webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<webContainer com.ibm.ws.webcontainer.suppressLoggingServiceRuntimeExcep="true" invokeFlushAfterService="false" deferServletLoad="false"/>
<webContainer deferServletLoad="false" invokeFlushAfterService="false"/>

<!-- non standard ports were used to avoid future collision with other WebSphere products. -->
<httpEndpoint id="defaultHttpEndpoint"
              host="*"
              httpPort="10080"
              httpsPort="10443" >
    <tcpOptions soReuseAddr="true"/>
</httpEndpoint>
<logging consoleLogLevel="AUDIT" copySystemStreams="false"/>
<applicationMonitor updateTrigger="mbean"/>
<executor name="LargeThreadPool" id="default" coreThreads="200" maxThreads="400" keepAlive="60s" stealPolicy="STRICT" rejectedWorkPolicy="CALLER_RUNS"/>
<administrator-role>
   <user>admin</user>
</administrator-role>
<keyStore id="defaultKeyStore" password="worklight"/>
<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
<jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="10443"/>
<jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
<jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>
<application context-root="analytics-service" id="analytics-service" location="analytics-service.war" name="AnalyticsServices" type="war">
    <application-bnd>
        <security-role name="worklightadmin">
            <user name="admin"/>
        </security-role>
            <security-role name="worklightdeployer">
            <user name="deployer"/>
        </security-role>
            <security-role name="worklightmonitor">
            <user name="monitor"/>
        </security-role>
            <security-role name="worklightoperator">
            <user name="operator"/>
        </security-role>
    </application-bnd>
</application>
<application context-root="analytics" id="analytics" location="analytics.war" name="Analytics" type="war">
    <application-bnd>
        <security-role name="worklightadmin">
            <user name="admin"/>
        </security-role>
            <security-role name="worklightdeployer">
            <user name="deployer"/>
        </security-role>
            <security-role name="worklightmonitor">
            <user name="monitor"/>
        </security-role>
            <security-role name="worklightoperator">
            <user name="operator"/>
        </security-role>
    </application-bnd>
</application>
<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->

<!-- Declare the IBM Worklight project runtime application. -->
<application id="worklight" name="worklight" location="TestProj.war" type="war">
    <classloader delegation="parentLast">
        <privateLibrary id="worklightlib_worklight">
            <fileset dir="${shared.resource.dir}/worklight/lib" includes="worklight-jee-library-7.0.0.jar"/>
            <fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
        </privateLibrary>
    </classloader>
</application>

<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="worklight/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="worklight/publicWorkLightPort" value='"10080"'/>
<jndiEntry jndiName="worklight/ibm.worklight.admin.environmentid" value='"TestProj"'/>
<jndiEntry jndiName="worklight/serverSessionTimeout" value='"10"'/>


<!-- Declare the jar file for Derby with the "embedded" deployment option. -->
<library id="worklight/DerbyLib">
    <fileset dir="${shared.resource.dir}/worklight/derby" includes="derby.jar"/>
</library>

<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="worklight/jdbc/WorklightDS" transactional="false">
    <jdbcDriver libraryRef="worklight/DerbyLib"/>
    <properties.derby.embedded databaseName="${path-to-mfpcli}/TestProj/WRKLGHT" user='"WORKLIGHT"'/>
</dataSource>

<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="worklight/jdbc/WorklightReportsDS" transactional="false">
    <jdbcDriver libraryRef="worklight/DerbyLib"/>
    <properties.derby.embedded databaseName="${path-to-mfpcli}/TestProj/WLREPORT" user='"WORKLIGHT"'/>
</dataSource>

<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
但是这里server.xml中TestProj.war代码的ID和名称是worklight,我不知道它是如何作为默认值出现的,在运行服务器时,运行时环境显示为worklight。我无法部署我的应用程序,因为它抛出了一个错误MBean not found。

In

<configureapplicationserver id="TestProj" environmentId="TestProj">
您不需要id。仅当您在WAS完整配置文件中部署以向WAS中创建的对象添加后缀时,才使用此属性允许在单元格中进行多次部署

您可能不需要环境ID。如果在同一应用程序服务器中部署多个MFP admin实例,则使用此选项。如果您添加它,管理员必须具有相同的权限,或者您有一个MBean not found错误

要更改contextRoot,请使用属性contextRoot

  <configureapplicationserver contextRoot="/TestProj">
有关参考,请参阅

请说明哪个MobileFirst版本及其版本号。。。
  <configureapplicationserver contextRoot="/TestProj">