0

收到以下错误:

org.hibernate.exception.JDBCConnectionException:无法在 org.hibernate 的 org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 的 org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) 打开连接。 exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) 在 org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420) 在 org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) 在 org.hibernate .jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) 在 org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) 在 org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:392) 在org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:318) 在 org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1156) 在 org.hibernate.impl.QueryImpl.iterate(QueryImpl) 的 org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:177) .java:46) 在 com.vis.erp.common.reports.accountbooks.vatreport.VatMainMethod.getVatList(VatMainMethod.java:108) 在 com.vis.erp.common.reports.accountbooks.vatreport.VatMainMethod.main(VatMainMethod .java:59) 引起:com.mysql.jdbc.CommunicationsException:通信链路故障reports.accountbooks.vatreport.VatMainMethod.main(VatMainMethod.java:59) 原因:com.mysql.jdbc.CommunicationsException:通信链路故障reports.accountbooks.vatreport.VatMainMethod.main(VatMainMethod.java:59) 原因:com.mysql.jdbc.CommunicationsException:通信链路故障

但没有在程序中使用任何jdbc查询

所以请帮助提前谢谢..

4

1 回答 1

0

提供数据库端口号,url您的问题将得到解决,例如:

 <property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;databaseName=abc_db</property>
于 2021-07-04T04:51:23.273 回答