我在通过first hybrid app教程构建/运行HelloWorld应用程序时遇到了一些麻烦。

当我尝试在MobileFirst Development Server上运行默认的HelloWorld应用程序时,该服务器启动,并且似乎再次停止(无错误),然后MobileFirst Application Builder才有机会完成运行。然后,这将导致应用程序部署失败,并显示以下错误消息:

[2015-01-23 14:03:12]             Failed to deploy application 'HelloWorld' to MobileFirst Server: org.apache.http.conn.HttpHostConnectException: Connect to 9.175.194.35:10080
[/9.175.194.35] failed: Connection refused: connect

我正在Windows 7(64位)上使用Eclipse Kepler SR2(64位)进行尝试。我正在使用从Oracle下载的Java 7 JDK和从Eclipse Marketplace安装的IBM MobileFirst Platform Studio(6.3.0)。

为了避免长路径名/复杂路径名,我已将eclipse安装到C:\eclipsekepler,并且正在使用工作空间目录C:\workspace。为了确保Eclipse使用的是正确的JDK,我将以下内容放在eclipse.ini文件中(在vmargs之前):
-vm
C:\Program Files\Java\jdk1.7.0_75\bin\javaw.exe

在服务器配置中,我已将主机名设置为机器的IP地址9.175.194.35(通过运行ipconfig报告)。

以下是完整的控制台日志:
MobileFirst Console output:

[2015-01-23 14:01:25]             Starting build process: application 'HelloWorld', all environments
[2015-01-23 14:02:53]             Application 'HelloWorld' with all environments build finished.
[2015-01-23 14:02:53]             Deploying application 'HelloWorld' with all environments to MobileFirst Server...
[2015-01-23 14:03:12]             Failed to deploy application 'HelloWorld' to MobileFirst Server: org.apache.http.conn.HttpHostConnectException: Connect to 9.175.194.35:10080
[/9.175.194.35] failed: Connection refused: connect

MobileFirst Development Server console output (corporate network info redacted):

Listening for transport dt_socket at address: 10777
Launching worklight (WebSphere Application Server 8.5.5.3/wlp-1.0.6.cl50320140731-0257) on Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_75-b13 (en_US)
[AUDIT   ] CWWKE0001I: The server worklight has been launched.
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb1-impl.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/HelloWorldProject/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/_MobileBrowserSimulator/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/IBMJMXConnectorREST/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/worklight-analytics/
[AUDIT   ] CWWKZ0001I: Application _MobileBrowserSimulator started in 11.679 seconds.
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb1-impl.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[AUDIT   ] CWWKZ0001I: Application WorklightAnalytics started in 19.007 seconds.
[AUDIT   ] CWWKZ0001I: Application HelloWorldProject started in 21.164 seconds.
[AUDIT   ] CWWKZ0022W: Application WorklightServices has not started in 30.003 seconds.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/worklightconsole/
[AUDIT   ] CWWKZ0022W: Application WorklightConsole has not started in 30.015 seconds.
[AUDIT   ] CWWKZ0001I: Application WorklightConsole started in 30.083 seconds.
[AUDIT   ] CWWKZ0022W: Application WorklightAnalyticsServices has not started in 30.006 seconds.
[AUDIT   ] CWWKF0015I: The server has the following interim fixes installed: PI23168.
[AUDIT   ] CWWKF0011I: The server worklight is ready to run a smarter planet.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/worklightadmin/
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.

我可以使用MobileFirst CLI通过以下方式成功运行等效的操作:
cd C:\workspace\HelloWorldProject
mfp start
mfp build
mfp deploy
mfp console

我尝试使用Eclipse Luna和Kepler重新安装JDK,重新安装MobileFirst Studio并从各种新的工作区开始,但是似乎没有什么不同。有人知道什么地方可能出问题吗?谢谢。

更新

为了尝试强制MobileFirst使用localhost,而不是将计算机的IP地址解析为适当网络上的主机名,我断开了网络连接,的确导致服务器在127.0.0.1上启动,并且应用程序尝试部署到127.0.0.1。但是尽管如此,它仍然失败了。

我确实注意到,Mobile Application Builder任务似乎进展到20%,然后坐在那里,直到服务器停止自身,然后任务完成但由于服务器已经停止自身而未能部署。

这可能是性能问题吗?我正在具有4GB RAM的Thinkpad T420上尝试此操作。

更新27/01/2015

我的一位同事在他的ThinkPad上安装了Oracle JDK7,Eclipse Luna和IBM MobileFirst Platform Studio(6.3.0),其硬件/企业软件/网络设置完全相同,并且运行良好。这使我远离公司软件或公司网络设置,使我无法解决配置问题或其他一些软件干扰。我通过卸载所有内容(包括JDK/JRE)再次尝试,使用CCleaner清理注册表,重新安装JDK/JRE,使用默认设置重新安装eclipse + mobilefirst。仍然没有成功的部署。

最佳答案

我在2种不同的Linux Ubuntu 14.04、32位和64位以及1种Windows 7 64位中进行了尝试。这是我在建立MobileFirst Development Server时发现的经验:

  • Ubuntu 64位
  • Eclipse Luna和最新的JDK1.8x ..错误
  • Eclipse Kepler SR2 + JDK1.7.0_15 ..作品
  • Ubuntu 32位
  • Eclipse Luna和最新的JDK1.8.0_25 ..作品
  • Windows 7 64:
  • Eclipse Kepler SR2 + JDK1.7.0_15 ..作品

  • 如果使用JDK1.7.0_75并出现错误,我会使用较旧版本的JDK试一试。希望能有所帮助。

    关于ibm-mobilefirst - 无法将HelloWorld应用程序部署到MobileFirst Development Server,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28112479/

    10-12 03:36