[hibernate-dev] [infinispan-dev] Possible error of dependency on infinispan-query pom
Galder Zamarreño
galder at jboss.org
Wed Jul 14 03:10:07 EDT 2010
Hmmm, these looks like a problem in Hibernate Search since they're the ones using slf4j.
I don't see why Infinispan Query should explicitly declare a dependency on slf4j.
Emmanuel, wdyt?
http://anonsvn.jboss.org/repos/hibernate/search/tags/v3_2_0_Final/hibernate-search/src/main/java/org/hibernate/search/util/LoggerFactory.java needs slf4j, so it would appear to me that Hibernate Search should define dependencies on slf4j and not query module.
I see https://repository.jboss.org/nexus/content/groups/developer/org/hibernate/hibernate-search-parent/3.2.0.Final/hibernate-search-parent-3.2.0.Final.pom having the same stuff query has, a dependency on slf4j-log4j with test scope.
On Jul 14, 2010, at 1:01 AM, Israel Lacerra wrote:
> Hi everybody,
>
> I'm making some tests and I am using infinispan-gui-demo. So I have to include "infispan-query" as a dependency in infinispan-gui-demo. After this, and including my code that make some use of infispan-query module, I get this when I start the cache:
>
> Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
> at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
> at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
> at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
> at org.hibernate.search.util.LoggerFactory.make(LoggerFactory.java:38)
> at org.hibernate.search.Version.<clinit>(Version.java:40)
> at org.hibernate.search.impl.SearchFactoryImpl.<clinit>(SearchFactoryImpl.java:102)
> at org.infinispan.query.backend.QueryHelper.<init>(QueryHelper.java:104)
> at org.infinispan.demo.InfinispanDemo$10.run(InfinispanDemo.java:377)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> ... 13 more
>
>
> If I change the scope of slf4j-log4j12 to default scope in infinispan-query's pom, the problem disappears.
>
> Probably I miss something on the maven behaviour or something like it. But maybe the scope is incorrect.
>
>
> thanks!
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
More information about the hibernate-dev
mailing list