question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimum version of Gradle?

See original GitHub issue

Does your project require a minimum version of Gradle to be successfully imported into a project?

We run our builds using gradle. I created a test project to play around and get to know the library before trying to integrate with our project(s). My test project works find.

However, I created a small test class to run in our product and when I try to test it out, I get NoClassDefFoundError on the line TrainTestSplitter<Label> dataSplitter = new TrainTestSplitter<>(csvDatasource);.

com/opencsv/exceptions/CsvValidationException
java.lang.NoClassDefFoundError: com/opencsv/exceptions/CsvValidationException
	at org.tribuo.data.csv.CSVDataSource.rowIterator(CSVDataSource.java:195)
	at org.tribuo.data.columnar.ColumnarDataSource.iterator(ColumnarDataSource.java:77)
	at org.tribuo.evaluation.TrainTestSplitter.<init>(TrainTestSplitter.java:94)
	at org.tribuo.evaluation.TrainTestSplitter.<init>(TrainTestSplitter.java:74)
	at org.tribuo.evaluation.TrainTestSplitter.<init>(TrainTestSplitter.java:65)
	at com.blackducksoftware.vuln.intelligent.remediation.TribuoTrainer.createModel(TribuoTrainer.java:99)
	at com.blackducksoftware.vuln.intelligent.remediation.TribuoTrainerTest.testCreateModel(TribuoTrainerTest.java:37)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.privateRun(TestRunner.java:782)
	at org.testng.TestRunner.run(TestRunner.java:632)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
	at org.testng.SuiteRunner.run(SuiteRunner.java:268)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
	at org.testng.TestNG.run(TestNG.java:1064)
	at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.runTests(TestNGTestClassProcessor.java:141)
	at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:90)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at com.sun.proxy.$Proxy5.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: com.opencsv.exceptions.CsvValidationException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

I’m convinced that the issue is with importing dependencies. Our projects use Gradle v5.6.2 and I don’t know if/when they plan to upgrade.

In contrast, my working test project is building with Gradle v.7.1

System details

  • Tribuo version : 4.1.0
  • Java version (if appropriate) openJDK 11.0.7
  • OS/Architecture (if appropriate) MacOS 14.1.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
C-Comptoncommented, Sep 3, 2021

Thanks. That is the plan. For now I’m just trying to hack together a POC so tribuo-all is the easiest way to guarantee I get the parts I need without having to deep dive into the libraries.

Your team has been a great help. I’ve asked a few questions now and your responsiveness and helpfulness has been on point.

0reactions
Craigacpcommented, Sep 2, 2021

Excellent, I’m glad you’ve got it sorted out. If you’re looking at integrating Tribuo into a larger project I recommend you pare back the dependencies by only using the bits of Tribuo you need, rather than depending on tribuo-all. tribuo-all is for getting up and running quickly for prototyping, but it pulls in bulky native dependencies like ONNX Runtime and TensorFlow which might not be necessary for your use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Declaring Versions and Ranges - Gradle User Manual
The simplest version declaration is a simple string representing the version to use. Gradle supports different ways of declaring a version string:.
Read more >
Minimum supported Gradle version is 3.3. Current version is ...
For example, Android Gradle Plugin version 3.1.0+ requires a minimal gradle version 4.4. You can be configured via Android Studio File ...
Read more >
Android Gradle plugin release notes - Android Developers
Starting with AGP 7.3.0-beta05, the highest supported minimum SDK version is 33 (you can use minSdk = 33 ). The minimum SDK represents...
Read more >
Minimum supported Gradle version is 7.0. Current version is 6.5
Minimum supported Gradle version is 7.0. Current version is… · 1. Open the gradle-wrapper.properties file from the project folder of your Android ...
Read more >
Minimum supported Gradle version is 6.5. Current ... - GitHub
Minimum supported Gradle version is 6.5. Current version is 6.1.1 #134. Open.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found