Ibm mobilefirst 手动安装Worklight server并声明Worklight运行时(WL 6.2)

Ibm mobilefirst 手动安装Worklight server并声明Worklight运行时(WL 6.2),ibm-mobilefirst,worklight-server,Ibm Mobilefirst,Worklight Server,我正在尝试使用db2数据库在WebSphere Liberty概要文件中手动安装IBM Worklight 6.2。我已使appcenter和worklight服务器正常运行。但是,当我尝试声明我的服务器运行时(我已上载war文件,并在server.xml文件中声明了它)时,日志显示以下消息: 2015-01-19T12:39:43.32+0100 [App/0] ERR [ERROR ] FWLST0003E: ========= Failed starting project /wo

我正在尝试使用db2数据库在WebSphere Liberty概要文件中手动安装IBM Worklight 6.2。我已使appcenter和worklight服务器正常运行。但是,当我尝试声明我的服务器运行时(我已上载war文件,并在server.xml文件中声明了它)时,日志显示以下消息:

2015-01-19T12:39:43.32+0100 [App/0]   ERR [ERROR   ] FWLST0003E: ========= Failed starting project /worklight [project worklight]
2015-01-19T12:39:43.32+0100 [App/0]   ERR Error creating bean with name 'txManager' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: FWLSE0206E: The project /worklight failed to initialize, because the project database schema for data source jdbc:db2://75.126.155.153:50000/SQLDB is from version N/A, which is not supported by the server from version 6.2.0.00.20140613-0730. Use the Worklight ant tasks to upgrade the project database schema. [project worklight]
2015-01-19T12:39:43.40+0100 [App/0]   ERR [ERROR   ] Error creating bean with name 'txManager' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: FWLSE0206E: The project /worklight failed to initialize, because the project database schema for data source jdbc:db2://75.126.155.153:50000/SQLDB is from version N/A, which is not supported by the server from version 6.2.0.00.20140613-0730. Use the Worklight ant tasks to upgrade the project database schema. [project worklight]
2015-01-19T12:39:43.40+0100 [App/0]   ERR Error creating bean with name 'txManager' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: FWLSE0206E: The project /worklight failed to initialize, because the project database schema for data source jdbc:db2://75.126.155.153:50000/SQLDB is from version N/A, which is not supported by the server from version 6.2.0.00.20140613-0730. Use the Worklight ant tasks to upgrade the project database schema. [project worklight]
这是我的server.xml文件:

<server description="new server">

    <!-- Enable features -->
    <featureManager>
        <feature>jsp-2.2</feature>
        <!-- Begin of features added by IBM Worklight installer. -->
        <feature>ssl-1.0</feature>
        <feature>servlet-3.0</feature>
        <feature>jdbc-4.0</feature>
        <feature>appSecurity-1.0</feature>
        <feature>restConnector-1.0</feature>
        <feature>jndi-1.0</feature>
        <!-- End of features added by IBM Worklight installer. -->
    </featureManager>

    <httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" httpsPort="9443" >

        <tcpOptions soReuseAddr="true"/>
    </httpEndpoint>

    <!-- 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.8.jar"/>
            </commonLibrary>
        </classloader>
    </application>

    <!-- Declare the user registry for the IBM Application Center. -->
    <basicRegistry id="applicationcenter-registry" realm="ApplicationCenter">
        <!--    Worklight user.
        [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
        -->
        <user name="WorklightRESTUser" password="EKminBt6fHnE"/>

        <!-- The users defined here are members of group "appcentergroup",
             thus have role "appcenteradmin", and can therefore perform
             administrative tasks through the IBM Application Center Console. -->
        <user name="appcenteradmin" password="admin"/>
        <user name="demo" password="demo"/>

        <group name="appcentergroup">
            <member name="appcenteradmin"/>
            <member name="demo"/>
        </group>
    </basicRegistry>

    <!-- 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='"*******/android-sdk"'/>-->
    <jndiEntry jndiName="android.aapt.dir" value="C******/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 DB2 access through JDBC. -->
    <library id="DB2Lib">
        <fileset dir="${shared.resource.dir}/db2" includes="*.jar"/>
    </library>

    <!-- Declare the IBM Application Center database. -->
    <dataSource jndiName="jdbc/AppCenterDS" transactional="false">
        <jdbcDriver libraryRef="DB2Lib"/>
        <properties.db2.jcc databaseName='${Database.connection.db}' serverName='${Database.connection.host}' portNumber='${Database.connection.port}' user='${Database.connection.username}' password='${Database.connection.password}'/>
    </dataSource>

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

    <administrator-role>
        <!--    Worklight JMX User.
        [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
        -->
        <user>WorklightRESTUser</user>


    </administrator-role>

<!--
    IBM Worklight requires SSL and declared the "defaultKeyStore" default keystore. 
        [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
    This configuration is the minimum one that you need to create an SSL configuration.
    With this configuration, the Liberty server creates the keystore and the certificate, 
    if it does not exist yet, during the SSL initialization.
    The created certificate is a self-signed certificate that is valid for 365 days.
    Do not use the certificates that the Liberty server created for production use.
    For more information see  http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.core.doc/ae/twlp_sec_ssl.html
-->
    <keyStore id="defaultKeyStore" password="worklight"/>
    <!--    Worklight JNDI property for JMX connection.
        [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
    -->
    <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 '/wladmin'] 
    -->
    <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 '/wladmin'] 
    -->
    <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 '/wladmin'] 
    -->
    <jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="EKminBt6fHnE"/>
    <!--    Worklight JNDI property for JMX connection.
        [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
    -->
    <jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
    <!--    Worklight JNDI property for JMX connection.
        [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
    -->
    <jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>

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

    <!-- Declare the Worklight Administration Service application. -->
    <application id="wladmin" name="wladmin" location="worklightadmin.war" type="war">
        <application-bnd>
            <security-role name="worklightadmin">
                <user name="demo"/>

            </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>

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

    <!-- Declare web container custom properties for the Worklight Administration Service application. -->
    <webContainer invokeFlushAfterService="false" deferServletLoad="false"/>

    <!-- Declare the JNDI properties for the Worklight Administration Service. -->
    <jndiEntry jndiName="wladmin/ibm.worklight.admin.environmentid" value="WLBluemix"/>


    <!-- Declare the jar files for DB2 access through JDBC. -->
    <library id="wladmin/DB2Lib">
        <fileset dir="${shared.resource.dir}/wladmin/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
    </library>

    <!-- Declare the IBM Worklight Administration database. -->
    <dataSource jndiName="wladmin/jdbc/WorklightAdminDS" transactional="false">
        <jdbcDriver libraryRef="wladmin/DB2Lib"/>
        <properties.db2.jcc databaseName='${Database.connection.db}' serverName='${Database.connection.host}' portNumber='${Database.connection.port}' user='${Database.connection.username}' password='${Database.connection.password}' currentSchema='${Database.connection.username}'/>
    </dataSource>

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

            </security-role>

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

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

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

        </application-bnd>

    </application>

    <!-- Declare web container custom properties for the Worklight Administration Console application. -->
    <webContainer invokeFlushAfterService="false" deferServletLoad="false"/>

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


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


    <!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->

    <!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
    <jndiEntry jndiName="worklight/publicWorkLightProtocol" value="http"/>
    <jndiEntry jndiName="worklight/publicWorkLightPort" value="9080"/>
    <jndiEntry jndiName="worklight/ibm.worklight.admin.environmentid" value="WLServer"/>


    <!-- Declare the jar files for DB2 access through JDBC. -->
    <library id="worklight/DB2Lib">
        <fileset dir="${shared.resource.dir}/worklight/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
    </library>

    <!-- Declare the IBM Worklight Server database. -->
    <dataSource jndiName="worklight/jdbc/WorklightDS" transactional="false">
        <jdbcDriver libraryRef="worklight/DB2Lib"/>
        <properties.db2.jcc databaseName='${cloud.services.Worklight Database.connection.db}' serverName='${cloud.services.Worklight Database.connection.host}' portNumber='${cloud.services.Worklight Database.connection.port}' user='${cloud.services.Worklight Database.connection.username}' password='${cloud.services.Worklight Database.connection.password}' currentSchema='${cloud.services.Worklight Database.connection.username}'/>
    </dataSource>

    <!-- Declare the IBM Worklight Server reports database. -->
    <dataSource jndiName="worklight/jdbc/WorklightReportsDS" transactional="false">
        <jdbcDriver libraryRef="worklight/DB2Lib"/>
        <properties.db2.jcc databaseName='${Database.connection.db}' serverName='$Database.connection.host}' portNumber='${Database.connection.port}' user='${Database.connection.username}' password='${Database.connection.password}' currentSchema='${Database.connection.username}'/>
    </dataSource>

    <!-- End 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="WLserver.war" type="war">
        <classloader delegation="parentLast">
            <privateLibrary>
                <fileset dir="${shared.resource.dir}/worklight/lib" includes="worklight-jee-library.jar"/>
            </privateLibrary>
        </classloader>
    </application>


</server>

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

看起来您还没有为管理服务、运行时和报表数据库创建DB2表。

我们已经使用知识中心的说明手动创建了DB2数据库和表。既然Worklight服务器已启动并运行,而且数据源定义良好,我们如何管理此错误?在部署.war运行时时,是否有任何方法可以检查需要执行哪些SQL查询?在定义新的运行时时,DB2数据库是否更新?谢谢