各种恶心の异常

java.lang.StackOverflowError




	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4102)
	at java.util.regex.Pattern$BranchConn.match(Pattern.java:3962)
	at java.util.regex.Pattern$CharProperty.match(Pattern.java:3314)
	at java.util.regex.Pattern$Branch.match(Pattern.java:3998)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4052)
	at java.util.regex.Pattern$Loop.match(Pattern.java:4179)
	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4111)
	at java.util.regex.Pattern$BranchConn.match(Pattern.java:3962)
	at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3335)
	at java.util.regex.Pattern$Branch.match(Pattern.java:3998)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4052)
	at java.util.regex.Pattern$Loop.match(Pattern.java:4179)
	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4111)
	at java.util.regex.Pattern$BranchConn.match(Pattern.java:3962)
	at java.util.regex.Pattern$CharProperty.match(Pattern.java:3314)





 

--这个一般是死循环/递归调用引起的。

 

 

 

java.lang.ClassNotFoundException







: Class bytes found but defineClass()failed



 

 

- -weblogic10.3启动的时候,项目报错,所有的class都找不到了,什么情况?

仔细一看下面的具体错误:

java.lang.UnsupportedClassVersionError: Bad version number in .class file,dk版本的问题!

解决此类问题的关键:确定三个地方的版本要一致,包括jdk和jre

1.点击项目,右键,properties---java build path----libraries 确保这里面的jre的版本正确

2.点击项目,右键,properties---java compiler---jdk compiance 确保这个版本正确

3.servers里面,点击weblogic,右键----configure server connector ----weblogic----weblogic10----jdk----weblogic jdk name确保这个版本正确,

这三个版本都一致,一般不会出错

 

 

 

log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.SingleClientConnManager).
log4j:WARN Please initialize the log4j system properly.
java.lang.IllegalStateException: Invalid use of SingleClientConnManager: connection still allocated.





Make sure to release the connection before allocating another one.
	at org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:199)
	at org.apache.http.impl.conn.SingleClientConnManager$1.getConnection(SingleClientConnManager.java:173)
	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:356)
	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
	at com.datasnatch.core.thunderpan.TestRenrenLogin.login(TestRenrenLogin.java:76)
	at com.datasnatch.core.thunderpan.TestRenrenLogin.main(TestRenrenLogin.java:46)
 
- -HttpResponse response2 = httpclient.execute(httpost); 两次的响应对象不同

1.当时我有两个响应.不同的页面不同的响应.结果调用response的时候调用错误
2.创建了一个get对象 在没有关闭后,又执行了一个get=====注意应用完后:get.abort();







java.lang.IllegalStateException







: Content has been consumed
	at org.apache.http.entity.BasicHttpEntity.getContent(BasicHttpEntity.java:84







)
	at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:87







)



 
-- 报错提示信息说,资源已经被消耗,查看代码发现
HttpEntity entity = response.getEntity()



;			
String responseString = EntityUtils.toString(response.getEntity()



); // 返回源码 html
// 报错行
BufferedReader reader = new BufferedReader(new InputStreamReader(entity.getContent()



, "utf-8"));
 前面已经获取entity,但是第二行有获取了一个新的,并且没有声明变量,所以到第三行报错

 

你可能感兴趣的:(异常)