作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Bundle org.eclipse.persistence.extension_2.7.0.qualifier.jar
(我安装到 osgi 框架)包含类 org.eclipse.persistence.logging.slf4j.SLF4JLogger
。在我的持久性文件中我有
<property name="eclipselink.logging.logger" value="org.eclipse.persistence.logging.slf4j.SLF4JLogger"/>
但是我明白了
Exception Description: ClassNotFound: [org.eclipse.persistence.logging.slf4j.SLF4JLogger] specified in [eclipselink.logging.logger] property.
Internal Exception: java.lang.ClassNotFoundException: org.eclipse.persistence.logging.slf4j.SLF4JLogger not found by org.eclipse.persistence.jpa [11]
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:231)
... 36 more
Caused by: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.7.0.qualifier): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.logging.slf4j.SLF4JLogger] specified in [eclipselink.logging.logger] property.
Internal Exception: java.lang.ClassNotFoundException: org.eclipse.persistence.logging.slf4j.SLF4JLogger not found by org.eclipse.persistence.jpa [11]
at org.eclipse.persistence.exceptions.EntityManagerSetupException.classNotFoundForProperty(EntityManagerSetupException.java:135)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForPropertyInternal(EntityManagerSetupImpl.java:1341)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:1327)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateLoggers(EntityManagerSetupImpl.java:1202)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1752)
... 34 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.logging.slf4j.SLF4JLogger not found by org.eclipse.persistence.jpa [11]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:165)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClass(EntityManagerSetupImpl.java:1319)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForPropertyInternal(EntityManagerSetupImpl.java:1337)
... 37 more
我检查过包 org.eclipse.persistence.extension_2.7.0.qualifier.jar
不导出包 org.eclipse.persistence.logging.slf4j
所以,谁能解释一下如何使eclipselink登录slf4j?
最佳答案
确保包含“org.eclipse.persistence.extension”jar,它应该可以正常工作。我使用的 Maven 坐标是
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.extension</artifactId>
<version>2.7.2</version>
<scope>runtime</scope>
</dependency>
关于java - EclipseLink:如何为 eclipselink 2.7.0 设置 SLF4J 记录器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43146950/
我是一名优秀的程序员,十分优秀!