sijie opened a new issue #4179: [schema] java.lang.NoClassDefFoundError: org/joda/time/ReadablePartial URL: https://github.com/apache/pulsar/issues/4179 **Describe the bug** When using AvroSchema from latest master, it throws following exceptions: ``` java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/joda/time/ReadablePartial at org.apache.pulsar.client.internal.ReflectionUtils.catchExceptions(ReflectionUtils.java:36) at org.apache.pulsar.client.internal.DefaultImplementation.newAvroSchema(DefaultImplementation.java:212) at org.apache.pulsar.client.api.Schema.AVRO(Schema.java:196) at io.streamnative.tests.pulsar.schema.CreateDifferentSchemaAfterDeleteSchemaTest.testCreateSchemaAfterDeletion(CreateDifferentSchemaAfterDeleteSchemaTest.java:84) 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at io.streamnative.tests.common.framework.SystemTestRunner.invokeTest(SystemTestRunner.java:219) at io.streamnative.tests.common.framework.SystemTestRunner.runChild(SystemTestRunner.java:212) at io.streamnative.tests.common.framework.SystemTestRunner.runChild(SystemTestRunner.java:52) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: java.lang.NoClassDefFoundError: org/joda/time/ReadablePartial at org.apache.pulsar.client.impl.schema.AvroSchema.<clinit>(AvroSchema.java:60) 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 org.apache.pulsar.client.internal.DefaultImplementation.lambda$newAvroSchema$24(DefaultImplementation.java:214) at org.apache.pulsar.client.internal.ReflectionUtils.catchExceptions(ReflectionUtils.java:34) ... 30 more Caused by: java.lang.ClassNotFoundException: org.joda.time.ReadablePartial at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 37 more ``` **To Reproduce** 1. Build the latest master. 2. Use the AvroSchema from latest master. It will throws the above exception. **Expected behavior** No exception should be thrown. **Additional context** I think the problem introduced by #3900. It doesn't shade the joda library properly.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
