Unable to deploy HelloWorld application to MobileFirst Development Server

两盒软妹~` 提交于 2019-11-30 15:35:21

问题


I am having some trouble building/running the HelloWorld application from the first hybrid app tutorial.

When I try to run the default HelloWorld application on the MobileFirst Development Server, the server starts and seems to stop again (without error) before the MobileFirst Application Builder has a chance to finish running. This then causes the application to fail to deploy with the following error message:

[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 

I am trying this using Eclipse Kepler SR2 (64-bit) on Windows 7 (64-bit). I am using the Java 7 JDK downloaded from Oracle and the IBM MobileFirst Platform Studio (6.3.0) installed from the Eclipse Marketplace.

To avoid long/complex path names I have installed eclipse to C:\eclipsekepler and am using the workspace directory C:\workspace. To ensure that Eclipse is using the correct JDK, I put the following in my eclipse.ini file (before vmargs):

-vm
C:\Program Files\Java\jdk1.7.0_75\bin\javaw.exe

In the Server configuration I have set the Host Name to my machine's IP address, 9.175.194.35 (as reported by running ipconfig).

Here are the full console logs:

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.

I am able to successfully run the equivalent actions using the MobileFirst CLI with:

cd C:\workspace\HelloWorldProject
mfp start
mfp build
mfp deploy
mfp console

I've tried reinstalling the JDK, using Eclipse Luna and Kepler, reinstalling the MobileFirst studio and starting with various fresh workspaces but nothing seems to make a difference. Does anyone have any idea what could be wrong? Thanks.

Update

To try and force MobileFirst to use localhost, rather than resolving my machine's IP address to the hostname on the corportate network, I disconnected the network which indeed caused the server to start on 127.0.0.1 and the application attempt to deploy to 127.0.0.1. However despite this, it still failed.

I did notice that the Mobile Application Builder task seems to progress to 20% and then sit there until the server stops itself and then the task completes but fails to deploy because the server has stopped itself.

Could this be a performance issue? I am trying this on a Thinkpad T420 with 4GB RAM.

Update 27/01/2015

One of my colleagues installed Oracle JDK7, Eclipse Luna and IBM MobileFirst Platform Studio (6.3.0) on his ThinkPad, which is identical in hardware/corporate software/network settings to mine, and it ran fine. This points me away from corporate software or corporate network settings and points me towards a configuration issue or some other software interfering. I tried again by uninstalling everything, including the JDK/JRE, clean the registry with CCleaner, reinstall the JDK/JRE, reinstall eclipse + mobilefirst with default settings. Still no successful deployment.


回答1:


I tried in 2 different Linux Ubuntu 14.04, 32-bit and 64-bit and 1 Windows 7 64-bit. This is what I found out and experience on standing up the MobileFirst Development Server:

  • Ubuntu 64-bit
    • Eclipse Luna and latest JDK1.8x .. error
    • Eclipse Kepler SR2 + JDK1.7.0_15 .. works
  • Ubuntu 32-bit
    • Eclipse Luna and latest JDK1.8.0_25 .. works
  • Windows 7 64:
    • Eclipse Kepler SR2 + JDK1.7.0_15 .. works

If using JDK1.7.0_75 and error out, I would give it a shot using older version JDK. Hope that helps.




回答2:


This worked for me:

  1. Right-click "MobileFirst Development Server"
  2. Click Properties
  3. Goto Project References
  4. Select your HelloWorld Project
  5. Build & Deploy again



回答3:


This is clearly a problem with the versions of eclipse and jdk. I have also experienced such difficulties. MFP do have such dependencies and that's why your mfp-cli is working fine. Try using eclipse juno or luna with jdk 1.7. It should work.



来源:https://stackoverflow.com/questions/28112479/unable-to-deploy-helloworld-application-to-mobilefirst-development-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!