[英]AngularJS: ngResource 500 internal server error
I have a problem in getting list of users using $resource
.我在使用
$resource
获取用户列表时遇到问题。
I am making a webservice call using $resource
to get list of users.我正在使用
$resource
进行网络服务调用以获取用户列表。 It works most of the time, but when ever the response takes some time I am getting 500 internal server error .它大部分时间都可以工作,但是当响应需要一些时间时,我会收到500 internal server error 。
The code I am using to call the webservice:我用来调用网络服务的代码:
$resource("user/referral/getUserList", {}, {
query: {
method: 'GET'
}
})
I will be grateful for your help.我会很感激你的帮助。
It looks like you are missing a "/" at the left.看起来您在左侧缺少一个“/”。
user/referral/getUserList
Please keep this as well if you want to have the result as an array.如果您想将结果作为数组,也请保留它。
'query': {method:'GET', isArray:true}
I had the same problem in Glassfish.我在 Glassfish 中遇到了同样的问题。 It's a bug in Glassfish 4.1.1 https://java.net/jira/browse/JERSEY-2888
这是 Glassfish 4.1.1 https://java.net/jira/browse/JERSEY-2888 中的一个错误
I was able to fix it in this way:我能够以这种方式修复它:
In glassfish/modules/org.eclipse.persistence.moxy.jar fix META-INF/MANIFEST.MF Just append the following to Import-Package:在 glassfish/modules/org.eclipse.persistence.moxy.jar 中修复 META-INF/MANIFEST.MF 只需将以下内容附加到 Import-Package:
,org.xml.sax.helpers,javax.xml.parsers;resolution:=optional,javax.naming;resolution:=optional ,org.xml.sax.helpers,javax.xml.parsers;resolution:=optional,javax.naming;resolution:=optional
in 72 line and restart GF在 72 行并重新启动 GF
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.