1
我使用的是java.net.URL,它在我的工作站中工作正常,直到它被部署在亞馬遜彈性map-reduce中,總是給我這個錯誤。 我正在使用openjdk1.7.0。在java中是否有一個好的替代URL解析器
Exception in thread "Thread-969" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/http/HttpServlet
URL url = null;
HashMap<String, Object> refererHash = new LinkedHashMap<String, Object>();
try {
url = new URL(referrer);
String protocol = url.getProtocol();
if(protocol != null){
refererHash.put("protocol", protocol);
}
HashMap<String, String> params = parseParameters(url.getQuery());
String path = url.getPath();
有誰遇到同樣的問題?