2013年10月29日星期二

Replace the hibernate using sqlserver oracle error !

Have a project using hibernate, oracle into the database from sqlserver reported after a lot of mistakes , mainly ORA-00933: SQL command not properly ended, the god you seek advice ah , thank you !

front there are a bunch sql ......
Hibernate: select count (this_.id) as y0_ from bbscs_forum this_ where this_.BoardID =? and this_.DelSign =? and this_. Auditing =?
Hibernate: select count (this_.id) as y0_ from bbscs_forum_history this_ where this_.BoardID =? and this_.DelSign =? and this_. Auditing =?
Hibernate: select board0_.id as col_0_0_ from bbscs_board board0_ where board0_.ParentID =? and board0_.UseStat = 1 order by board0_.Orders asc
2013-10-29 09:26:23,720 [com.laoer.bbscs.service.imp.BoardServiceCacheImp] - [INFO] postMainNum: 103 postNum: 110
192.168.47.17
Hibernate: select * from (select commend0_.id as id15_, commend0_.BoardCategory as BoardCat2_15_, commend0_.BoardID as BoardID15_, commend0_.BoardName as BoardName15_, commend0_.CommendBoardID as CommendB5_15_, commend0_.CommendTop as CommendTop15_, commend0_.CreateTime as CreateTime15_, commend0_.PostID as PostID15_, commend0_.PostMainID as PostMainID15_, commend0_.Title as Title15_, commend0_.TopCategory as TopCate11_15_, commend0_.UserID as UserID15_, commend0_.UserName as UserName15_ from bbscs_commend commend0_ where commend0_.CommendTop =? order by commend0_.CreateTime desc) where rownum <=?
2013-10-29 09:26:23,751 [com.laoer.bbscs.service.task.BoardCountTimerTask] - [INFO] Board count end
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly terminated

at oracle.jdbc.driver.T4CTTIoer.processError (T4CTTIoer.java: 439)
at oracle.jdbc.driver.T4CTTIoer.processError (T4CTTIoer.java: 395)
at oracle.jdbc.driver.T4C8Oall.processError (T4C8Oall.java: 802)
at oracle.jdbc.driver.T4CTTIfun.receive (T4CTTIfun.java: 436)
at oracle.jdbc.driver.T4CTTIfun.doRPC (T4CTTIfun.java: 186)
at oracle.jdbc.driver.T4C8Oall.doOALL (T4C8Oall.java: 521)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8 (T4CPreparedStatement.java: 205)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe (T4CPreparedStatement.java: 861)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe (OracleStatement.java: 1145)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout (OracleStatement.java: 1267)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal (OraclePreparedStatement.java: 3449)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery (OraclePreparedStatement.java: 3493)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery (OraclePreparedStatementWrapper.java: 1491)
at org.apache.jsp.index_jsp._jspService (index_jsp.java: 487)
at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java: 70)
at javax.servlet.http.HttpServlet.service (HttpServlet.java: 803)
at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java: 374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java: 337)
at org.apache.jasper.servlet.JspServlet.service (JspServlet.java: 266)
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.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java: 413)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 206)
at org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java: 630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest (ApplicationDispatcher.java: 436)
at org.apache.catalina.core.ApplicationDispatcher.doForward (ApplicationDispatcher.java: 374)
at org.apache.catalina.core.ApplicationDispatcher.forward (ApplicationDispatcher.java: 302)
at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute (ServletDispatcherResult.java: 139)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute (StrutsResultSupport.java: 178)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java: 348)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 253)
at com.laoer.bbscs.web.interceptor.RequestBasePathInterceptor.intercept (RequestBasePathInterceptor.java: 33)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at com.laoer.bbscs.web.interceptor.UserCookieInterceptor.intercept (UserCookieInterceptor.java: 47)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at com.laoer.bbscs.web.interceptor.RemoteAddrInterceptor.intercept (RemoteAddrInterceptor.java: 32)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (DefaultWorkflowInterceptor.java: 221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 86)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (ValidationInterceptor.java: 150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (AnnotationValidationInterceptor.java: 48)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 86)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (ConversionErrorInterceptor.java: 123)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java: 167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java: 86)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (StaticParametersInterceptor.java: 105)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept (CheckboxInterceptor.java: 83)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 224)
at com.opensymphony.xwork2.DefaultActionInvocation $ 2.doProfiling (DefaultActionInvocation.java: 223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (UtilTimerStack.java: 455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java: 221)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept (FileUploadInterceptor.java: 207)



------ Solution ------------------------------------ --------
database for a drive replacement yet ? ? If the project is used in sql statements then , sqlserver and oracle is nuanced Oh , according to the error message corresponding changes under the bar
------ Solution ------------- -------------------------------
1. driver package incumbent
2.Hibernate configuration you want to modify , this is MySql you want to replace the oracle of the configuration file must be modified where bold
com.mysql.jdbc.Driver
jdbc: mysql :/ / localhost: 3306/db_test
root
> 123456
org.hibernate.dialect.MySQLDialect

roperty>
20
true
update
thread

没有评论:

发表评论