gpt4 book ai didi

java.lang.NoSuchMethodError : org. hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map

转载 作者:太空宇宙 更新时间:2023-11-04 09:50:06 25 4
gpt4 key购买 nike

请帮助解决我的问题,当我尝试在 Apache Tomcat 上运行我的程序时,出现以下错误。我在 struts2 中使用 hibernate Core (5.2.9.Final) 和 Hibernate commons Annotations (5.0.1.Final)。

日志信息如下:

INFO: Server startup in 41821 ms
25240 [http-nio-8080-exec-7] INFO org.hibernate.Version - HHH000412: Hibernate Core {5.2.9.Final}
25247 [http-nio-8080-exec-7] INFO org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
25352 [http-nio-8080-exec-7] WARN org.hibernate.orm.deprecation - HHH90000012: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/hibernate-configuration. Use namespace http://www.hibernate.org/dtd/hibernate-configuration instead. Support for obsolete DTD/XSD namespaces may be removed at any time.
Hibernate Annotation Configuration loaded
Hibernate Annotation serviceRegistry created
26171 [http-nio-8080-exec-7] INFO org.hibernate.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
26964 [http-nio-8080-exec-7] WARN org.hibernate.orm.connections.pooling - HHH10001002: Using Hibernate built-in connection pool (not for production use!)
26988 [http-nio-8080-exec-7] INFO org.hibernate.orm.connections.pooling - HHH10001005: using driver [com.mysql.cj.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/scale_report?serverTimezone=UTC]
26989 [http-nio-8080-exec-7] INFO org.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {user=root, password=****}
26989 [http-nio-8080-exec-7] INFO org.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
27023 [http-nio-8080-exec-7] INFO org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl - HHH000115: Hibernate connection pool size: 1 (min=1)
28642 [http-nio-8080-exec-7] INFO org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
Initial SessionFactory creation failed.java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map;

我使用以下 jar 文件:

antlr-2.7.7<br>
classmate-1.3.0<br>
dom4j-1.6.1<br>
hibernate-commons-annotations-5.0.1.Final<br>
hibernate-core-5.2.9.Final<br>
hibernate-jpa-2.1-api-1.0.0.Final<br>
hibernate-entitymanager-4.2.21.Final<br>
jandex-2.0.3.Final<br>
javassist-3.20.0-GA<br>
jboss-logging-3.3.0.Final<br>
jboss-transaction-api_1.2_spec-1.0.1.Final<br>

com.azalea.ufl.barcode.1.0<br>
commons-collections-3.1<br>
commons-configuration-1.2<br>
commons-fileupload-1.2.1<br>
commons-lang-2.1<br>
commons-logging<br>
cvom<br>
CrystalCommon2<br>
CrystalReportsRuntime<br>
DatabaseConnectors<br>
derby<br>
ejb3-persistence<br>
freemarker-2.3.13<br>
icu4j<br>
jai_imageio<br>
JDBInterface<br>
jrcerom<br>
jstl-1.2<br>
jta-1.1<br>
keycodeDecoder<br>
log4j-1.2.15<br>
logging<br>
mssql-jdbc-7.0.0.jre8<br>
mysql-connector-java-8.0.15<br>
ognl-2.6.11<br>
pfjgraphics<br>
QueryBuilder<br>
sap.com~tc~sec~csi<br>
slf4j-api-1.5.8<br>
slf4j-log4j12-1.5.8<br>
struts2-convention-plugin-2.1.6<br>
struts2-core-2.1.6<br>
webreporting<br>
webreporting-jsf<br>
xmlbeans-2.3.0<br>
xpp3<br>
Xtreme<br>
xwork-2.1.2<br>

最佳答案

clean-build-deploy过程出现问题时,通常会抛出这样的异常,请尝试手动删除以前编译的代码,如果在Apache tomcat中,请转到包含部署的文件夹并手动删除任何过去的残留。

编辑:供将来引用特定异常:

java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map

当存在库冲突时由 Hibernate 抛出(通常是 javax.persistence)

the approach suggested is to make sure that the libraries sub-dependencies (the dependencies used by these libraries) are not conflicted, the suggestion given is that itf it is possible to you, eliminate suspected libraries and check when the message reappears and then try to look for a compatible version.

关于java.lang.NoSuchMethodError : org. hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54880012/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com