Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory when building master #1111

Open
elecharny opened this issue Feb 1, 2024 · 1 comment

Comments

@elecharny
Copy link

Hi!

since I'm trying to chase an issue with Pax-exam 4.13.5 while building Apache directory LDAP API, which fails with the exact same error (the title), I cloned the master and tried to build it. And I also get the same exact error:

2446 [main] INFO org.ops4j.pax.exam.forked.ForkedFrameworkFactory - Connecting to host: 127.0.0.1 port: 21003
Tests run: 5, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 2.832 sec <<< FAILURE! - in org.ops4j.pax.exam.forked.ForkedTestContainerFactoryTest
withBootClasspathFile(org.ops4j.pax.exam.forked.ForkedTestContainerFactoryTest)  Time elapsed: 0.676 sec  <<< ERROR!
java.rmi.ServerError: Error occurred in server thread; nested exception is: 
        java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:386)
        at sun.rmi.transport.Transport$1.run(Transport.java:200)
        at sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:235)
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:180)
        at com.sun.proxy.$Proxy13.setFrameworkStartLevel(Unknown Source)
        at org.ops4j.pax.exam.forked.ForkedTestContainer.setFrameworkStartLevel(ForkedTestContainer.java:285)
        at org.ops4j.pax.exam.forked.ForkedTestContainer.installAndStartBundles(ForkedTestContainer.java:275)
        at org.ops4j.pax.exam.forked.ForkedTestContainer.start(ForkedTestContainer.java:158)
        at org.ops4j.pax.exam.forked.ForkedTestContainerFactoryTest.startWithBootClasspath(ForkedTestContainerFactoryTest.java:129)
        at org.ops4j.pax.exam.forked.ForkedTestContainerFactoryTest.withBootClasspathFile(ForkedTestContainerFactoryTest.java:110)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at org.ops4j.pax.swissbox.tracker.ServiceLookup.<clinit>(ServiceLookup.java:41)
        at org.ops4j.pax.swissbox.framework.RemoteFrameworkImpl.setFrameworkStartLevel(RemoteFrameworkImpl.java:289)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
        at sun.rmi.transport.Transport$1.run(Transport.java:200)
        at sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at org.ops4j.pax.swissbox.tracker.ServiceLookup.<clinit>(ServiceLookup.java:41)
        at org.ops4j.pax.swissbox.framework.RemoteFrameworkImpl.setFrameworkStartLevel(RemoteFrameworkImpl.java:289)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
        at sun.rmi.transport.Transport$1.run(Transport.java:200)
        at sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

In my case (Apache Directory LDAP API), everything works fine with pax-exam 4.13.4, so I think it's a regression that has been introduced in 4.13.5

@jbonofre
Copy link
Member

jbonofre commented Feb 2, 2024

I bet it's a change in the dependency which doesn't match the import range anymore. Let me take a look. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants