Websphere Mobile First服务器中的StateChangeXeption

Websphere Mobile First服务器中的StateChangeXeption,websphere,ibm-mobilefirst,Websphere,Ibm Mobilefirst,我在WebSphere8.5.5.4中使用Mobilefirst7。到目前为止,服务器在创建运行时方面运行良好,但现在在项目创建问题中引入了安全性。控制台中出现以下错误: [错误]CWWKZ0002E:启动时发生异常 应用程序测试pp。异常消息是: com.ibm.ws.container.service.state.StateChangeException: com.ibm.ws.container.service.state.StateChangeException: startWebApp

我在WebSphere8.5.5.4中使用Mobilefirst7。到目前为止,服务器在创建运行时方面运行良好,但现在在项目创建问题中引入了安全性。控制台中出现以下错误:

[错误]CWWKZ0002E:启动时发生异常 应用程序测试pp。异常消息是: com.ibm.ws.container.service.state.StateChangeException: com.ibm.ws.container.service.state.StateChangeException: startWebApplication[AUDIT]CWWKT0016I:Web应用程序可用 (默认_主机):http://

My Server.xml如下所示:

  <?xml version="1.0" encoding="UTF-8"?>
  <server description="new server">

<!-- Enable features -->
<featureManager>
    <feature>jsp-2.2</feature>

    <!-- Begin of features added by IBM Worklight installer. -->
    <!-- The following lines will be removed when the application is uninstalled -->
    <feature>jdbc-4.0</feature>
    <feature>appSecurity-1.0</feature>
    <feature>servlet-3.0</feature>
     <feature>jndi-1.0</feature>
     <feature>localConnector-1.0</feature>
    <feature>restConnector-1.0</feature>
    <!-- End of features added by IBM Worklight installer. -->



    <!-- Begin of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->
    <!-- The following lines will be removed when the application is uninstalled -->
    <feature>jdbc-4.0</feature>
    <feature>appSecurity-2.0</feature>
    <feature>restConnector-1.0</feature>
    <!-- End of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->


    <!-- Begin of features added by IBM Worklight <configureApplicationServer> ant task for context root '/TestApp'. -->
    <!-- The following lines will be removed when the application is uninstalled -->
    <feature>jdbc-4.0</feature>
    <feature>servlet-3.0</feature>
    <feature>ssl-2.0</feature>
    <!-- End of features added by IBM Worklight <configureApplicationServer> ant task for context root '/TestApp'. -->

</featureManager>

 <webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<webContainer com.ibm.ws.webcontainer.suppressLoggingServiceRuntimeExcep="true" invokeFlushAfterService="false" deferServletLoad="false"/>
<webContainer deferServletLoad="false" invokeFlushAfterService="false"/>

<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
              httpPort="9080"
              httpsPort="9443" host="*" >

    <!-- Option soReuseAddr added by IBM Worklight installer. -->
    <!-- Option soReuseAddr added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->


</httpEndpoint>


<basicRegistry>
    <!--    Worklight user.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin'] 
    -->
    <user name="WorklightRESTUser" password="SYNQnCvTirQ5"/>

    <!--    Worklight user.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin'] 
    -->
    <user name="admin" password="admin"/>

    <!--    Worklight user.
    [Added by IBM Worklight Installation Manager for context root '/applicationcenter'] 
    -->
    <user name="demo" password="demo"/>

    <!--    Worklight user.
    [Added by IBM Worklight Installation Manager for context root '/applicationcenter'] 
    -->
    <user name="appcenteradmin" password="admin"/>

    <!--    IBM Application Center group.
    [Added by IBM Worklight Installation Manager for context root '/applicationcenter'] 
    -->
    <group name="appcentergroup">
        <!--    IBM Application Center group member.
        [Added by IBM Worklight Installation Manager for context root '/applicationcenter'] 
        -->
        <member name="demo"/>

        <!--    IBM Application Center group member.
        [Added by IBM Worklight Installation Manager for context root '/applicationcenter'] 
        -->
        <member name="appcenteradmin"/>

    </group>

</basicRegistry>

<!-- Begin of configuration added by IBM Worklight installer. -->

<!-- Declare the IBM Application Center Console application. -->
<application id="appcenterconsole" name="appcenterconsole" location="appcenterconsole.war" type="war">
    <application-bnd>
        <security-role name="appcenteradmin">
            <group name="appcentergroup"/>
        </security-role>
    </application-bnd>
</application>

<!-- Declare the IBM Application Center Services application. -->
<application id="applicationcenter" name="applicationcenter" location="applicationcenter.war" type="war">
    <application-bnd>
        <security-role name="appcenteradmin">
            <group name="appcentergroup"/>
        </security-role>
    </application-bnd>
    <classloader delegation="parentLast">
        <commonLibrary>
            <fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
        </commonLibrary>
    </classloader>
</application>

<!-- Declare the JNDI properties for the IBM Application Center. -->

<!-- Define the AppCenter services endpoint in order for the AppCenter console to be able to invoke the REST service.
        You need to enable this property if the server is behind a reverse proxy
        or if the context root of the Application Center Services application is different from '/applicationcenter'. -->
<!-- <jndiEntry jndiName="ibm.appcenter.services.endpoint" value='"http://proxyhost:proxyport/applicationcenter"'/> -->
<!-- The directory with binaries of the 'aapt' program, from the Android SDK's platform-tools package. -->
<jndiEntry jndiName="android.aapt.dir" value='"/Users/kiranjain/IBM/MobileFirst_Platform_Server/ApplicationCenter/tools/android-sdk"'/>
<!-- The protocol of the application resources URI. This property is optional. It is only needed if the protocol of the external and internal URI are different. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.protocol" value='"http"'/> -->
<!-- The hostname of the application resources URI. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.host" value='"proxyhost"'/> -->
<!-- The port of the application resources URI. This property is optional. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.port" value="proxyport"/> -->

<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="MySQLLib">
    <fileset dir="${shared.resource.dir}/mysql" includes="*.jar"/>
</library>

<!-- Declare the IBM Application Center database. -->
<dataSource jndiName="jdbc/AppCenterDS" transactional="false">
    <jdbcDriver libraryRef="MySQLLib"/>
    <properties URL="jdbc:mysql://localhost:3306/APPCNTR" user="root" password=""/>
</dataSource>

<!-- End of configuration added by IBM Worklight installer. -->

<administrator-role>

    <user>WorklightRESTUser</user>

</administrator-role>

<keyStore id="defaultKeyStore" password="worklight"/>

<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
    <!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin'] 
-->
  <jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="9443"/>
   <!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin'] 
-->
   <jndiEntry jndiName="ibm.worklight.admin.jmx.user" value="WorklightRESTUser"/>
    <!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin'] 
-->
    <jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="SYNQnCvTirQ5"/>
    <!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin'] 
-->
    <jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
     <!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin'] 
-->
  <jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>

    <!-- Element <executor> added by IBM Worklight <installWorklightAdmin> ant task for id 'worklightadmin'. -->
   <executor id="default" name="LargeThreadPool"
          coreThreads="200" maxThreads="400" keepAlive="60s"
          stealPolicy="STRICT" rejectedWorkPolicy="CALLER_RUNS"/>

 <application id="worklightadmin" name="worklightadmin" location="worklight-management-service.war" type="war">
    <application-bnd>
        <security-role name="worklightadmin">
            <user name="admin"/>

        </security-role>

        <security-role name="worklightdeployer">
        </security-role>

        <security-role name="worklightmonitor">
        </security-role>

        <security-role name="worklightoperator">
        </security-role>

    </application-bnd>

    <classloader delegation="parentLast">
        <commonLibrary id="worklightlib_worklightadmin">

            <fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
        </commonLibrary>
    </classloader>
</application>

<library id="worklightadmin/MySQLLib">
    <fileset dir="${shared.resource.dir}/worklightadmin/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>

<!-- Declare the IBM Worklight Administration database. -->
<dataSource jndiName="worklightadmin/jdbc/WorklightAdminDS" transactional="false">
    <jdbcDriver libraryRef="worklightadmin/MySQLLib"/>
    <properties URL="jdbc:mysql://localhost:3306/WLADMIN" user="admin" password="admin"/>
</dataSource>

<!-- Declare the Worklight Administration Console application. -->
<application id="worklightconsole" name="worklightconsole" location="worklight-management-ui.war" type="war">
    <application-bnd>
        <security-role name="worklightadmin">
            <user name="admin"/>

        </security-role>

        <security-role name="worklightdeployer">
        </security-role>

        <security-role name="worklightmonitor">
        </security-role>

        <security-role name="worklightoperator">
        </security-role>

    </application-bnd>

</application>

<!-- Declare the JNDI properties for the Worklight Administration Console. -->
<jndiEntry jndiName="worklightconsole/ibm.worklight.admin.endpoint" value='"*://*:*/worklightadmin"'/>


<!-- End of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->



<!-- Declare the IBM Worklight project runtime application. -->
<application id="TestApp" name="TestApp" location="TestApp.war" type="war">
    <classloader delegation="parentLast">
        <privateLibrary id="worklightlib_TestApp">
            <fileset dir="${shared.resource.dir}/TestApp/lib" includes="worklight-jee-library.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="TestApp/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="TestApp/publicWorkLightPort" value='"9080"'/>
<jndiEntry jndiName="TestApp/wl.analytics.queue.size" value='"1000"'/>


<library id="TestApp/MySQLLib">
    <fileset dir="${shared.resource.dir}/DynamicBuy/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>


<dataSource jndiName="TestApp/jdbc/WorklightDS" transactional="false">
    <jdbcDriver libraryRef="TestApp/MySQLLib"/>
    <properties URL="jdbc:mysql://localhost:3306/Test_WRKLGHT" user="root" password=""/>
</dataSource>


<dataSource jndiName="DynamicBuy/jdbc/WorklightReportsDS" transactional="false">
    <jdbcDriver libraryRef="DynamicBuy/MySQLLib"/>
    <properties URL="jdbc:mysql://localhost:3306/dynamic_WLREPORT" user="root" password=""/>
</dataSource>

 </server>

jsp-2.2
jdbc-4.0
appSecurity-1.0
servlet-3.0
jndi-1.0
localConnector-1.0
restConnector-1.0
jdbc-4.0
appSecurity-2.0
restConnector-1.0
jdbc-4.0
servlet-3.0
ssl-2.0
WorklightRESTUser

有人能帮我解决这个问题吗?即使是战争中的UTF,也只有UTF-8。

问题解决了。项目库中有一些javax.servlet-3.0产生了问题。我删除了它并重新构建了项目。并部署新的war文件。

您没有解释您引入的“安全性”是什么。一般来说,您应该使用
appSecurity-2.0
功能,它是1.0的替代品。@Gas感谢您的回复。.我用appSecurity-2.0更改了appSecurity-1.0,但仍然存在错误same@kiran,提到你做了什么,这才开始发生。