0?? ??瑕???璇?绗?
a) 涓??ㄥ?芥?闆??
1?? ??娉?琛ㄨ揪寮?寮?濮?
b) ????涓㈠け????.
2. no data found
a) ????setInt(1,100)涓?,娌℃??100杩?涓???
3. ?句??扮????
a) ????娌″?煎?ュ??
4. ??瀹?浜?????URL
a) ?????版??搴?????IP??璇?,?寵??ュ?洪??
5. 绫昏礬寰?娌℃???懼??
a) ???? ClassNotFoundException: oracle.jdbc.driver.OracleDriver
b) ????: 涓???????????????,????娌℃??import??,????娌℃???ㄧ被璺?寰?涓??懼??ar??浠?
c) 瑙e?? 娌℃????杞?racle椹卞??ar,??bash_profile涓???ojdbc14.jar??杩???
6. 绌烘????寮?甯?
a) ???? ?版??婧???璇? 姣?濡??版??搴?????IP??璇?
7. 涓??芥?ц??ヨ??
a) ???? ?版??搴?涓?琛ㄧ????棰?,姣?濡?????涓?瀛???
8. invalid identity
a) ???? ?????洪??
9. ?ュ?ㄦ?版??搴?涓???寤轟? 涓や釜sequence ,杩?琛??跺?虹?闆?甯稿???芥???????ц?浜?澶?娆?elect璇???瀵艱?翠???????搴????蜂駭???茬??
10. 琛ㄥ????????涓?瀛???
a) ????琛ㄤ?瀛??ㄦ????娌℃?????ユ?版???拌〃涓?
11. 涓???????绫?绫葷????????璇?
a) ????娌℃??瀵煎??dk5.0,????缂?璇??ㄤ?涓?.4
12. MappingNotFoundException
a) Maybe: In the Eclipse Not refersh , or not exist in the dirctory
13. HibernateException: /hibernate.cfg.xml not found
a) Maybe1: hibernate.cfg.xml not in the root directory
b) Maybe2: Could not parse configuration .
c) resolve: database not connect or use another database
14. ConstraintViolationException
a) Maybe: used a not true database
15. 椹卞?ㄦ病???懼?????? JDBC Driver not found
???斤?杩??ユ?版??搴???椹卞??ar??涓?瀛??ㄦ????????涓?涓??達?姣?濡?灏??х???????㈡???扮??浼?????璇ョ被??璇?
16. 绌烘????寮?甯?锛? java.lang.NullPointerException
a) ????锛??版??搴?杩??ュ?洪??锛?姣?濡???ibernate.cfg.xml涓????版????璇?浼?瀵艱?村?甯搞??
17. ?版?????ュ?甯?锛?GenericJDBCException: could not insert
a) ????锛?娌℃??寤虹??琛ㄦ????琛ㄤ腑娌℃??浠諱??版??
b) ????锛????ユ?版????娌℃???ц???浜よ???ワ?commit
18. LazyInitializationException ????寤惰???杞藉?甯?
a) ????锛?娌℃???ㄦ?ヨ?㈣???ヤ腑??fetch
19. IdentifierGenerationException
a) ????锛?楂?浣?琛ㄦ病????濮???锛?姣?濡?hi_value涓?娌℃??璁闆?)
20. could not initialize a collection: [hibernate.entity.Role.modules#32768] Syntax error: Encountered "-" at line 1, column 132.
a) ??璇?????锛?<set name="modules" table="module-role" lazy="false">绾㈣?插???ㄥ??涓???-??涓洪??娉?瀛?绗???挎??負module_role
21. could not insert collection rows: [hibernate.entity.Module.roles#1]
??odule.hbm.xml??浠剁??濡?涓???缃?涓?????nverse=??true??
<set name="roles" table="module_role" inverse="true">
22锛??ㄩ?ㄧ講Struts?訛??虹?闆?涓???璇?淇℃??锛?
HTTP Status 404 - Servlet action is not available
type Status report
message Servlet action is not available
description The requested resource (Servlet action is not available) is not available.
??棰?????锛?
1.??web.xml??浠朵腑????缃?ActionServlet??
2??struts-config.xml??浠舵????缃?浣?瑕?璁塊????Action??
3??浣???jsp??浠?orm??璁頒腑action灞??х??璺?寰???绉伴??璇???
4????浠ヤ?涓?绉????點??
??瀵逛互涓?4绉????電?稿???瑙e?蟲?規?濡?涓?锛?
1????eb.xml??浠朵腑??涓?ActionServlet????缃?淇℃??
?????? /WEB-INF/struts-config.xml?
?2????truts-config.xml??浠舵??ヤ?瑕?璁塊????Action??缃???浠躲??
3??妫???sp??浠?orm??璁頒腑action灞??х??璺?寰???绉版?????struts-config.xml??浠朵腑action??璁扮??path灞??х??璺?寰???绉頒??淬??
4????浠ヤ????電??瑙e?沖??娉?灏辨??妫???eb瀹瑰?ㄧ??log?ュ?锛?濡?????omcat??妫??ヤ?logs??褰?涓???localhost_log??浠訛?????杈規?????闆?????璇?淇℃??锛??跺???規????璇?淇℃????绀哄??剁?姝c??
23锛?java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
缂哄?spring-framework-2.0.3/lib/jakarta-commons/commons-beanutils.jar
24.
ava 浠g??Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type??
缂哄?spring-framework-2.0.3/lib/asm/asm-2.2.2.jar??,????涓???,璇ュ??????瀛????稿????哄??
java 浠g??Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException??
缂哄?spring-framework-2.0.3/lib/dom4j/dom4j-1.6.1.jar??,????涓???,璇ュ??????瀛????稿????哄??
??杩?涓???杩??誨氨??浠ヤ?锛?/Spring206/lib/dom4j??dom4j-1.6.1.jar
java 浠g??Caused by: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap??
缂哄?spring-framework-2.0.3/lib/jakarta-commons/commons-collections.jar??,????涓???,璇ュ??????瀛????稿????哄??
java 浠g??Caused by: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter??
缂哄?spring-framework-2.0.3/lib/cglib/cglib-nodep-2.1_3.jar??,????涓???,璇ュ??????瀛????稿????哄??
java 浠g??Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor??
缂哄?hibernate-3.2/lib/asm.jar??,????涓???,璇ュ??????瀛????稿????哄??
java 浠g??
org.hibernate.exception.SQLGrammarException: could not load an entity: [www.proudsoul.xml.User#1]
JAVA宸ョ?涓?WEB宸ョ??????哄??:涓?涓???asm.jar,涓?涓???jta.jar
java 浠g??Caused by: java.lang.NoClassDefFoundError: javax/transaction/TransactionManager??
缂哄?spring-framework-2.0.3/lib/j2ee/jta.jar??,????涓???,璇ュ??????瀛????稿????哄??姝ょ???璇?璇鋒??ョ?稿???***.hbm.xml??缃???浠剁????缃?
25,
Exception in thread "main" org.springframework.dao.InvalidDataAccessResourceUsageException: could not get next sequence value; nested exception is org.hibernate.exception.SQLGrammarException: could not get next sequence value
Caused by: org.hibernate.exception.SQLGrammarException: could not get next sequence value
????锛?娌℃????Sequence?????版??搴????矽?????浜?
26,
??????缃???浠?
??? <id name="id" column="id">
??????????? <generator class="native" />
??????? </id>
?跺????杩?琛?淇?瀛?涓??℃?版??杩???
The database returned no natively generated identity value
灏變??ヨ?涓???璇?
??涓轟?native???規????搴?灞??版??搴????藉??????dentity, sequence ????hilo涓???涓?涓?
????寤鴻〃???跺??id娌℃????瀹?
alter table `student` change `id` `id` int auto_increment
??浠?????浠???琛ㄧ??缁???灏?灏????瑰?ㄤ?涓?灏辨病??棰?浜?
27,
UpdateManager??娉?????007-08-09 15:21濡????ㄥ??ㄧ?搴?瀹?瑁?杩?绋?涓?锛??村??涓???瀹?瑁?绋?搴?锛?浼??虹?闆?涓??跺?碉?1.apt-get remove ??dpkg --remove ??娉????よ蔣浠?2.UpdateManager??娉?????.?扮??寰?杞?浠跺??绠$??绋?搴???娉?????
浠ヤ????芥??deb????涔?绫婚??????
sudo dpkg -r sqldveloper
姝e?ㄨ?誨??杞?浠跺????琛?.. 瀹???
姝e?ㄥ????杞?浠跺????渚?璧??崇郴??... 瀹???
E: 杞?浠跺?? sqldeveloper ??瑕????闆??瑁?锛?浣???????娉??懼?扮?稿???瀹?瑁???浠躲??
瑙e?蟲?規?锛?1.浠? /var/lib/dpkg/status 涓???瀵瑰???娈靛????
??瑕?锛?淇??逛???璇峰??澶?浠?
??tatus涓??懼?頒?瀵瑰????????ゅ氨OK浜?...
28,
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/ANTLRException
灏?浜?antlr-2.7.5H3.jar??,浠?D:/eclipse/eclipse/plugins/com.genuitec.org.hibernate.eclipse_4.1.1/myeclipse-data/3.0/lib
29,
Caused by:
java.lang.NoClassDefFoundError: javax/transaction/Synchronization
缂哄?Spring206/lib/j2ee/jta.jar
30,
Caused by:
java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy3] to required type [business.impl.PriceBiz] for property 'priceBiz': no matching editors or conversion strategy found
??ava绫諱腑璁劇疆priceBiz?跺?璇ヨ?劇疆?????ュ??riceBizIf锛?????瀹??扮被
31, ?扮?瓒???
????: ?ㄥ?戒護琛????㈤??瑕????ュ????
????:???ョ?????伴??璇?
32, car is not mapped
????: ??fg.xml涓?娌℃??澧?????灏???hbm.xml??浠跺??lt;mapping.../>涓??
?
33, 灞??ф病???懼??
????: hbm.xml??浠朵腑?? <property name =""> ????棰?, 涔?璁告??name???間?瀵瑰?绫諱腑????????涓?涓???
34,SQLException: ??褰???杩??ヂ????????? ????:?ㄦ??濡???寤哄??鋒?舵病??瀵圭?稿????規?娣誨????lt;list>涓???姣?濡?杩?涓?娌℃??????<value>newAccount</value>
Java浠g??
- <bean?id= "transactionAdvisor" ? class = "org.springframework.aop.support.NameMatchMethodPointcutAdvisor" >??
- ???<property?name="advice" >??
- ????<ref?bean="advice" />??
- ???</property>??
- ???<property?name="mappedNames" >??
- ????<list>??
- ?????<value>transfer</value>??
- ????</list>??
- </bean>??
35,SQLException: Syntax error: Encountered "table" at line 1, column 8.
????;?ц?SQL?跺?虹?闆?茬??,???芥??SQL璇??ヤ腑浣跨?ㄤ??抽??瀛?浣?涓哄?????ョ??姣?濡?
?? update order set balance=1000000;
?? ?朵腑order琚??ㄤ?琛ㄥ???ヤ嬌??杩?????璇???,??涓?rder??涓??抽??瀛?,?ㄥ??rder by涓?
36, Servlet /Spring-WebMvc threw load() exception
org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
jar?????茬??,spring-1.2.6.jar??spring.jar?虹?闆?ㄤ?涓?war????褰?涓?:JBoss/server/all/deploy/Spring-WebMvc.war/WEB-INF/lib???
37, java.sql.SQLException: 褰?浜??′?澶?浜?娲誨?ㄧ?舵???訛???娉??抽??杩??ャ??
38 ,
validateJarFile(/home/soft01/Tomcat/webapps/sms-token-struts/WEB-INF/lib/servlet-api.jar)
Servlet /sms-struts-tiles threw load() exception
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
????:??EB-INF/lib/ ??褰?涓???servlet-api.jar涓?/Tomcat/common/lib??褰?涓???servlet-api.jar?茬??浜?,??WEB-INF/lib/涓???servlet-api.jar???ゅ氨??浠ヤ?
39,java.lang.ClassNotFoundException: org.springframework.web.struts.ContextLoaderPlugIn
Marking servlet action as unavailable
10:30:47,088 ERROR [/NetCT_OSS]:3953 - Servlet /NetCT_OSS threw load() exception
javax.servlet.UnavailableException
40,org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
缂哄?MyEclipse/eclipse/plugins/com.genuitec.eclipse.springframework_5.5.0/data/2.0/dist/modules/spring-struts.jar
41,Caused by: java.sql.BatchUpdateException: ORA-02291: integrity constraint (SD0702.FK82D343CF49A4B831) violated - parent key not found
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
?????芥??ID????绛??ョ????棰?,??灏?瀹?XML??灏???浠舵?規??<generator class="increment" />灏卞ソ浜?
42,
2007-08-19 16:21:43,290 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OSS].[action]] - Servlet.service() for servlet action threw exception
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [entity.Module#2]
java.util.ConcurrentModificationException
????:宸茬???瀵矽薄?ユ??浜??????╃??module,??lear(),??涓???remove();
43,
ERROR [org.apache.catalina.session.ManagerBase] - IOException while loading persisted sessions: java.io.InvalidClassException: entity.Module; local class incompatible: stream classdesc serialVersionUID = -5988350031935445758, local class serialVersionUID = -297934247726484429
java.io.InvalidClassException: entity.Module; local class incompatible: stream classdesc serialVersionUID = -5988350031935445758, local class serialVersionUID = -297934247726484429
??odule涓???涓?涓?涓??抽??瀛?:transient
44,
Caused by: java.sql.BatchUpdateException: ORA-02292: integrity constraint (SD0702.SYS_C00132664) violated - child record found
????:???朵???琛ㄥ??ㄤ?璇ヨ〃??澶?寤???浠ユ?ヨ?涓?寮?甯?濡???娌℃??寮??ㄥ氨涓?浼??虹??
45,
?虹?版?扮?瓒??????跺??,??????涓???寰????舵病????=,姣?濡?:
for(int i = 1; i<arr.length;i++)??浠ユ?規??
for(int i = 1; i<=arr.length;i++)
46.濡???浣跨??nt??Junit??琚??ユ?句???est,妫??ヤ?涓????????ㄤ?private
?洪??淇℃??锛?
??? <failure message="No tests found in test.AllTest" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: No tests found in test.AllTest
璇ラ??璇???涓?寰??瑰?????圭?癸?褰?浣?涓???杩?ant?ヨ?琛?娴?璇?锛???????杩?AllTest绫繪?ヨ?琛???璇?锛???浠ユ?e父杩?琛???灏?蹇???
47.濡??????版?ワ?琛ㄥ??????锛?涓?jvm?ヤ弗????璇?锛???????涓????ㄤ??版??搴???淇????抽??瀛??ュ??琛ㄥ??浜?锛?濡?User??
48.浣跨??nt?跺?椤誨?蹇?ant??classpath瀹??ㄧ??涓???IDE??classpath锛?灏?蹇?!
49.灏?蹇?涓?杈圭??寮?甯革?
exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of xp.bean.Users.?" type="net.sf.hibernate.PropertyAccessException">java.lang.ClassCastException at xp.bean.UsersMetaClass1.setPropertyValues(<generated>) at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues
涓?娆″?虹?拌?ラ????璇?????????:
婧???浠堕??????class绫誨??涓轟?涓?绫?ontact contact
??璺???apping???存??浜?Set,?靛?靛??瀹熾??
50.绐??堕?村???哄ぇ????NullPointException
????uild涓?涓???
51.="Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade"
52.Tapestry???洪??淇℃??锛?
Class com.bookshop.Hello does not implement the IPage interface.
location: context:/WEB-INF/Home.page, line 6
????锛?涓??劇ず???崇????涓?java绫繪病??浠?IPage瀹舵??缁ф?褲??
53.浣跨??nt?剁??虹??璺?寰?濂借薄涓???璁稿?虹?扮┖?箋??
54.?變?浣跨??nt?剁??unit??娴?璇???璇?锛?classpath涓??虹??2ee.jar??璇?锛???棰?澶?澶???渚?濡?xml?煎???log??浠剁????涓? 浜?锛??????跺???NullPointException绛?????浠ユ??璁劇疆浜?涓や釜??涓?????j2ee.jar锛?涓虹?璇????涓?涓?娌℃??,涓?unit??
55.杩?琛?????娴?璇??訛??ㄦ?ヨ?㈣?????搴?椹?涓?assertNotNull()锛?杩??峰??浠ユ?村揩????瀹?浣?NullPointException
56.瑕?浣跨??esourceBundle??璇?锛?瑕???涓?灏?蹇???蹇?椤葷?ㄦ?ュ?璁闆?涓?瀹????舵????杩???璇ュ??ф??浠跺?璇ユ?懼??lasses涓?????
57.褰?瑕??劇ず浠諱?椤甸?㈡?訛??借???绀烘????锛??d?搴?璇ユ??ヤ?涓?lib??褰?浜?锛?杩???涓?浜?寰?濂?????寮?甯革?渚?濡?浣???????浠ユ?懼?頒?涓?绫諱??????″?ㄥ?存??绀?ClassNotDefException锛??d?浼拌?℃??缂哄?浜?璇ョ被??蹇?椤葷????浜???????澶?浜?涓??煎?圭????锛?濡?, xdoclet绯誨????涓?琚?struts??lib??褰????煎??
58.缂???clone?朵?Java缂?绋?????2nd)涓?瀛??扮??(732)锛?
.寮??頒???杩?绋?涓?浼????ㄤ駭??????(alias)??
.娌℃??灞???瀵矽薄(local objects)锛?????灞????х??(local)references??
.reference??????scope)?????訛?瀵矽薄??????
.瀵矽薄??瀵垮?戒??ヤ???Java??璁ㄨ?鴻??棰?(??涓烘?????懼???舵?哄??
59.try catch finally????灞??舵????绂葷????
60.jsp涔辯?????朵腑涓?涓?????锛?charset="gb2312" 绛???="??涓よ竟涓???璁告??绌烘?箋??
61.?????轟?Displaytag??绠????ヨ〃瑙e?蟲?規???
http://displaytag.sourceforge.net/
涓?杞?isplaytag.jar??displaytag.tld
displaytag.jar?懼??ib??褰?锛???displaytag.tld?懼??EB-INF??褰?锛???eb.xml涓?涓?isplaytag.tld澹版??涓?涓???
<taglib>
??? <taglib-uri>http://displaytag.org</taglib-uri>
??? <taglib-location>/WEB-INF/displaytag.tld</taglib-location>
</taglib>
??sp??浣跨?ㄥ??锛???涓?
<%@ taglib uri="http://displaytag.org" prefix="display" %>
???????
娉ㄦ??璇ヨ蔣浠舵??涓?bug锛?浠?瑕??ㄧ??涓?涓???common-lang.jar????蹇?椤誨??.0浠ヤ???
濡???纰闆?頒??㈠?甯革???搴?????涓?涓??????ュ??????????棰???
java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.capitalize(Ljava/lang/String;)Ljava/lang/String;
?跺??灏卞???懼?浣跨?ㄤ?
<display:column property = "xxx"/>?朵腑xxx涓哄?矽薄涓???甯???getter??????>??
瀹?涔?琛ㄦ?肩???峰??锛???ss瀹?涔???濡?
TABLE.its THEAD TR {
BACKGROUND-COLOR: #69c
}
TABLE.its TR.even {
BACKGROUND-COLOR: #def
}
?ㄤ嬌?ㄥ??椤墊?訛????戒??虹?拌?绉????碉??瑰?誨?朵?椤墊?訛?寮瑰?轟?杞界???o?璁╀?涓?杞藉???jsp椤甸???杩?????涓轟??ㄥ???椤甸?㈣?誨??浜??版????缂?????瑙e?沖??娉?涓哄??ction??璇誨???版????涓?????sp??????浠ュ????
http://www.displaytag.org/example-paging.jsp?d-26189-p=2
62.浣跨??isplaytag?訛??ㄤ???涓??懼?ュ?涓???绱?
蹇?椤誨??isplay:table涓?瀹?涔?涓?涓?id
<display:table name = "allBooks" class = "its" pagesize = "5" id = "item">
<display:column title = "??浣?">
??? <a href = "/Bookshop/admin/bookManagement.do?action=view&id=<%=((Book)item).getId()%>" target = "_blank" >?ョ??</a>
??? <a href = "/Bookshop/admin/bookManagement.do?action=edit&id=<%=((Book)item).getId()%>">缂?杈?</a>
??? <a href = "/Bookshop/admin/bookManagement.do?action=delete&id=<%=((Book)item).getId()%>">????lt;/a>
</display:column>
瑕???isplaytag涓?浣跨?ㄩ?炬?ワ?蹇?椤誨?峰?paramId锛?????涓??劇ず涓洪?炬??
<display:column property = "product.name" href = "viewDetailV2.0.jsp" title = "涔???" paramId="item" paramProperty="product.id"/>
??浠ヨ??蜂嬌??isplay
<display:column property = "product.id" title = "ID"/>
?朵腑product涓哄?矽薄
63.<bean:write name = "xxxx" property = "xxx"/> ??浠ョ?存?ュ????ession.getAttribute()???扮??涓?瑗褲??
64.瀹?楠?struts-upload渚?瀛??惰?娉ㄦ?????版?癸?
?? 1.If you would rather write this file to another file, please check here:
杩?涓?琛?瑕?????
?? 2.If you checked the box to write to a file, please specify the file path here:
?ㄨ???瑕????藉??濡?锛?c:/b.jpg
涓?浼???????璇?锛?浼??虹?版??绀?The file has been written to "c:/b.jpg"
65.Hibernate??like??浠ヨ?涔????
????? Query query = session.createQuery("from src.persistent.Book as book where upper(book.name) like :name ");
????? query.setString("name", "%");
????? result = query.list();
66.Hibernate?虹??duplicate import : className
寮?甯鎬????芥????涓哄?浜?涓烘??涔?绫誨??onfiguration涓?addClass浜?
?????
67.<logic:iterate id = "author" name = "authors">
name??寮??ㄧ????session????attribute??
68.濡??????拌??虹?拌?㈤??涓?杞界?????碉??????芥????涓鴻?璺寵漿??椤甸?㈠?虹?頒???棰???璇?璇??ㄨ?璺寵漿?扮??椤靛????
<%@ page contentType="text/html; charset=gb2312"%>
69.濡???JSP椤甸?㈣煩杞??跺?虹?頒?杈圭????璇?淇℃??锛?
The request sent by the client was syntactically incorrect (Invalid path /web/shoppingCart was requested).
??????struts-config??action = "x" ????浜? action = "x.do"
70.??truts涓?锛?strut-config.xml涓?锛?forward?朵嬌??edirect = "true"??浠ュ?.do??瀹???涓?jsp
71.浠ュ???ㄥ?ゆ???哥???т???????ogger??涓や釜?兼?劇ず?烘?ャ??
72.浠?session??getAttribute??锛?淇??瑰苟涓???瑕?????etAttribute涓?娆°??
73.??ibernate涓?浣跨??ubclass??涓?妫電戶?挎???辯?ㄤ?涓?琛??浠?????涓?mapping??
姣?涓?绫諱腑蹇?椤繪??discrimator-value???ㄦ??涓?灞???绫諱腑蹇?椤誨0??锛?
@hibernate.discriminator column = "class"??
涓???浠ュ?瀛?绫繪坊????onfiguration???彙??(?充???addClass(瀛?绫?)
浣跨??doclet??寤虹??subclass??渚?瀛?(璇ョ被???剁被)
??浣跨??oined-subclass????涓?绫諱?琛?涔?涓?璁稿?瀛?绫繪坊??杩?configuration???彙??
濡??????扮??????mapping??浠朵腑joined-subclass??key column涓虹┖锛??d????芥[email protected]杩??ユ病????瀵廣??
??oined-subclass??????琛??浠?缁?????Member extends Customer
create table Customer (
?? id VARCHAR2(255) not null,
?? name VARCHAR2(255),
?? description VARCHAR2(255),
?? primary key (id)
)
create table Member (
?? customer_id VARCHAR2(255) not null,
?? password VARCHAR2(255),
?? primary key (customer_id)
)
74.??unit涓?灏介??浣跨??ssertEquals浠f??ssertTrue;
75.Hibernate
濡???Child extends Parent
?d?from Parent as parent 涔?灏?浼?灏?Child???烘?ワ???from Child as child ??涓?浼?????arent
76.Hibernate
浣跨??ibernate??one-to-one?訛?搴?璇ヤ袱?瑰????et,????浼???ave NullPointException
parent.setChild(child);
child.setParent(parent);
77.Hibernate
???頒?杈圭??寮?甯革?浼拌?℃??涓???涓哄????虹?頒???棰?锛?
java.lang.NullPointerException
at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyValue(AbstractEntityPersister.java:675)
at net.sf.hibernate.id.ForeignGenerator.generate(ForeignGenerator.java:33)
濡?:
* @hibernate.id generator-class = "foreign"
* @hibernate.generator-param name = "property" value = "customer"
* @hibernate.one-to-one name = "custmoer" class = "src.persistent.Customer"
value???煎??one-to-one 涓?name???間?绗????浼??虹?頒?杈圭??寮?甯搞??濡???涓??劇ず??瀹?name??榛?璁ゅ????????????
濡?
Customer a
??name = "a" ??瑕?灏?蹇?????涓???绫誨??????浠ワ?浠ュ????濂芥?劇ず??瀹???瀛?涓哄ソ??
78.?虹?闆?甯革?
Exceptionobject references an unsaved transient instance - save the transient instance before flushing: src.persistent.Product
????娌℃??涓烘??瀵矽薄杩?琛?set璁劇疆锛? 濡?涓?杈圭??杩?涓?灏辨????瀵矽薄娌℃??璋???etProduct
79.
"xxx action = "/a" 涓???do???圭??褰???
<a href = "b.do" ??瑕?.do???圭??褰???
80.
Caused by: java.sql.SQLException: ORA-02291: 杩???瀹??寸害???′歡 (BOOKSHOP.FK4AAEE
47687CCA6B) - ???懼?扮?堕」?抽??瀛?
濡???浣?瑙?寰?璇ュ????e???虹?拌?涓???棰?锛??d?妫??ヤ?涓?锛??????绫葷??缁ф?垮?崇郴??ibernate??mapping涓?????浜??烘?ャ??joined-subclass??subclass
渚?濡?a extends b
濡?????涔?绫? ??瑕?Set??????涔?绫?锛??d?浣???b浼??ワ???b??娌℃????apping涓?灏??跺???崇郴?????烘?ョ??璇?锛?灏變??虹?拌?ュ?甯?
81.浣跨??ynaActionForm??瑕?娉ㄦ??????棰?
??truts-config澹版??
<form-bean name="memberloginForm" dynamic ="true" type="org.apache.struts.action.DynaActionForm">
<form-property name = "name" type = "java.lang.String"/>
<form-property name = "password" type = "java.lang.String"/>
</form-bean>
??ction??灏?form寮哄?惰漿????DynaActionForm锛??跺??get("灞??у??")灏卞??浠ヤ?
82.struts??validate??绠???瀹???
1.棣?????澶?濂介??璇???绀轟俊????
xxx.properties ??
errors.required={0} is required.(榛?璁ゅ凡??)
2.Form蹇?椤諱?ValidatorForm缁ф??
3.涓???浠ラ??杞?alidatorForm??validate?芥??
4.??alidate.xml涓?涓轟??抽??璇???琛ㄥ??杩?琛?楠?璇?璁捐?°??渚?濡?
<form name="logonForm">
??? <field property="userName" depends="required">
<arg0 key="prompt.userName"/>
(璇ュ???闆??ㄦ?劇ず??璇?淇℃????浠?xxx.properties璇誨??prompt.userName,濉???}?規???烽??锛???浠???濡?????arg1灏?灏?濉???1}浣?缃?锛?浠ユ?ょ被?ㄣ??
??? </field>
</form>
涓???瑕???ction????浠諱?澶???????绠?orward灏辮?浜???浣?涓?orward??????椤碉?涓???瑕?浠諱????崇?ㄤ?澶????洪??淇℃????澶?????
83.???″?ㄦ??
The requested resource (/xxxx/xxx.htm) is not available.??寰?濂?????涓?涓??????藉????
??eb.xml涓?瀹?涔???tld锛?娌℃???懼??
??????lib??褰?涓?????澶?澶??虹?頒???棰???
濡?
<taglib>
??? <taglib-uri>/spring</taglib-uri>
??? <taglib-location>/WEB-INF/spring.tld</taglib-location>
</taglib>
濡?WEB-INF??褰?涓?涓?瀛???pring.tld??璇?锛?灏變??ヤ?杈圭????璇?
84.
spring??xxx-servlet.xml??浣跨??impleFormController绯誨????绫婚??棰?锛?
<bean id = "priceIncreaseForm" class="PriceIncreaseFormController">
??? <property name="sessionForm"><value>true</value></property>
??? <property name="beanName"><value>priceIncrease</value></property>
??? <property name="commandClass"><value>PriceIncrease</value></property>
??? <property name="formView"><value>priceIncrease</value></property>
??? <property name="successView"><value>hello</value></property>
??? <property name="productManager">
????? <ref bean="prodMan"/>
??? </property>
</bean>
杩???瑕?娉ㄦ????涓???棰?锛?
(1)涓?杈圭??PriceIncrease??浜?绫誨??锛?蹇?椤誨??lasses??瀛??ㄨ?ョ被锛??????ワ?
PropertyVetoExceptionsException: 1 errors:-- ErrorCodedPropertyVetoException: message=[Failed to convert property value of type [java.lang.String] to required type [java.lang.Class] for property named 'commandClass'; nested exception is:
java.lang.IllegalArgumentException: Invalid class name [PriceIncrease]: PriceIncrease]; errorCode=[typeMismatch]
java.lang.IllegalArgumentException: Invalid class name [PriceIncrease]: PriceIncrease
(2)<property name="formView"><value>priceIncrease</value></property>
杩?涓?琛?蹇?涓???灏?锛?priceIncrease??椤甸?㈢????瀛?锛?浠?灏?浼???prefix + priceIncrease + suffix
濡???缂哄?璇ヨ?锛????ワ?
javax.servlet.ServletException: Error in ModelAndView object or View resolution encountered by servlet with name 'pocketSpring': View to render cannot be null with ModelAndView [ModelAndView: materialized View is [null]; Model=[{[email?protected], org.springframework.validation.BindException.priceIncrease=org.springframework.validation.BindException: BindException: 0 errors}]]
浣跨??rrors??rejectValue?稿?抽??棰?锛?
rejectValue(java.lang.String field, java.lang.String errorCode, java.lang.Object[] errorArgs, java.lang.String defaultMessage)
Reject the given field of the current object, using the given error description.
褰???瀵矽薄??????xxx-servlet.xml涓?涓?validator绫繪????绯葷????涓?瀵矽薄??
?????????
绗?涓?涓???锛?褰???瀵矽薄??灞??у??锛?蹇?椤誨????
绗?浜?涓???锛?灏?瑕?浠?灞??ф??浠朵腑璇誨????娑???
绗?涓?涓???锛?浼???缁???璇誨????娑????????幫?濡?锛?
error.too-low=You have to specify a percentage higher than {0}!
绗???涓???锛?褰?浠?灞??ф??浠朵腑璇誨??娑???涓??????訛???reject????
浠ュ??浠?request涓?璇誨??parameter??浠ュ????pring??RequestUtils??????
getStringParameter
public static java.lang.String getStringParameter(javax.servlet.http.HttpServletRequest request,
?????????????????????????????????????????? &bsp;????? java.lang.String name,
????????????????????????????????????????????????? java.lang.String defaultVal)
Get a string parameter, with a fallback value. Never throws an exception. Can pass a distinguished value to default to enable checks of whether it was supplied.
涓?浼???寮?甯?
Hibernate????棰?锛?2.1rc????棰?
INFO: cache provider: net.sf.ehcache.hibernate.Provider
net.sf.hibernate.HibernateException: could not instantiate CacheProvider:
瑙e?沖??娉?锛?2.1rc姣?浠ュ????????澶???瑕?涓?涓???
ehcache.jar
85.static????棰?
static?芥?闆????浠ヨ?塊??static??????????
??static??????浠ヨ?浠諱??????芥?拌?塊????
86.
java.lang.NoClassDefFoundError: javax/transaction/Synchronization];
??瑕?娣誨??JTA.jar