OrmLiteConfigUtil NoClassDefFoundError in android intellij project

When running OrmLiteConfigUtil for creating the table config text file, a NoClassDefFoundError for com/j256/ormlite/android/apptools/OrmLiteConfigUtil is thrown although the libs are properly added to the project dependencies.

Libs have a "Provided" scope and contain ormlite-core and ormlite-android.

Answers


Solved ! The libs actually needed the "Compiled" scope for running OrmLiteConfigUtil under Intellij. If they are "Provided", this simply does not work !

The Stacktrace gave:

    Exception in thread "main" java.lang.NoClassDefFoundError: com/j256/ormlite/android/apptools/OrmLiteConfigUtil
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)
    Caused by: java.lang.ClassNotFoundException: com.j256.ormlite.android.apptools.OrmLiteConfigUtil
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 15 more

    Process finished with exit code 1

Need Your Help

How to extract text related to a regular expression (regexpr) index in R

regex r grep sequence

I'm working with a specialised text file, which is essentially a long list of names and random sequence of letters associated to each name. I'm attempting to extract a particular consensus sequence...

Amazon Web Services PHP FTP Get (Solved)

php amazon-web-services amazon-ec2 ftp

I am using Elastic Beanstalk and have deployed my application to Worker Tier.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.