07 2013 档案
struts spring整合出错
摘要:Unable to load configuration. - bean - jar:file:/E:/apache-tomcat-6.0.18/apache-tomcat-6.0.18/webapps/Reg_05/WEB-INF/lib/struts2-spring-plugin-2.3.14.2.jar!/struts-plugin.xml:29:132 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.st 阅读全文
posted @ 2013-07-25 20:49 xxyyjj 阅读(244) 评论(0) 推荐(0)
hibernate.cfg.xml
摘要:hibernate.cfg.xml这个配置文件;从以前项目中copy来的文件,之前一直报错,后来替换了这个文件便好了 阅读全文
posted @ 2013-07-22 23:58 xxyyjj 阅读(106) 评论(0) 推荐(0)
myeclipse copy问题
摘要:copy工程后,加入hibernate,然而hibernate.cfg.xml没有改动,数据库也是错的;实体类也没有注入,但是单体测试居然通过了 阅读全文
posted @ 2013-07-22 23:42 xxyyjj 阅读(155) 评论(0) 推荐(0)
myeclipse copy时出的问题
摘要:copy一个web项目,先在poperties->web里把项目名改掉,然后add如tomcat里面,此时就可以http:localhost:8080/xxx了。但是这次出问题了,做完几个步骤之后,发现连不上。404了,删掉重来还是如此,tomcat的webapps有这个项目,但是在在works文件夹里面却有些问题。只有SESSIONS.ser。出现这个情况原因到现在还是不明。后来觉得copy的那个项目没有加到tomcat里面,于是先把本项目add进tomcat,再copy,这次就可以了。 阅读全文
posted @ 2013-07-22 00:02 xxyyjj 阅读(210) 评论(0) 推荐(0)
mysql sql 语句
摘要:之前"select count(*) from user where username="+username ;一直报错,随便输入什么username,全部都报错,说没有对应的column,于是吧语句在mysql上敲,发现,要加如'';"select count(*) from user where username='"+username + "'"; 阅读全文
posted @ 2013-07-17 23:37 xxyyjj 阅读(133) 评论(0) 推荐(0)
Spring_Hibernate
摘要:org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63) at org.hibernate.impl.SessionFactoryImpl.getCurrentS 阅读全文
posted @ 2013-07-14 17:29 xxyyjj 阅读(186) 评论(0) 推荐(0)
hibernate @JoinColumn
摘要:当关系是双向的时候,@JoinColumn要加在多的哪一方如果加在one的一方就会多出一个字段group-user @OneToMany(mappedBy="group") @JoinColumn(name="groupId") public Set getUsers() { return users; }sql为: create table t_user ( id integer generated by default as identity (start with 1), name varchar(255), group_id integer,.. 阅读全文
posted @ 2013-07-08 20:00 xxyyjj 阅读(527) 评论(0) 推荐(0)
import 别人的项目出的问题
摘要:org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.co 阅读全文
posted @ 2013-07-07 22:17 xxyyjj 阅读(246) 评论(0) 推荐(0)
打破关联
摘要:org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.java.model.User#1] at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1042) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(Defau 阅读全文
posted @ 2013-07-02 23:03 xxyyjj 阅读(268) 评论(0) 推荐(0)
hibernate crud
摘要:org.hibernate.HibernateException: 'hibernate.dialect' must be set when no CosessionFactory=new AnnotationConfiguration().configure().buildSessionFactory();在加入红色的之后变好了然后又org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCachePr 阅读全文
posted @ 2013-07-01 22:32 xxyyjj 阅读(502) 评论(0) 推荐(0)