Error:
% Error creating sessionfactory %
Org. hibernate. mappingexception: repeated column in mapping for entity: y2ssh. shyy. xmal4.entity. Bid column: goods_id (shocould be mapped with insert = "false" update = "false ")
At org. hibernate. Mapping. persistentclass. checkcolumnduplication (persistentclass. Java: 575)
At org. hibernate. Mapping. persistentclass. checkpropertycolumnduplication (persistentclass. Java: 597)
At org. hibernate. Mapping. persistentclass. checkcolumnduplication (persistentclass. Java: 615)
At org. hibernate. Mapping. persistentclass. Validate (persistentclass. Java: 405)
At org. hibernate. Mapping. rootclass. Validate (rootclass. Java: 192)
At org. hibernate. cfg. configuration. Validate (configuration. Java: 984)
At org. hibernate. cfg. configuration. buildsessionfactory (configuration. Java: 1169)
At y2ssh. shyy. xmal4.entity. hibernatesessionfactory. <clinit> (hibernatesessionfactory. Java: 18)
At y2ssh. shyy. xmal4.dao. hibimpl. basehibernatedao. getsession (basehibernatedao. Java: 105)
At y2ssh. shyy. xmal4.dao. hibimpl. basehibernatedao. Search (basehibernatedao. Java: 82)
At y2ssh. shyy. xmal4.dao. hibimpl. userdaohibimpl. Search (userdaohibimpl. Java: 19)
At y2ssh. shyy. xmal4.biz. hibbizimpl. userbizimpl. login (userbizimpl. Java: 44)
At y2ssh. shyy. xmal4.struts. Action. useraction. dologin (useraction. Java: 64)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Struts. Actions. dispatchaction. dispatchmethod (dispatchaction. Java: 274)
At org.apache.struts.actions.dispatchaction.exe cute (dispatchaction. Java: 194)
At org. Apache. Struts. Action. requestprocessor. processactionperform (requestprocessor. Java: 419)
At org. Apache. Struts. Action. requestprocessor. Process (requestprocessor. Java: 224)
At org. Apache. Struts. Action. actionservlet. Process (actionservlet. Java: 1194)
At org. Apache. Struts. Action. actionservlet. dopost (actionservlet. Java: 432)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 710)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 803)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 290)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 233)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 175)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 128)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 102)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 109)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 286)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 844)
At org. Apache. Coyote. http11.http11protocol $ http11connectionhandler. Process (http11protocol. Java: 583)
At org.apache.tomcat.util.net. jioendpoint $ worker. Run (jioendpoint. Java: 447)
At java. Lang. thread. Run (unknown source)
% Error creating sessionfactory %
Org. hibernate. mappingexception: cocould not read mappings from resource: y2ssh/shyy/xmal4/entity/user. HBM. xml
At org. hibernate. cfg. configuration. addresource (configuration. Java: 485)
At org. hibernate. cfg. configuration. parsemappingelement (configuration. Java: 1465)
At org. hibernate. cfg. configuration. parsesessionfactory (configuration. Java: 1433)
At org. hibernate. cfg. configuration. doconfigure (configuration. Java: 1414)
At org. hibernate. cfg. configuration. doconfigure (configuration. Java: 1390)
At org. hibernate. cfg. configuration. Configure (configuration. Java: 1310)
At y2ssh. shyy. xmal4.entity. hibernatesessionfactory. rebuildsessionfactory (hibernatesessionfactory. Java: 46)
At y2ssh. shyy. xmal4.entity. hibernatesessionfactory. getsession (hibernatesessionfactory. Java: 33)
At y2ssh. shyy. xmal4.dao. hibimpl. basehibernatedao. getsession (basehibernatedao. Java: 105)
At y2ssh. shyy. xmal4.dao. hibimpl. basehibernatedao. Search (basehibernatedao. Java: 82)
At y2ssh. shyy. xmal4.dao. hibimpl. userdaohibimpl. Search (userdaohibimpl. Java: 19)
At y2ssh. shyy. xmal4.biz. hibbizimpl. userbizimpl. login (userbizimpl. Java: 44)
At y2ssh. shyy. xmal4.struts. Action. useraction. dologin (useraction. Java: 64)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Struts. Actions. dispatchaction. dispatchmethod (dispatchaction. Java: 274)
At org.apache.struts.actions.dispatchaction.exe cute (dispatchaction. Java: 194)
At org. Apache. Struts. Action. requestprocessor. processactionperform (requestprocessor. Java: 419)
At org. Apache. Struts. Action. requestprocessor. Process (requestprocessor. Java: 224)
At org. Apache. Struts. Action. actionservlet. Process (actionservlet. Java: 1194)
At org. Apache. Struts. Action. actionservlet. dopost (actionservlet. Java: 432)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 710)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 803)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 290)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 233)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 175)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 128)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 102)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 109)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 286)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 844)
At org. Apache. Coyote. http11.http11protocol $ http11connectionhandler. Process (http11protocol. Java: 583)
At org.apache.tomcat.util.net. jioendpoint $ worker. Run (jioendpoint. Java: 447)
At java. Lang. thread. Run (unknown source)
Caused by: org. hibernate. duplicatemappingexception: duplicate class/entity mapping y2ssh. shyy. xmal4.entity. User
At org. hibernate. cfg. mappings. addclass (mappings. Java: 118)
At org. hibernate. cfg. hbmbinder. bindroot (hbmbinder. Java: 154)
At org. hibernate. cfg. configuration. Add (configuration. Java: 386)
At org. hibernate. cfg. configuration. addinputstream (config. Java: 427)
At org. hibernate. cfg. configuration. addresource (configuration. Java: 482)
... 36 More
2011-9-20 9:14:21 org. Apache. Catalina. Core. standardwrappervalve invoke
Severe: servlet. Service () for servlet action threw exception
Java. Lang. nullpointerexception
At y2ssh. shyy. xmal4.dao. hibimpl. basehibernatedao. Search (basehibernatedao. Java: 82)
At y2ssh. shyy. xmal4.dao. hibimpl. userdaohibimpl. Search (userdaohibimpl. Java: 19)
At y2ssh. shyy. xmal4.biz. hibbizimpl. userbizimpl. login (userbizimpl. Java: 44)
At y2ssh. shyy. xmal4.struts. Action. useraction. dologin (useraction. Java: 64)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (unknown source)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (unknown source)
At java. Lang. Reflect. method. Invoke (unknown source)
At org. Apache. Struts. Actions. dispatchaction. dispatchmethod (dispatchaction. Java: 274)
At org.apache.struts.actions.dispatchaction.exe cute (dispatchaction. Java: 194)
At org. Apache. Struts. Action. requestprocessor. processactionperform (requestprocessor. Java: 419)
At org. Apache. Struts. Action. requestprocessor. Process (requestprocessor. Java: 224)
At org. Apache. Struts. Action. actionservlet. Process (actionservlet. Java: 1194)
At org. Apache. Struts. Action. actionservlet. dopost (actionservlet. Java: 432)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 710)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 803)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 290)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 233)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 175)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 128)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 102)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 109)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 286)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 844)
At org. Apache. Coyote. http11.http11protocol $ http11connectionhandler. Process (http11protocol. Java: 583)
At org.apache.tomcat.util.net. jioendpoint $ worker. Run (jioendpoint. Java: 447)
At java. Lang. thread. Run (unknown source)
Error cause:
The Hibernate object class ing error causes the following NULL pointer exceptions,
Solution:
<Export-to-one name = "goods" class = "y2ssh. shyy. xmal4.entity. Goods" Fetch = "select">
<Column name = "goodsid"/>
</Role-to-one>
Change goodsid to bidid. OK. The program passes the test.
In this case, you should calmly consider whether the one-to-least or two-to-one ing of your table is wrong.
Here I have multiple items that correspond to one auction price, so this corresponds to the auction price ID so that the table can be matched.