【发布时间】:2015-08-16 08:41:59
【问题描述】:
我正在使用ant script 部署适配器和wlapp 文件覆盖mobileFirstServer。我正在使用 Java 7。使用以下代码:
<target name="deploy-wlapp">
<taskdef resource="com/worklight/ant/deployers/antlib.xml">
<classpath>
<pathelement location="worklight-ant-deployer.jar"/>
</classpath>
</taskdef>
<wladm url="http://localhost:10080/worklightadmin" user="admin" password="admin" secure="false">
<deploy-app runtime="myTime" file="/Users/admin/Documents/workspace/myTime/bin/myTime-iOSnative- 1.0.wlapp"/>
</wladm>
</target>
<target name="deploy-adapter">
<taskdef resource="com/worklight/ant/deployers/antlib.xml">
<classpath>
<pathelement location="worklight-ant-deployer.jar"/>
</classpath>
</taskdef>
<wladm url="http://localhost:10080/worklightadmin" user="admin" password="admin" secure="false">
<deploy-adapter runtime="myTime" file="//Users/admin/Documents/workspace/myTime/bin/Requests.adapter"/>
</wladm>
</target>
我在终端收到以下错误:
:com.ibm.worklight.admin.restclient.RESTException:访问http://localhost:10080/worklightadmin/management-apis/1.0/runtimes/myTime/adapters?locale=en_US 时出错:HTTP/1.1 404 Not Found FWLSE3002E: 找不到资源。 FWLSE3041E: 找不到 MobileFirst 项目“myTime”的 MBean。 MobileFirst 项目“myTime”的 MobileFirst 运行时 Web 应用程序可能未运行。如果它正在运行,请使用 JConsole 检查可用的 MBean。如果它没有运行,则可以在服务器的日志文件中找到完整的错误详细信息。 在 com.ibm.worklight.admin.restclient.RESTClient.getResponse(RESTClient.java:1247) 在 com.ibm.worklight.admin.restclient.RESTClient.getResponseWithTimeout(RESTClient.java:1324) 在 com.ibm.worklight.admin.restclient.RESTClient.getPOSTResponse(RESTClient.java:1442) 在 com.ibm.worklight.admin.restclient.RESTClient.getPOSTFileResponse(RESTClient.java:1464) 在 com.ibm.worklight.admin.commands.DeployAdapter.getResponse(DeployAdapter.java:41) 在 com.ibm.worklight.admin.restclient.ActionClient.execute(ActionClient.java:84) 在 com.ibm.worklight.admin.ant.types.AbstractActionElement.executeCommand(AbstractActionElement.java:76) 在 com.ibm.worklight.admin.ant.types.ActionElement.executeCommands(ActionElement.java:43) 在 com.ibm.worklight.admin.ant.WladmTask.executeCommands(WladmTask.java:705) 在 com.ibm.worklight.admin.ant.WladmTask.execute(WladmTask.java:459) 在 org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:606) 在 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 在 org.apache.tools.ant.Task.perform(Task.java:348) 在 org.apache.tools.ant.Target.execute(Target.java:435) 在 org.apache.tools.ant.Target.performTasks(Target.java:456) 在 org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) 在 org.apache.tools.ant.Project.executeTarget(Project.java:1364) 在 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 在 org.apache.tools.ant.Project.executeTargets(Project.java:1248) 在 org.apache.tools.ant.Main.runBuild(Main.java:851) 在 org.apache.tools.ant.Main.startAnt(Main.java:235) 在 org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) 在 org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
在 Eclipse 中显示以下错误:
错误] FWLSE3002E: 找不到资源。 FWLSE3041E: 找不到 MobileFirst 项目“myTime”的 MBean。 MobileFirst 项目“myTime”的 MobileFirst 运行时 Web 应用程序可能未运行。如果它正在运行,请使用 JConsole 检查可用的 MBean。如果它没有运行,则可以在服务器的日志文件中找到完整的错误详细信息。
相同的代码在其他项目中运行良好。
【问题讨论】:
-
是否可以直接通过 MFP 控制台为 myTime 项目部署二进制文件,无需 ANT?
-
@Hussain Eddin 是的。我能够使用 mfp 控制台构建和部署项目。
标签: ant ibm-mobilefirst mobilefirst-adapters mobilefirst-server