Unable to deploy HelloWorld application to MobileFirst Development Server
Asked Answered
R

3

6

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.

Rappee answered 23/1, 2015 at 14:51 Comment(9)
I realise this is unlikely, but, is there any doubt that the server is actually listening on 10080? Can you netstat and prove it? Telnet to it? Could a firewall be interfering? I know many folks who've done this, so I've got to wonder if there is something special in your environment.Yearbook
@Yearbook - Good questions, I just checked using Resource Monitor and confirmed that java.exe listens on ports 10777, 10443 and 10080. My laptop is running Symantec Endpoint Encryption but I have added exceptions for TCP traffic on 10443 and 10080. Doesn't seem to make a difference. I followed exactly the same install process on my personal windows machine at home and it worked with no issues. I suspect it is something in my environment as you say, I just can't work out what.Rappee
I was facing the similar issue in my workplace but on my personal laptop it was working fineCrossfertilize
Improbable, but since you have tried so many things... I always tell eclipse the JDK that I want to use by specifying JAVA_HOME and PATH=%JAVA_HOME%\bin;%PATH% in a command prompt and launching eclipse from there. Could it be that eclipse is running on the proper VM but some of its child processes run in a different version?Alchemize
@Xv. - Thanks for that suggestion, I checked and already had JAVA_HOME set and inlcuded in my path. I attempted launching eclipse via the command line anyway but it made no apparent difference. At this point I have given up on getting the eclipse studio to work on this laptop. My workaround is to develop in Eclipse and use the MFP to build/deploy the application and run the console.Rappee
@JamieMcDonald Hi Jamie, I have the same problem. Any luck figuring it out?Till
@simplymoody Sorry I haven't had any luck yet, currently I'm avoiding the studio and just using the CLI.Rappee
@JamieMcDonald Thanks Jamie. Tried running the Eclipse I've set up in another pc with different network and it worked. The one I'm using seems to be the problem... Anyway, thanks again!Till
When you do mfp start first time it will setup a server on your machine inside users directory, can you please verify that ?Vendible
M
2

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.

Motorbus answered 23/1, 2015 at 15:48 Comment(3)
Thanks for that, I will try installing an older version of the 1.7 JDK and see if that makes any difference.Rappee
Just tried this using the same version as you, JDK1.7.0_15, and still no luck. Thanks for the suggestion.Rappee
Short answer: Worklight/MobileFirst Platform does not support Java 8. Only Java 6 and 7 are supported.Germinate
U
0

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
Urbain answered 2/6, 2016 at 5:4 Comment(0)
C
0

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.

Closefitting answered 6/4, 2017 at 14:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.