运行Websphere App Server V8.5 Liberty Profile。我没有找到任何可以解决这些警告的帮助。我正在吃日食。
************** Here's my servlet code ************
package com.rocketsoft.zoskmip.kmipuser;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class AddUser
*/
@WebServlet("/user")
public class AddUser extends HttpServlet {
private static final long serialVersionUID = 1L;
public AddUser() {
super();
}
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter printWriter = response.getWriter();
printWriter.print("Welcome");
String firstName = request.getParameter("fname");
printWriter.print(firstName);
}
}
********警告*************
[警告] CWWKC0044W:扫描类和注释数据时发生异常。例外是{0}。
[警告] CWWKC0022W:[com.ibm.ws.anno.info.internal.ClassInfoCache@957735840]类[java.lang.Object]的扫描导致异常。消息是:[class [java.lang.Object] from resource [java / lang / Object.class] Exception creation reader]由[null]引起。
答案 0 :(得分:3)
警告看起来非常像您尝试在Java8下运行Liberty Profile。
Liberty profile does not (yet) support Java8,据我所知,您目前唯一支持的选项是返回Java7。