Jump to content

[1.12.2] NoClassDefFoundError


DarkEyeDragon

Recommended Posts

So after trying to solve this issue for a couple of hours now i have no idea's on what to do to fix this.

 

My mod depends on 2 apache libs "fluent-hc" and "httpmime"

 

they get included in my mod jar. but still somehow cant be loaded when asked to. Is there any special procedure i need to go trough for them to load properly?

 

my current build.gradle:

 

configurations {
    shade
    compile.extendsFrom shade
}
buildscript {
    repositories {
        jcenter()
        maven { url = "http://files.minecraftforge.net/maven" }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
    }
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

version = "1.1.0"
group = "com.darkeyedragon.screenshotuploader" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ScreenshotUploader"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
    sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
    version = "1.12.2-14.23.2.2611"
    runDir = "run"

    // the mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   snapshot are built nightly.
    // stable_#            stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not always work.
    // simply re-run your setup task after changing the mappings to update your workspace.
    mappings = "snapshot_20171003"
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

dependencies {
    shade group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.5'
    shade group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.1'
}

processResources {
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
                
        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }
        
    // copy everything else except the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}
jar {
    configurations.shade.each { dep ->
        from(project.zipTree(dep)){
            exclude 'META-INF', 'META-INF/**'
        }
    }
}

i've tried using shadowjar, no luck. 

 

Error

[17:07:05] [Custom Image Uploading/INFO] [STDOUT]: [com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader:lambda$uploadImage$0:45]: SCREENSHOTLOGGER: 1
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDOUT]: [com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader:lambda$uploadImage$0:47]: SCREENSHOTLOGGER: 2
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDOUT]: [com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader:lambda$uploadImage$0:49]: SCREENSHOTLOGGER: 3
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDOUT]: [com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader:lambda$uploadImage$0:51]: SCREENSHOTLOGGER: 4
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDOUT]: [com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader:lambda$uploadImage$0:53]: SCREENSHOTLOGGER: 5
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDOUT]: [com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader:lambda$uploadImage$0:55]: SCREENSHOTLOGGER: 6
19:07:05gameinfoException in thread "Custom Image Uploading" [17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.NoClassDefFoundError: org/apache/http/entity/mime/MultipartEntityBuilder
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader.lambda$uploadImage$0(CustomUploader.java:56)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at com.darkeyedragon.screenshotuploader.client.imageuploaders.CustomUploader$$Lambda$157/2147095642.run(Unknown Source)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.lang.Thread.run(Thread.java:745)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.ClassNotFoundException: org.apache.http.entity.mime.MultipartEntityBuilder
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.security.AccessController.doPrivileged(Native Method)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:106)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
19:07:05gameinfo[17:07:05] [Custom Image Uploading/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: ... 5 more

 

Link to comment
Share on other sites

1 minute ago, diesieben07 said:

Classes in a mod cannot be in any "org.apache" package. You must repackage the code you are shading.

minecraft {
   srgExtra "PK: org/apache/httpcomponents com/darkeyedragon/screenshotuploader/client/org/apache/httpcomponents"
}

I am assuming you're talking about this? However i tried to add them and i just got errors:

Could not find method srgExtra() for arguments [PK: org/pache/httpcomponents com/darkeyedragon/screenshotuploader/client/org/pache/httpcomponents] on object of type net.minecraftforge.gradle.user.patcherUser.forge.ForgeExtension.


 

Link to comment
Share on other sites

  • 2 years later...
On 4/6/2018 at 5:42 PM, diesieben07 said:

use the reobf task directly

Please can you provide an example of how to use the reobf task directly? Scouring the internet and there's only info on repacking using deprecated info.

Edited by jskidd3
Typo
Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.