异常错误总结

java.lang.OutOfMemoryError: PermGen space
未解决?????????????不明白为什么,什么错误导致的

javax.servlet.ServletException:
Request[/yhb] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
解决:form表单中缺少提交方法method=post/get


java.lang.ClassCastException: [Ljava.lang.Object;
at com.carry.service.impl.YhbManagerImpl.loginCheck(YhbManagerImpl.java:44)


javax.servlet.ServletException:
Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot

open connection

java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference
解决办法:内存溢出,重新启动服务器


METHOD 传参数方法找不到,ACTION中,方法的四个参数顺序不能颠倒
tsList(ActionMapping mapping,ActionForm form,
HttpServletRequest request,
HttpServletResponse response)throws Exception


异常:不能连接数据库(解决: 数据库连接不上,连接异常,1,检查网络连接,2,检查是否有连接驱动,)
Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=150999297)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))))
连接拒绝

[SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(Io 异常: The Network Adapter could not establish the connection)
网络适配器不能建立连接,ORACLE数据库服务器没有打开


java.io.IOException: tmpFile.renameTo(classFile) failed
解决:JSP文件中有不能运行的JAVA代码!


Unable to find a value for "id" in object of class "java.lang.String" using operator "."
解决: 中的items="${listFun}" 错写为items="listFun"


Illegal use of -style tag without as its direct parent
"${map.yuanYouPur='yuanYouPur'}" contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered "=", expected

one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%",

"mod", "and", "&&", "or", "||", "?"]
解决:JSTL语言表达使用错误!


The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value

cannot be converted to an integer.
解决:JSP页面中,用‘ ${} ’输出获得的对象的属性,使用错误,例如返回LIST数组,其中存的对象是OBJ(页面中可以定义变量obj代表一

个OBJ),取OBJ的属性AGE,NAME, 应该是${obj.age} ${obj.name}即可获得OBJ的AGE和NAME属性值,
检查在使用${}的地方${obj.age} ${obj.name}是否正确,


异常
不能正常打开JSP文件!(2007.08.31) enough of enjoyment and comfort
Unable to create this part due to an internal error. Reason for the failure: Widget is disposed
org.eclipse.swt.SWTException: Widget is disposed
解决方法:
1 到window-preference-general-editors-file associations下看看你的*.html默认打开方式是什么。
你改成myeclipse html editor就能打开了。
2 问题已经解决,这应该是MyEclipse5.0M2的一个bug,8月11号新发布的版本5.0.1GA已经修复了此bug。


14:56:10,765 ERROR [DispatchAction] Dispatch[/proAdd] to method getOnePro returned an exception
java.lang.reflect.InvocationTargetException

Caused by: java.lang.Error: Unresolved compilation problem:
at com.carry.struts.action.ProAddAction.getOnePro(ProAddAction.java:60)
... 34 more

解决:查找API,解释如下(本错误是因为该方法没有编译)
InvocationTargetException 是一种包装由调用方法或构造方法所抛出异常的经过检查的异常。
从版本 1.4 开始,此异常已经更新,符合通用异常链机制。“目标异常”是在构造的时候提供的,
可以通过 getTargetException() 方法访问,这类对象目前被认为是导致异常的原因,
可以通过 Throwable.getCause() 方法以及后面提到的“遗留方法”访问它。

该异常问题同上!
09:11:22,156 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.actions.LocalStrings', returnNull=true
09:11:22,218 ERROR [DispatchAction] Dispatch[/login] to method tree returned an exception
java.lang.reflect.InvocationTargetException
Caused by: java.lang.Error: Unresolved compilation problem:
Syntax error on token "}", { expected

at com.carry.struts.action.LoginAction.tree(LoginAction.java:60)
... 35 more

你可能感兴趣的:(JAVA)