部署 Helloworld 应用程序时出现 IBM MobileFirst Server 错误

Posted

技术标签:

【中文标题】部署 Helloworld 应用程序时出现 IBM MobileFirst Server 错误【英文标题】:IBM MobileFirst Server Error When Deploying The Helloworld Application 【发布时间】:2014-12-17 06:01:01 【问题描述】:

MobileFirst 控制台日志:

[2014-12-17 11:16:49]             Environment 'iPhone' was created. 
[2014-12-17 11:17:00]             Starting build process: application 'HelloWorldApp', environment 'iphone' 
[2014-12-17 11:17:13] FWLPL0010W: The current server configuration is set to "localhost". Therefore the MobileFirst build uses the primary IP address of this 
computer (192.168.137.1) instead. It is recommended to set the server configuration to use the fully qualified hostname or IP address 
of this computer. To configure the setting, in the "Servers" view double-click the MobileFirst Development Server entry and edit the 
"Host name" field. 
[2014-12-17 11:17:25]             Application 'HelloWorldApp' with environment 'iphone' build finished.
[2014-12-17 11:19:38]             Starting build process: application 'HelloWorldApp', all environments 
[2014-12-17 11:20:03]             Application 'HelloWorldApp' with all environments build finished.
[2014-12-17 11:20:03]             Deploying application 'HelloWorldApp' with all environments to MobileFirst Server... 
[2014-12-17 11:20:07]             Failed to deploy application 'HelloWorldApp' to MobileFirst Server: : HTTP 500 - Internal Server Errorr  

MobileFirst 开发服务器错误日志:

[ERROR   ] F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
[ERROR   ] F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
[ERROR   ] Uncaught.init.exception.thrown.by.servlet 
                                                                                                               ManagementServlet
                                                                                                               WorklightServices
                                                                                                               java.lang.NoClassDefFoundError: Could not initialize class org.apache.wink.common.internal.i18n.Messages
    at org.apache.wink.server.internal.DeploymentConfiguration.initAlternateShortcutMap(DeploymentConfiguration.java:386)
    at org.apache.wink.server.internal.DeploymentConfiguration.init(DeploymentConfiguration.java:167)
    at org.apache.wink.server.internal.servlet.RestServlet.getDeploymentConfiguration(RestServlet.java:202)
    at org.apache.wink.server.internal.servlet.RestServlet.createRequestProcessor(RestServlet.java:138)
    at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:103)
    at javax.servlet.GenericServlet.init(GenericServlet.java:161)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:325)
    at [internal classes]
    at com.ibm.worklight.admin.common.filter.HSTSFilter.doFilter(HSTSFilter.java:110)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
    at [internal classes]

【问题讨论】:

尝试从 eclipse 工作区中删除 mobilefirstServerConfig 文件夹,然后重试。 你能说得更具体些吗,因为我找不到任何名为“mobilefirstServerConfig”的文件夹,我只能在我的工作区中找到“MobileFirst Development Server”文件夹。 在您的文件系统中,导航到您用于 Eclipse 的工作区文件夹。 “未能将应用程序 'HelloWorldApp' 部署到 MobileFirst Server:请验证 MobileFirst Server 已启动且可访问。” MobileFirst 控制台中的错误。 删除工作区再试一次? 【参考方案1】:

实际上问题在于 MobileFirst 项目类路径只需将 Java jre 1.8 替换为 jre 1.7 并且服务器开始正常工作。我认为 JDK 1.8 导致了“HTTP 500 - 内部服务器错误”的问题。如果你觉得这个东西有用,请投票。

【讨论】:

【参考方案2】:

删除位于您工作区中的 MobileFirstServerConfig 文件。然后重新启动您的 Eclipse。 然后错误不会出现。 它对我有用

【讨论】:

【参考方案3】:

尝试硬编码 WL 服务器的 IP 地址而不是“localhost” 单击eclipse底部的服务器选项卡>双击“worklight Development server”>主机名:“you Lan Ip address”而不是“localhost”并保存更改“Ctrl+s”。 - 重新部署。

【讨论】:

嗨 Sam,您的解决方案对我不起作用,因为我认为服务器配置有问题,但是按照您所说的操作将帮助一些无法使用默认浏览器查看应用程序的人“本地主机”。我希望你记得我,伙计:) 嗨 Rohit :))) 当然可以,感谢您对我的回答提供意见。我会记下您的回复作为参考。 :) 将'localhost'改为'127.0.0.1',错误消失了。【参考方案4】:

Workspace 文件夹的名称不应包含空格。 例如:创建一个像“WorkSpace”这样的文件夹。

“工作空间”会给你这个错误。

【讨论】:

以上是关于部署 Helloworld 应用程序时出现 IBM MobileFirst Server 错误的主要内容,如果未能解决你的问题,请参考以下文章

部署 IBM Worklight 企业服务器时出现 BeanCreationException

在 Windows 上通过 Apache Lounge 部署烧瓶应用程序时出现内部服务器错误

连接到 IBM Websphere MQ 时出现 NullPointerException

编译时出现 Ibm MobileFirst Linker 错误

当我使用移动 Web 应用程序调用 ibm worklight 适配器时出现错误 200

在 IBM MobileFirst Application Center Console 中使用代理上传外部应用程序时出现问题