我正在使用Jersey 1.9,在这种情况下允许跨域问题使用JsonWithPadding(com.sun.jersey.api.json.JSONWithPadding)封装我的对象。没有JsonWithPadding,它会返回正确的JSON响应。JSONWithPadding - JERSEY JAX-RS REST的CORS相关错误500问题
有完全符合JsonWithPadding工作,它给了我在我切换到泽西2.事件下面的错误,我使用eclipse的霓虹灯下,Tomcat 8
,它甚至没有抛出任何错误控制台上,而我在访问日志中发现了错误500以及1082,我认为这是安全(特洛伊木马)问题。
访问日志
172.22.14.88 - - [13 /月/ 2017:09:17:49 -0400] “GET/csmgt /休息/客户端/ HTTP/1.1”
回应:
<!DOCTYPE html>
<html>
<head>
<title>Apache Tomcat/8.0.28 - Error report</title>
<style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style>
</head>
<body>
<h1>HTTP Status 500 - Internal Server Error</h1>
<div class="line"></div>
<p>
<b>type</b> Status report
</p>
<p>
<b>message</b>
<u>Internal Server Error</u>
</p>
<p>
<b>description</b>
<u>The server encountered an internal error that prevented it from fulfilling this request.</u>
</p>
<hr class="line">
<h3>Apache Tomcat/8.0.28</h3>
</body>
</html>
任何帮助与JsonWithPadding表示赞赏。