java web
jebe7282
Fond of Computer Programming
展开
-
unable to locate a constructor on class ..
使用hibernate进行实体查询时报错: unable to locate a constructor on class ..很明显的意思是:在指po类里面找不到构造方法。但是我的问题很奇怪: 我的类里面就有这个构造方法,参数我也进行了比对,没问题。但就是报这个错。 后来我一个一个构造方法试: 发现 构造方法里只要有参数为Timestamp 的原创 2010-05-24 15:17:00 · 1099 阅读 · 0 评论 -
Spring+Hibernate整合 org.objectweb.asm.ClassVisitor.visit
org.objectweb.asm.ClassVisitor.visit 解决Spring+Hibernate整合的时候,发生以下错误:严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoade原创 2009-12-15 19:06:00 · 1899 阅读 · 4 评论 -
After end of result set
java.sql.SQLException:after end of result set;网上找了半天都没找出原因。大家看看我的代码 就知道我错在哪里了。我找到错误后,简直发疯。。 con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root"); Statement s原创 2009-10-25 15:55:00 · 4854 阅读 · 6 评论 -
Mysql 数据库操作类
package cn.com.vanos.db;import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.util.ArrayList;imp原创 2012-04-22 20:04:01 · 995 阅读 · 0 评论 -
An AnnotationConfiguration instance is required to use
SSH 使用HIBERNATE的ANNOTATION ...........报错:" Caused by: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use at org.hibernate.cfg.Configuration.parseMappingEleme原创 2010-07-02 14:27:00 · 9435 阅读 · 2 评论 -
spring 和hibernate 集成 时单元测试
首先继承 AbstractTransactionalDataSourceSpringContextTestspublic class Test extends AbstractTransactionalDataSourceSpringContextTests { @Override public String[] getConfigLocations() { String[]原创 2010-05-14 12:26:00 · 1430 阅读 · 1 评论 -
Struts2 + json + Jquery 简单入门登陆
action 类,模拟登陆。为解决新手struts +json的集成问题,做了一个简单的登陆效果 package com.feikecom.struts2ajax.action;import com.opensymphony.xwork2.ActionSupport;public class LoginAction extends ActionSupport{ privat原创 2010-05-11 19:13:00 · 929 阅读 · 0 评论 -
could not initialize proxy - no Session
正做一个项目,报错了。。不急。网上找下,于是发现了这篇不错的文章。 在中这错误很常见,字面意义就是不能被初始化,因为session已经关闭了。简单理解就是因为,你使用了lazy=true,这样hibernate在从数据库中调数据的时候是不会把关联的对象查出来的,而是保存一个获取值得方法,在你使用getXXX()调用的时候,hiberante会利用这个保存的方法去从数据库中取数转载 2009-09-29 22:56:00 · 430 阅读 · 0 评论 -
getOutputStream() has already been called for this response
getOutputStream() has already been called for this response做验证码时老报这个错,又不影响使用。但看着错误就烦out.clear();out = pageContext.pushBody();可以解决这个问题。原创 2010-06-07 16:57:00 · 590 阅读 · 0 评论 -
INfinite recursion detected .
INfinite recursion detected .字面上意思就是 “检测到无穷的递归”这个错误发生的时候,感觉特别奇怪,我项目里就没有用什么递归。。。应该是struts 内部出问题 这是使用interceptor(拦截器) 跳转到另一个action 后出现的问题否则每次跳到action 之前又要跳到自已写的拦截器上,然后拦截器跳转到action ,在执行action原创 2010-05-10 11:44:00 · 5192 阅读 · 1 评论 -
spring c3p0的配置参数说明
com.mysql.jdbc.Driver jdbc:mysql://192.168.3.110:3306/DBName?useUnicode=true&characterEncoding=GBK root root 5 30 10 60 5 0 60 30 true false com/xh/hibernate/vo/User.hbm.xml org.hibernate.dialect.MySQ转载 2009-11-11 22:30:00 · 635 阅读 · 0 评论 -
设置div 高度为1px
最近搞jquery 。用了2个星期感觉很强大 ,以前 用js不知道怎样写,现在写起来,思路也来的快 在css里面设置一属性:overflow:hidden原创 2009-10-19 21:39:00 · 757 阅读 · 0 评论 -
validate resources java.lang.illegalargumentexception
Path login.jsp does not start with a "/" character 很显然。少了一个"/" 在struts-config 配置文件里。input .path 路径前都要加上“/”(Resources cannot be null关键字: validate resources java.lang.illegalar原创 2009-09-14 19:13:00 · 592 阅读 · 0 评论 -
struts 文件上传
首先配置web.xml <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http:/原创 2009-08-09 17:05:00 · 592 阅读 · 0 评论 -
Tomcat 报java.lang.OutOfStackError:permgen space
java.lang.OutOfStackError:permgen space在linux 服务器上部署三个项目出现此错误...内存溢出,permgen(permanent generation space 内存永久保存区域)三个项目全是用ssh框架做.有这么占空间么.?jkjjkjlkjklj klkjlk jkljkl原创 2010-06-14 14:12:00 · 1021 阅读 · 2 评论 -
给 Extjs grid 加入右键菜单。
给 Extjs grid 加入右键菜单。receiveListGrid.on("rowcontextmenu",function(grid,rowIndex,e){ e.preventDefault(); if(rowIndex<0){return;} var treeMenu = new Ext.menu.Menu ([ { xt原创 2010-05-14 14:59:00 · 4357 阅读 · 1 评论 -
SGML , HTML 和 XML 的关系
XML学习总结: SGML(standard general markup language ) 是一种在WEB 发明之前就已存在的使用标记来描述文档资料的通用语言,它是一种定义标记语言的元语言,HTML和XML都是由SGML 发展过来的. HTML(HyperText Markup Language)是SGML定义下的一个描述性的语言,是SGML 的一个应用 ,它不能用原创 2009-07-17 18:04:00 · 1900 阅读 · 0 评论 -
hibernate配置要点详谈
hibernate-----hibernate配置要点详谈1.两种配置文件: A.hibernate.cfg.xml和B.hibernate.properties A中可含映射文件的配置,而B中hard codes加映射文件。 A.Configuration config=new Configuration().config(); B. Co转载 2009-08-17 16:18:00 · 529 阅读 · 0 评论 -
ognl.MethodFailedException: Method "setRemainig" failed for object
struts2.0 升级到 struts2.1.8.1出了问题。真是郁闷,只要一报这个错误就再也无法访问action . 必须重启服务器。 action 里的属性是float 类型。页面传过的字符串无法转换会float 类型 就会报这种错误 。只要无法转换就会报类似的错误,一报这个错误,就必须重启服务器,郁闷。struts 内置的转换器只要转换不了,就无法进入Act原创 2010-06-07 17:25:00 · 2371 阅读 · 3 评论 -
Communications link failure,The last packet successfully received from the server was *** millisecon
最近做测试,发现Mysql 过一段时间会无法连接,导致数据库数据不一至,极其郁闷。下面是转一哥门的 使用Connector/J连接MySQL数据库,程序运行较长时间后就会报以下错误:Communications link failure,The last packet successfully received from the server was *** millisec转载 2010-06-01 16:11:00 · 26846 阅读 · 4 评论 -
The dialect was not set. Set the property hibernate.dialect
The dialect was not set. Set the property hibernate.dialectload hibernate.cfg.xml 出现了问题获取配置信息代码应该这样写Configuration conf = new Configuration().configure(); 2009.8.31 更新.原创 2009-08-10 21:29:00 · 2057 阅读 · 0 评论 -
No WebApplicationContext found: no ContextLoaderListener registered?
No WebApplicationContext found: no ContextLoaderListener registered? 在整合struts spring 时的错误: 解决: 在web.xml 文件中加 org.springframework.web.context.ContextLoaderListener原创 2009-09-24 16:52:00 · 1034 阅读 · 0 评论 -
Struts fieldError一直不清除
在整合ss 时,Struts fieldError一直不清除将action 交付给spring 进行管理 ,默认是单例模式。要将scope='prototype"设置一下。原创 2010-06-09 13:51:00 · 856 阅读 · 0 评论 -
Linux下安装tomcat的native library
Linux下安装tomcat的native library注:取材网络,收集归纳,以备所需。实例一:安装完tomcat 5 之后经常会出现这样的问题,The Apache Tomcat Native library which allows optimal performance in production environments was not found on转载 2010-06-22 17:48:00 · 7274 阅读 · 2 评论 -
Caught OgnlException while setting property 'min
validator 验证框架验证日期问题。、、、、、、、 1900-0-0 2010-0-0 birthday input is invalid 、、、、、、、、、、一直就报错。Caught OgnlException while setting property 'min'。。。。。。。。。。setMin(java.lang.St原创 2009-09-15 21:49:00 · 1818 阅读 · 2 评论 -
“脏读”、“不可重复的读”、“虚读”
“脏读”、“不可重复的读”、“虚读”以下是我从网上找的:脏读dirty reads:当事务读取还未被提交的数据时,就会发生这种事件。举例来说:Transaction 1 修改了一行数据,然后 Transaction 2 在 Transaction 1 还未提交修改操作之前读取了被修改的行。如果 Transaction 1 回滚了修转载 2009-08-18 09:06:00 · 566 阅读 · 0 评论 -
FireFox IE 之间css 一差别
txt text </ul 此代码在ff 里面显示 :ul 在div 的最左边, 上边补白相差10-20px(大致是这个距离) 在ie 里显示:ul在div 的最右上方。。 为答成一致:在ul 里面可以加入以下:属性: padding:0px; margin-left:0px; margin-top:0px;原创 2009-10-12 22:13:00 · 456 阅读 · 0 评论