Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在websphereit';请求时找不到_Websphere_Worklight Adapters - Fatal编程技术网

在websphereit';请求时找不到

在websphereit';请求时找不到,websphere,worklight-adapters,Websphere,Worklight Adapters,我正在部署一个worklight http适配器,该适配器有一个从DB检索内容的方法,它映射到路径/foo/bar/1 在websphere console中,我可以看到my应用程序已经启动,日志中没有错误,但是当我从Mobile First应用程序调用适配器时,我得到以下json响应: { "errors": [ "Runtime: Failed to parse JSON string <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML

我正在部署一个worklight http适配器,该适配器有一个从DB检索内容的方法,它映射到路径/foo/bar/1

在websphere console中,我可以看到my应用程序已经启动,日志中没有错误,但是当我从Mobile First应用程序调用适配器时,我得到以下json响应:

{
   "errors": [
      "Runtime: Failed to parse JSON string
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /foo/bar/1 was not found on this server.</p>
<hr>
<address>IBM_HTTP_Server at my.server.edu Port XXX</address>
</body></html>"
   ],
   "info": [
   ],
   "isSuccessful": false,
   "warnings": [
   ]
}
{
“错误”:[
“运行时:无法分析JSON字符串
404找不到
找不到
在此服务器上找不到请求的URL/foo/bar/1


位于my.Server.edu端口XXX的IBM_HTTP_服务器 " ], “信息”:[ ], “isSuccessful”:错误, “警告”:[ ] }
我知道适配器正在工作,因为它至少返回这个错误响应。但问题是,如果我看到应用程序在websphere控制台中启动,为什么找不到它?我尝试过停止它,然后再次启动它,并检查了部署描述符,看起来很好

<application id="Application_ID" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" >
 <display-name> myApp</display-name>
<module>
<web>
 <web-uri> myApp.war</web-uri>
 <context-root> foo</context-root>
 </web>
 </module>
 </application> 

myApp
myApp.war
福
调用适配器后,我可以在日志中看到

[2016年6月15日星期三10:00:28][error][client XX.XX.XXX.XXX]文件不存在:/opt/IBM/HTTPServer/htdocs/foo

二十、 XXX.XXX.XXX---[15/Jun/2016:12:03:10-0500]“GET/foo/bar/1http/1.1”404301


我在谷歌上搜索了故障排除的信息,但我仍然无法找出根本原因。非常感谢继续排除故障的任何帮助。

错误日志条目意味着WAS Web服务器插件(假设它是在基于Apache的服务器中配置的)认为它不对/foo的请求负责


通常,插件从application服务器上生成的plugin-cfg.xml读取应用程序上下文根。您是否在Web服务器系统上是最新的,并且知道/foo是上下文根目录?

错误日志条目意味着WAS Web服务器插件(假设它是在基于Apache的服务器中配置的)认为它不对/foo的请求负责


通常,插件从application服务器上生成的plugin-cfg.xml读取应用程序上下文根。您在Web服务器系统上是否是最新的,并且知道/foo是上下文根目录?

您使用的是什么版本的“Worklight”(或IBM MobileFirst平台)?考虑到听起来您试图将适配器作为REST调用调用,我假设您使用的是7.0或更高版本,因为这是对适配器的REST支持首次引入的时候

您提到将适配器映射到/foo/bar/1,但请注意,适配器URL遵循以下模式:

http(s)://<server>:<port>/<Context>/adapters/<adapter-name>/*

http://://适配器///p>您使用的是什么版本的“Worklight”(或IBM MobileFirst平台)?考虑到听起来您试图将适配器作为REST调用调用,我假设您使用的是7.0或更高版本,因为这是对适配器的REST支持首次引入的时候

您提到将适配器映射到/foo/bar/1,但请注意,适配器URL遵循以下模式:

http(s)://<server>:<port>/<Context>/adapters/<adapter-name>/*
http://://适配器/