在休眠异常中打开查询
我使用 struts2
和 hibernate
进行开发。
我用来运行打开查询的Java代码如下
String hql ="insert into "+"OPENQUERY(OracleLinkedServer, \'SELECT *
FROM report_access_log\') "+"(CALLINGHOST, ACCESSTIMESTAMP,
HTTPREQUESTMETHOD, ACCESSURL,"+"HTTPRESPONSECODE, HTTPRESPONSETIMEMILLI, USERNAME, REPORTNAME, ID)"+" values "+ "(:CALLINGHOST,:ACCESSTIMESTAMP,:HTTPREQUESTMETHOD,:ACCESSURL,:HTTPRESPO
NSECODE,"
+ ":HTTPRESPONSETIMEMILLI,:USERNAME,:REPORTNAME,"+ "(select * from
OPENQUERY(OracleLinkedServer,"+ "\'select SQ_RPT_ACC_LOG_ID.nextval
from dual\')))"; Query query=session.createQuery(hql); query.setString
("CALLINGHOST", userLogReport.get(0).toString()); query.setDate
("ACCESSTIMESTAMP", (Date)userLogReport.get(1)); query.setString
("HTTPREQUESTMETHOD", userLogReport.get(2).toString()); query.setString
("ACCESSURL", userLogReport.get(3).toString()); query.setString
("HTTPRESPONSECODE", userLogReport.get(4).toString()); query.setInteger
("HTTPRESPONSETIMEMILLI", (Integer)userLogReport.get(5)); query.setString
("USERNAME", userLogReport.get(6).toString()); query.setString("REPORTNAME",
userLogReport.get(7).toString());
以下是控制台中打印的查询。当我在 SQL 编辑器中运行以下查询时,它已成功插入,但不是从 Java 插入的。我收到以下错误消息。
SQL 查询:
insert into OPENQUERY(OracleLinkedServer, 'SELECT * FROM report_access_log') (CALLINGHOST, ACCESSTIMESTAMP, HTTPREQUESTMETHOD, ACCESSURL,HTTPRESPONSECODE, HTTPRESPONSETIMEMILLI, USERNAME, REPORTNAME, ID) values (?,?,?,?,?,?,?,?,(select * from OPENQUERY(OracleLinkedServer,'select SQ_RPT_ACC_LOG_ID.nextval from dual')))
以下是堆栈跟踪:
BLRSAL132772D 是我的服务器。
17:30:55,279 INFO [STDOUT] Hibernate: insert into OPENQUERY(OracleLinkedServer, 'SELECT * FROM report_access_log') (CALLINGHOST, ACCESSTIMESTAMP, HTTPREQUESTMETHOD, ACCESSURL,HTTPRESPONSECODE, HTTPRESPONSETIMEMILLI, USERNAME, REPORTNAME, ID) values (?,?,?,?,?,?,?,?,(select * from OPENQUERY(OracleLinkedServer,'select SQ_RPT_ACC_LOG_ID.nextval from dual')))
17:30:55,341 INFO [STDOUT] 2011-09-13 17:30:55,341 [ERROR] org.hibernate.util.JDBCExceptionReporter - MSDTC on server 'BLRSAL132772D\INTAPP2_5' is unavailable.
17:30:55,341 ERROR [STDERR] org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
17:30:55,341 ERROR [STDERR] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
17:30:55,341 ERROR [STDERR] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
17:30:55,341 ERROR [STDERR] at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:198)
17:30:55,341 ERROR [STDERR] at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1191)
17:30:55,341 ERROR [STDERR] at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:357)
17:30:55,341 ERROR [STDERR] at com.bby.ci.promoads.imageviewer.dataaccess.impl.UserLogReportsDAOImpl.insertUserLogReports(UserLogReportsDAOImpl.java:83)
17:30:55,341 ERROR [STDERR] at com.bby.ci.promoads.imageviewer.struts.action.ViewImagesAction.execute(ViewImagesAction.java:270)
17:30:55,341 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:30:55,341 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
17:30:55,341 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
17:30:55,341 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
17:30:55,341 ERROR [STDERR] at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,387 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
17:30:55,387 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
17:30:55,403 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
17:30:55,403 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
17:30:55,403 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
17:30:55,403 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
17:30:55,403 ERROR [STDERR] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: MSDTC on server 'BLRSAL132772D\INTAPP2_5' is unavailable.
17:30:55,403 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
17:30:55,403 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
17:30:55,403 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
17:30:55,434 ERROR [STDERR] at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:189)
17:30:55,434 ERROR [STDERR] ... 77 more
I am using struts2
and hibernate
for development.
The Java Code i used to run my open query is as follows
String hql ="insert into "+"OPENQUERY(OracleLinkedServer, \'SELECT *
FROM report_access_log\') "+"(CALLINGHOST, ACCESSTIMESTAMP,
HTTPREQUESTMETHOD, ACCESSURL,"+"HTTPRESPONSECODE, HTTPRESPONSETIMEMILLI, USERNAME, REPORTNAME, ID)"+" values "+ "(:CALLINGHOST,:ACCESSTIMESTAMP,:HTTPREQUESTMETHOD,:ACCESSURL,:HTTPRESPO
NSECODE,"
+ ":HTTPRESPONSETIMEMILLI,:USERNAME,:REPORTNAME,"+ "(select * from
OPENQUERY(OracleLinkedServer,"+ "\'select SQ_RPT_ACC_LOG_ID.nextval
from dual\')))"; Query query=session.createQuery(hql); query.setString
("CALLINGHOST", userLogReport.get(0).toString()); query.setDate
("ACCESSTIMESTAMP", (Date)userLogReport.get(1)); query.setString
("HTTPREQUESTMETHOD", userLogReport.get(2).toString()); query.setString
("ACCESSURL", userLogReport.get(3).toString()); query.setString
("HTTPRESPONSECODE", userLogReport.get(4).toString()); query.setInteger
("HTTPRESPONSETIMEMILLI", (Integer)userLogReport.get(5)); query.setString
("USERNAME", userLogReport.get(6).toString()); query.setString("REPORTNAME",
userLogReport.get(7).toString());
The following is the query printed in the console. When i run the following query in SQL editor it is successfully inserted but not from Java. I get the following error message.
SQL Query:
insert into OPENQUERY(OracleLinkedServer, 'SELECT * FROM report_access_log') (CALLINGHOST, ACCESSTIMESTAMP, HTTPREQUESTMETHOD, ACCESSURL,HTTPRESPONSECODE, HTTPRESPONSETIMEMILLI, USERNAME, REPORTNAME, ID) values (?,?,?,?,?,?,?,?,(select * from OPENQUERY(OracleLinkedServer,'select SQ_RPT_ACC_LOG_ID.nextval from dual')))
The following is the stack trace:
BLRSAL132772D is my server.
17:30:55,279 INFO [STDOUT] Hibernate: insert into OPENQUERY(OracleLinkedServer, 'SELECT * FROM report_access_log') (CALLINGHOST, ACCESSTIMESTAMP, HTTPREQUESTMETHOD, ACCESSURL,HTTPRESPONSECODE, HTTPRESPONSETIMEMILLI, USERNAME, REPORTNAME, ID) values (?,?,?,?,?,?,?,?,(select * from OPENQUERY(OracleLinkedServer,'select SQ_RPT_ACC_LOG_ID.nextval from dual')))
17:30:55,341 INFO [STDOUT] 2011-09-13 17:30:55,341 [ERROR] org.hibernate.util.JDBCExceptionReporter - MSDTC on server 'BLRSAL132772D\INTAPP2_5' is unavailable.
17:30:55,341 ERROR [STDERR] org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
17:30:55,341 ERROR [STDERR] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
17:30:55,341 ERROR [STDERR] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
17:30:55,341 ERROR [STDERR] at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:198)
17:30:55,341 ERROR [STDERR] at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1191)
17:30:55,341 ERROR [STDERR] at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:357)
17:30:55,341 ERROR [STDERR] at com.bby.ci.promoads.imageviewer.dataaccess.impl.UserLogReportsDAOImpl.insertUserLogReports(UserLogReportsDAOImpl.java:83)
17:30:55,341 ERROR [STDERR] at com.bby.ci.promoads.imageviewer.struts.action.ViewImagesAction.execute(ViewImagesAction.java:270)
17:30:55,341 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:30:55,341 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
17:30:55,341 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
17:30:55,341 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
17:30:55,341 ERROR [STDERR] at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,341 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
17:30:55,356 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,387 ERROR [STDERR] at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
17:30:55,387 ERROR [STDERR] at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
17:30:55,387 ERROR [STDERR] at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:30:55,387 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:30:55,387 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
17:30:55,403 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
17:30:55,403 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
17:30:55,403 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
17:30:55,403 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
17:30:55,403 ERROR [STDERR] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: MSDTC on server 'BLRSAL132772D\INTAPP2_5' is unavailable.
17:30:55,403 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
17:30:55,403 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
17:30:55,403 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
17:30:55,434 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
17:30:55,434 ERROR [STDERR] at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:189)
17:30:55,434 ERROR [STDERR] ... 77 more
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查行
org.hibernate.util.JDBCExceptionReporter - 服务器“BLRSAL132772D\INTAPP2_5”上的 MSDTC 不可用。 17:30:55,341 错误 [STDERR] org.hibernate.exception.SQLGrammarException:无法执行本机批量操作查询
SQL 服务器抱怨 MSDTC 服务未运行...
要解决该问题,只需使用 Windows 服务管理器启动“分布式事务协调器”服务即可。
以下是启动服务的详细步骤
此后问题一定会消失。
check the line
org.hibernate.util.JDBCExceptionReporter - MSDTC on server 'BLRSAL132772D\INTAPP2_5' is unavailable. 17:30:55,341 ERROR [STDERR] org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
SQL server is complaining that MSDTC service is not running...
To fix the problem just start the service “Distributed Transaction Coordinator” using Windows Service manager.
Here are the detailed steps for starting the service
after this the problem must be gone.