[java]
1、nested exception is java.lang.OutOfMemoryError: Java heap space:list
[hibernate]
1、should be mapped with insert="false" update="false":存在重復映射的字段;
2、Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]:
配置文件與實體文件映射錯誤,多了字段或少了字段或少些了getter 方法;
3、org.hibernate.LazyInitializationException: could not initialize proxy - no Session:映射關系中加上 lazy="false";
4、org.hibernate.ObjectNotFoundException: No row with the given identifier exists:根據外鍵id查詢不到映射表的相應數據;
5、Could not determine type for: String, for columns: [org.hibernate.mapping.Column(XXX)]:type指的是*.hbm.xml配置文件中的類型,string要小寫;
6、nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists:映射表中數據的主鍵id不匹配;
7、org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of XXX:配置文件與實體類字段類型不一致;
8、org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1:級聯新增,打印出來的sql語句顯示主表為insert,從表為update 可以將配置文件中自增id設置 unsaved-value="0";
9、ConstraintViolationException: Could not execute JDBC batch update:兩個表建立了外鍵約束,刪除約束后操作成功;
10、 nested exception is org.springframework.beans.NotWritablePropertyException:
11、org.springframework.beans.factory.BeanCreationException:Spring中的“asm-2.2.3.jar”和Hibernate中的“asm.jar”包沖突。解決辦法是移除Spring2.0 AOP Libraries中的“asm-2.2.3.jar”即可
12、org.springframework.beans.MethodInvocationException: 在classes目錄有一個以前的類,但現在的類的路徑已經發生了變化,發生變化的類全部封裝在 jar 里面,但class loader 是優先裝載 classes 目錄下的類,所以存在裝載時發生“NoClassDefFoundError”錯誤!只要把classes下的class文件刪除即可。
13、com.sun.faces.mgbean.ManagedBeanCreationException:數據問題
14、a different object with the same identifier value was already associated with the session:getHibernateTemplate().merge(object);http://chenying.blog.51cto.com/614874/134702
15、MySQLSyntaxErrorException: SELECT command denied to user 'XXX'@'XXX.XXX.XXX.XXX' for table 'XXX':http://ganhaitian.blog.sohu.com/198205957.html
[spring]
1、org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [classes/config/spring/beans/DataSource.xml]:路徑不對
2、spring未注入引起的NullPointException
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); //source目錄(一般是在src目錄下) 第一種獲取配置文件的方式 //ApplicationContext context = new FileSystemXmlApplicationContext("D:\\applicationContext.xml"); //絕對路徑 第二種獲取配置文件的方式
IDao dao = (Dao)context.getBean("dao"); //獲取bean
//dao.add(obj);//正常調用方法
路徑問題
3、 java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required:配置文件未配置sessionFactory
4、com.sun.faces.mgbean.ManagedBeanCreationException: 無法設置受管 bean buildingBean 的屬性 buildingBo:實體類和配置文件映射錯誤
5、啟動 org.springframework.beans.factory.BeanCreationException:asm.jar包沖突
6、
[MySql]
1、mysql 內存表 #1114: The table is full
修改tmp_table_size(set tmp_table_size=314572800;);
修改max_heap_table_size(Set max_heap_table_size=314572800;);
查詢命令: show variables like '%tmp_table_size%'; show variables like '%max_heap_table_size%';
2、Warning: World-writable config file '/etc/my.cnf' is ignored:http://blog.sina.com.cn/s/blog_71261a2d0100yjj1.html
3、mysql Starting MySQL..The server quit without updating PID file:http://www.phpufo.com/?p=560
4、Can't start server: Bind on TCP/IP port: Permission denied Do you already have another mysqld server running on port: 3308http://blog.csdn.net/daodan988/article/details/8378893
5、mysqldump備份數據庫時出現when using LOCK TABLES http://hi.baidu.com/ttianmy/item/236ec32161c8bc9ab6326377
[tomcat]
1、IOException while loading persisted sessions: java.io.EOFException:清理一下tomcat的work目錄
[primefaces][jsf]
1、javax.faces.FacesException: Cannot find component "xxx" in view.:jsf調不到html頁面中"xxx"這個id。
2、javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String:使用標簽<p:pickList 時未定義 converter;
3、com.sun.faces.config.ConfigManager initialize
- 信息: Unsanitized stacktrace from failed start...
4、viewExpiredException 無法恢復視圖http://wenku.baidu.com/view/cf325dd433d4b14e852468c5.html
[dwr]
1、session error :web.xml需要配置 http://nshg.iteye.com/blog/1513181
<init-param> <param-name>crossDomainSessionSecurity</param-name> <param-value>false</param-value> </init-param>
code
faces-config.xml:
<converter> <converter-id>sceneConverter</converter-id> <converter-class>cn.ac.sim.ilec.utils.SceneConverter</converter-class> </converter>
SceneConverter.java:
import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.Converter; import cn.ac.sim.ilec.model.Scene; /** *@description Scene是一個實體類 */ public class SceneConverter implements Converter { @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { Scene scene = new Scene(); scene.setId(Integer.parseInt(value)); return scene; } @Override public String getAsString(FacesContext context, UIComponent component, Object value) { return String.valueOf(((Scene) value).getId()); } }
xhtml:
<p:pickList id="scenesPickList" value="#{ruleBean.scenes}" converter="sceneConverter" var="scene" itemLabel="#{scene.name}" itemValue="#{scene}" showSourceControls="true" showTargetControls="true" showSourceFilter="true" showTargetFilter="true" filterMatchMode="contains" />