Worklight 6.2 Consumer Edition:部署worklight应用程序和适配器时出错

时间:2014-09-29 14:41:24

标签: ant ibm-mobilefirst worklight-server

我通过"build-all" Ant Task构建了我的项目,并使用"install" ant任务部署了war文件。通过此部署后,我在屏幕上显示“No Runtime Environment Found”消息。但在"server.xml"文件中删除以下JNDI条目后,屏幕上会出现浏览按钮:

<jndiEntry jndiName="MyProject/publicWorkLightProtocol" value='http'/>
<jndiEntry jndiName="MyProject/publicWorkLightPort" value='9080'/>
<jndiEntry jndiName="MyProject/ibm.worklight.admin.environmentid" value='WL_UAT_Config1'/>

以下消息也位于浏览按钮上方:FWLSE0023E: application 'myProjecy' not found, please redeploy. [project MyProject]

然后我尝试部署我的适配器和应用程序文件,Server在控制台上发出以下错误:

[ERROR   ] FWLSE0228E: Failed to deploy the application deployable. Reason: null [project MyProject]
[ERROR   ] Preparation to deploy 'myProject' failed
java.lang.NullPointerException
[ERROR   ] Result: MyProject: WL_UAT_Server///1.2.3.4: ApplicationDeploymentException:java.lang.NullPointerException
[ERROR   ] Preparation to deploy adapter '' failed.
Missing xml file
[ERROR   ] Result: MyProject: WL_UAT_Server///1.2.3.4: RuntimeException:Missing xml file

但是,如果我使用此"server.xml"文件并使用"deploy-war" ant任务部署战争。一切都很好。另外,如果我通过eclipse在服务器上部署一切,一切正常。如果你们需要更多信息,请告诉我。

1 个答案:

答案 0 :(得分:0)

项目WAR文件的类加载器未设置为父级

<application context-root="/MyProject" id="MyProject" location="MyProject.war" name="MyProject" type="war">
    <classloader commonLibraryRef="worklight-6.2.0">
        <privateLibrary>
            <fileset dir="${wlp.user.dir}/shared/resources" includes="org.hsqldb.hsqldb_2.2.5.jar"/>
        </privateLibrary>
    </classloader>
</application>

它应该 - 见https://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.deploy.doc/admin/t_configuring_liberty_profile_manually.html

Ant任务会安装hsqldb库,该库未在Worklight http://www-01.ibm.com/support/docview.wss?uid=swg27024838支持的软件中列出....此文件可能是手动与Worklight Install部件相关联的。