I found, that my hibernate dependency caused dependency on jboss-logging
in turn.
Is it possible to switch to logback
logging, which I am already use?
UPDATE
I have tried three places to set org.jboss.logging.provider
:
1) Lassing to JPA properties in Spring:
.setJpaProperties(additionalProperties());
2) Setting property in main()
:
System.setProperty("org.jboss.logging.provider", "slf4j");
3) setting property in command line:
-Dorg.jboss.logging.provider="slf4j"
Neither worked.
I am getting an exception:
Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 32 more
Note, that I have excluded jboss logging from dependencies:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.7.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
I set the property in the standalone.conf.bat file:
That Logger.class can be found in the jboss-logging jar in JBOSS_HOME\modules\org\jboss\logging\main folder. That module is there by default.
I had a similar problem recently. I think you will be faced with this if you solve the Logger.class problem.
I got this exception:
I added a depenency to slf4j in my JBOSS_HOME\modules\org\jboss\logging\main\module.xml