java.lang.NoClassDefFoundError: Failed resolution of: Lin/blahapp/xxx/BlahUtil BlahUtil is a kotlin object with @JvmStatic annotations in it. I call these static methods from the rest of the android app(All in java) . We use multidex 1.0.1. I am on android studio 2.1.2, using JDK 7. Relevant gradle configs: compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { minSdkVersion 16 targetSdkVersion 23 } dexOptions { incremental true dexInProcess true javaMaxHeapSize "10g" preDexLibraries true } buildscript { ext.kotlin_version = '1.0.3' dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } apply plugin: 'kotlin-android' dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" } Trace: at in.blahapp.xxx.OurActivity

Stack Overflow | letronje | 4 months ago
  1. 0

    Android Kotlin : java.lang.NoClassDefFoundError: Failed resolution of: <KotlinObject>

    Stack Overflow | 4 months ago | letronje
    java.lang.NoClassDefFoundError: Failed resolution of: Lin/blahapp/xxx/BlahUtil BlahUtil is a kotlin object with @JvmStatic annotations in it. I call these static methods from the rest of the android app(All in java) . We use multidex 1.0.1. I am on android studio 2.1.2, using JDK 7. Relevant gradle configs: compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { minSdkVersion 16 targetSdkVersion 23 } dexOptions { incremental true dexInProcess true javaMaxHeapSize "10g" preDexLibraries true } buildscript { ext.kotlin_version = '1.0.3' dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } apply plugin: 'kotlin-android' dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" } Trace: at in.blahapp.xxx.OurActivity
  2. 0

    log4j-dev.logging.apache.org - [jira] [Commented] (LOG4J2-703) Android: Could not find class 'javax.naming.InitialContext', referenced from method org.apache.logging.log4j.core.lookup.JndiLookup.lookup - msg#00567 - Recent Discussion OSDir.com

    osdir.com | 1 year ago
    java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:118) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:369) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:416) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:146) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:75) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:37) at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:473) at com.torointl.log4j2xtest.MyActivity.onCreate(MyActivity.java:28)
  3. 0

    Re: java.lang.NoClassDefFoundError: net.jini.loader.pref.PreferredClassProvider

    river-user | 2 years ago | Greg Trasuk
    java.lang.NoClassDefFoundError: net.jini.loader.pref.PreferredClassProvider >> >> So it's there, it's found but something odd is going on after that that >> results in NoClassDefFoundError. This may relate to the JarClassLoader that >> gets installed, but clearly that works most of the time... >> >> Are you attempting to manually load this class by looking up the .class as >> file? (one-jar has a known bug along these lines. It loads classes just >> fine from the included jars, and files from your project just fine. I think >> it loads files from dep jars just fine too (otherwise lots of stuff would >> have issues) but it seems to confused if you try to load classes as if they >> are files: https://sourceforge.net/p/one-jar/bugs/73/) >> >> How critical is PreferredClassProvider to river's operation? >> >> -Gus >> >> >> On Mon, Jul 7, 2014 at 9:39 AM, Greg Trasuk <trasukg@stratuscom.com> >> wrote: >> >>> >>> PreferredClassProvider should be in jsk-platform.jar (which I think you >>> confirmed with your ‘grep -r’). It is there in the 2.2.2 build that I >>> have. I’m not familiar with your build tool (Gradle?) but you might want >>> to check the class path entry in the jar manifest that’s generated, to see >>> if jsk-platform is actually in the runtime class path. >>> >>> Are you starting up the system using the ServiceStarter approach or >>> winging it yourself? If ServiceStarter, could you post the starter >>> configuration file? >>> >>> Cheers, >>> >>> Greg Trasuk. >>> On Jul 6, 2014, at 8:27 PM, Gus Heck <gus.heck@gmail.com> wrote: >>> I've now spent several hours hunting for this class. What jar contains >>> it? Presently I'm building with the following (shotgun, messy non minimized) dependencies: dependencies { compile 'com.google.guava:guava:15.0' compile 'com.google.code.findbugs:jsr305:2.0.3' compile 'jini:jini-core:2.1' compile 'org.apache.river:reggie:2.2.2' compile 'net.jini:jini-ext:2.1' compile 'net.jini:jsk-lib:2.2.2' compile 'net.jini:jsk-dl:2.2.2' compile 'net.jini:jsk-platform:2.2.2' compile 'net.jini:jsk-resources:2.2.2' compile 'net.jini:jini-core:2.1' compile 'net.jini:jini-ext:2.1' compile 'net.jini:jsk-policy:2.2.2' // compile 'net.jini:jini-starterkit:2.1-beta2' // 404 in maven >>> central compile 'org.apache.logging.log4j:log4j-core:2.0-rc2' testCompile 'junit:junit:4.11' } I basically got frustrated and just threw everything I could find at it >>> and it still does this: guss-mbp:ingest gus$ alias j7a alias >>> j7a='/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/bin/java -Djava.security.policy=/Users/gus/tools/jpolicy/all.policy >>> -Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider' guss-mbp:ingest gus$ j7a -Done-jar.silent=true -jar build/libs/ingest-node.jar foo bar Starting injester node... Jul 06, 2014 7:57:31 PM net.jini.discovery.LookupDiscovery$UnicastDiscoveryTask run INFO: exception occurred during unicast discovery to guss-mbp.lan:54290 with constraints InvocationConstraints[reqs: {}, prefs: {}] java.lang.NoClassDefFoundError: >>> net.jini.loader.pref.PreferredClassProvider at >>> java.rmi.server.RMIClassLoader.initializeProvider(RMIClassLoader.java:687)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: java.lang.NoClassDefFoundError: net.jini.loader.pref.PreferredClassProvider

    river-user | 2 years ago | Greg Trasuk
    java.lang.NoClassDefFoundError: net.jini.loader.pref.PreferredClassProvider >> >> So it's there, it's found but something odd is going on after that that >> results in NoClassDefFoundError. This may relate to the JarClassLoader that >> gets installed, but clearly that works most of the time... >> >> Are you attempting to manually load this class by looking up the .class as >> file? (one-jar has a known bug along these lines. It loads classes just >> fine from the included jars, and files from your project just fine. I think >> it loads files from dep jars just fine too (otherwise lots of stuff would >> have issues) but it seems to confused if you try to load classes as if they >> are files: https://sourceforge.net/p/one-jar/bugs/73/) >> >> How critical is PreferredClassProvider to river's operation? >> >> -Gus >> >> >> On Mon, Jul 7, 2014 at 9:39 AM, Greg Trasuk <trasukg@stratuscom.com> >> wrote: >> >>> >>> PreferredClassProvider should be in jsk-platform.jar (which I think you >>> confirmed with your ‘grep -r’). It is there in the 2.2.2 build that I >>> have. I’m not familiar with your build tool (Gradle?) but you might want >>> to check the class path entry in the jar manifest that’s generated, to see >>> if jsk-platform is actually in the runtime class path. >>> >>> Are you starting up the system using the ServiceStarter approach or >>> winging it yourself? If ServiceStarter, could you post the starter >>> configuration file? >>> >>> Cheers, >>> >>> Greg Trasuk. >>> On Jul 6, 2014, at 8:27 PM, Gus Heck <gus.heck@gmail.com> wrote: >>> I've now spent several hours hunting for this class. What jar contains >>> it? Presently I'm building with the following (shotgun, messy non minimized) dependencies: dependencies { compile 'com.google.guava:guava:15.0' compile 'com.google.code.findbugs:jsr305:2.0.3' compile 'jini:jini-core:2.1' compile 'org.apache.river:reggie:2.2.2' compile 'net.jini:jini-ext:2.1' compile 'net.jini:jsk-lib:2.2.2' compile 'net.jini:jsk-dl:2.2.2' compile 'net.jini:jsk-platform:2.2.2' compile 'net.jini:jsk-resources:2.2.2' compile 'net.jini:jini-core:2.1' compile 'net.jini:jini-ext:2.1' compile 'net.jini:jsk-policy:2.2.2' // compile 'net.jini:jini-starterkit:2.1-beta2' // 404 in maven >>> central compile 'org.apache.logging.log4j:log4j-core:2.0-rc2' testCompile 'junit:junit:4.11' } I basically got frustrated and just threw everything I could find at it >>> and it still does this: guss-mbp:ingest gus$ alias j7a alias >>> j7a='/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/bin/java -Djava.security.policy=/Users/gus/tools/jpolicy/all.policy >>> -Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider' guss-mbp:ingest gus$ j7a -Done-jar.silent=true -jar build/libs/ingest-node.jar foo bar Starting injester node... Jul 06, 2014 7:57:31 PM net.jini.discovery.LookupDiscovery$UnicastDiscoveryTask run INFO: exception occurred during unicast discovery to guss-mbp.lan:54290 with constraints InvocationConstraints[reqs: {}, prefs: {}] java.lang.NoClassDefFoundError: >>> net.jini.loader.pref.PreferredClassProvider at >>> java.rmi.server.RMIClassLoader.initializeProvider(RMIClassLoader.java:687)
  6. 0

    Re: java.lang.NoClassDefFoundError: net.jini.loader.pref.PreferredClassProvider

    incubator-river-user | 2 years ago | Gus Heck
    java.lang.NoClassDefFoundError: net.jini.loader.pref.PreferredClassProvider > > So it's there, it's found but something odd is going on after that that > results in NoClassDefFoundError. This may relate to the JarClassLoader that > gets installed, but clearly that works most of the time... > > Are you attempting to manually load this class by looking up the .class as > file? (one-jar has a known bug along these lines. It loads classes just > fine from the included jars, and files from your project just fine. I think > it loads files from dep jars just fine too (otherwise lots of stuff would > have issues) but it seems to confused if you try to load classes as if they > are files: https://sourceforge.net/p/one-jar/bugs/73/) > > How critical is PreferredClassProvider to river's operation? > > -Gus > > > On Mon, Jul 7, 2014 at 9:39 AM, Greg Trasuk <trasukg@stratuscom.com> > wrote: > >> >> PreferredClassProvider should be in jsk-platform.jar (which I think you >> confirmed with your ‘grep -r’). It is there in the 2.2.2 build that I >> have. I’m not familiar with your build tool (Gradle?) but you might want >> to check the class path entry in the jar manifest that’s generated, to see >> if jsk-platform is actually in the runtime class path. >> >> Are you starting up the system using the ServiceStarter approach or >> winging it yourself? If ServiceStarter, could you post the starter >> configuration file? >> >> Cheers, >> >> Greg Trasuk. >> On Jul 6, 2014, at 8:27 PM, Gus Heck <gus.heck@gmail.com> wrote: >> I've now spent several hours hunting for this class. What jar contains >> it? Presently I'm building with the following (shotgun, messy non minimized) dependencies: dependencies { compile 'com.google.guava:guava:15.0' compile 'com.google.code.findbugs:jsr305:2.0.3' compile 'jini:jini-core:2.1' compile 'org.apache.river:reggie:2.2.2' compile 'net.jini:jini-ext:2.1' compile 'net.jini:jsk-lib:2.2.2' compile 'net.jini:jsk-dl:2.2.2' compile 'net.jini:jsk-platform:2.2.2' compile 'net.jini:jsk-resources:2.2.2' compile 'net.jini:jini-core:2.1' compile 'net.jini:jini-ext:2.1' compile 'net.jini:jsk-policy:2.2.2' // compile 'net.jini:jini-starterkit:2.1-beta2' // 404 in maven >> central compile 'org.apache.logging.log4j:log4j-core:2.0-rc2' testCompile 'junit:junit:4.11' } I basically got frustrated and just threw everything I could find at it >> and it still does this: guss-mbp:ingest gus$ alias j7a alias >> j7a='/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/bin/java -Djava.security.policy=/Users/gus/tools/jpolicy/all.policy >> -Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider' guss-mbp:ingest gus$ j7a -Done-jar.silent=true -jar build/libs/ingest-node.jar foo bar Starting injester node... Jul 06, 2014 7:57:31 PM net.jini.discovery.LookupDiscovery$UnicastDiscoveryTask run INFO: exception occurred during unicast discovery to guss-mbp.lan:54290 with constraints InvocationConstraints[reqs: {}, prefs: {}] java.lang.NoClassDefFoundError: >> net.jini.loader.pref.PreferredClassProvider at >> java.rmi.server.RMIClassLoader.initializeProvider(RMIClassLoader.java:687)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      Failed resolution of: Lin/blahapp/xxx/BlahUtil BlahUtil is a kotlin object with @JvmStatic annotations in it. I call these static methods from the rest of the android app(All in java) . We use multidex 1.0.1. I am on android studio 2.1.2, using JDK 7. Relevant gradle configs: compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { minSdkVersion 16 targetSdkVersion 23 } dexOptions { incremental true dexInProcess true javaMaxHeapSize "10g" preDexLibraries true } buildscript { ext.kotlin_version = '1.0.3' dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } apply plugin: 'kotlin-android' dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" } Trace: at in.blahapp.xxx.OurActivity

      at android.app.Activity.performCreate()
    2. Android Platform
      Activity.performCreate
      1. android.app.Activity.performCreate(Activity.java:6251)
      1 frame