1、Hibernate 表字段 为关键字时
17:32:21,281 DEBUG JDBCExceptionReporter:40 - SQL Warning
java.sql.SQLWarning: Unknown table 't_article'
at com.mysql.jdbc.SQLError.convertShowWarningsToSQLWarnings(SQLError.java:770)
at com.mysql.jdbc.SQLError.convertShowWarningsToSQLWarnings(SQLError.java:698)
at com.mysql.jdbc.StatementImpl.getWarnings(StatementImpl.java:2194)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:309)
at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:284)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:186)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
at DB.main(DB.java:13)
17:32:21,281 WARN JDBCExceptionReporter:48 - SQL Warning: 1051, SQLState: 42S02
2、JSON-lib 插件常见问题
/*这个问题可能由于bean 里面有Date 类型的字段,且从数据库里读出来的是java.sql.Date赋值给了java.util.Date,转化成JSONArray时出错;可以在从数据库读出Date 时直接写成:new java.util.Date(rs.getDate("date").getTime),这样就不会出错了;*/
10:57:01,484 ERROR [STDERR] net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
at net.sf.json.JSONObject._fromBean(JSONObject.java:959)
at net.sf.json.JSONObject.fromObject(JSONObject.java:194)
at net.sf.json.JSONObject._processValue(JSONObject.java:2793)
at net.sf.json.JSONObject._setInternal(JSONObject.java:2817)
at net.sf.json.JSONObject.setValue(JSONObject.java:1527)
3、Jboss 5 的怪问题
//该问题是之前加载过一个struts2.01的版本,而现在用的是2.1的版本,可能jboss有点缓存造成下面的错误,解决办法是把原来部署的项目删掉再部署。
Servlet.service() for servlet jsp threw exception
Getting java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade cannot be cast to javax.servlet.http.HttpServletRequest