Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8929071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:35:37+00:00 2026-06-15T08:35:37+00:00

At present I’m getting errors about how it can’t find one of my includes,

  • 0

At present I’m getting errors about how it can’t find one of my includes, specifically

java.lang.ClassNotFoundException: org.jivesoftware.smack.provider.ProviderManager

I have confirmed the file to be running as an executable jar, so I really don’t know why it would error out like this, can someone provide me with some insight?

Here’s what I’m currently doing, please correct me if any step of this is wrong.

  1. I take my (confirmed working) program, run it to double check.

  2. I right click the project > Export > Runnable jar file and Select the options > Package required libraries into generated jar file and export Ant Build script to file myProg.xml

    When myprog.xml comes out, it looks like this:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <project default="create_run_jar" name="Create Runnable Jar for Project myProg with Jar-in-Jar Loader">
    <!--this file was created by Eclipse Runnable JAR Export Wizard-->
    <!--ANT 1.7 is required                                        -->
    <target name="create_run_jar">
        <jar destfile="C:/Users/Dbell/Documents/EclipseProjects/myProg/myProg.jar">
            <manifest>
                <attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
                <attribute name="Rsrc-Main-Class" value="com.myCom.noc.xmpptroubleshooter.Main"/>
                <attribute name="Class-Path" value="."/>
                <attribute name="Rsrc-Class-Path" value="./ httpasyncclient-4.0-beta2.jar httpcore-4.2.1.jar httpcore-nio-4.2.1.jar httpclient-4.2.1.jar commons-logging-1.1.1.jar commons-codec-1.6.jar log4j-1.2.12.jar logkit-1.0.1.jar avalon-framework-4.1.3.jar servlet-api-2.3.jar commons-net-3.1.jar xpp3_min-1.1.4c.jar NocLib-1.1.jar smack32-3.2.0.jar httpclient-3.1.jar"/>
            </manifest>
            <zipfileset src="jar-in-jar-loader.zip"/>
            <fileset dir="C:/Users/Dbell/Documents/EclipseProjects/myProg/bin"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\org.apache.httpcomponents\httpasyncclient\jars" includes="httpasyncclient-4.0-beta2.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\org.apache.httpcomponents\httpcore\jars" includes="httpcore-4.2.1.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\org.apache.httpcomponents\httpcore-nio\jars" includes="httpcore-nio-4.2.1.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\org.apache.httpcomponents\httpclient\jars" includes="httpclient-4.2.1.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\commons-logging\commons-logging\jars" includes="commons-logging-1.1.1.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\commons-codec\commons-codec\jars" includes="commons-codec-1.6.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\log4j\log4j\jars" includes="log4j-1.2.12.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\logkit\logkit\jars" includes="logkit-1.0.1.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\avalon-framework\avalon-framework\jars" includes="avalon-framework-4.1.3.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\javax.servlet\servlet-api\jars" includes="servlet-api-2.3.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\commons-net\commons-net\jars" includes="commons-net-3.1.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\xpp3\xpp3_min\jars" includes="xpp3_min-1.1.4c.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\com.MyCom\NocLib\jars" includes="NocLib-1.1.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\com.MyCom\smack32\jars" includes="smack32-3.2.0.jar"/>
            <zipfileset dir="C:\Users\Dbell\.ivy2\cache\com.apache\httpclient\jars" includes="httpclient-3.1.jar"/>
        </jar>
      <signjar jar="myProg.jar" alias="myAlias" keystore="path/to/myKs.ks" storepass="MyPass"/>
    </target>
    </project>
    
  3. From there I right click > run as > ant build file to sign my jar.

  4. Then I move it to my webserver where a launch.jnlp file exists. That looks like this:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <jnlp codebase="http://myServer:8080/myProg/" href="http://myServer:8080/myProg/launch.jnlp" spec="6.0+">
      <information>
          <title>myProg</title>
          <vendor>myName</vendor>
          <homepage href="http://myServer:8080/myProg/"/>
          <description>myProg</description>
          <description kind="short">myProg</description>
    
    
      </information>
      <security>
        <all-permissions/>
      </security>
      <resources>
          <j2se version="1.6+" />
          <jar href="myProg.jar" main="true"/>
      </resources>
      <application-desc main-class="com.myCom.noc.pathToMain.Main">
    
      </application-desc>
    </jnlp>
    

Full stack trace from when application is launched:

java.lang.ClassNotFoundException: org.jivesoftware.smack.provider.ProviderManager
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 com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.myCom.noc.xmpptroubleshooter.Main.main(Main.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

And this is the inside of my jar
This is what the inside of my jar looks like

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:35:38+00:00Added an answer on June 15, 2026 at 8:35 am

    As alluded by @AkselWillgert the standard Java class-loaders will not load classes from Jars inside other Jars. It will be necessary to do one of:

    1. Add a reference to each Jar in the resources section of the JNLP. Or in fact, we can go further and put commonly used APIs into extensions that can be used by many apps., E.G. a commons-logging.jnlp or jive.jnlp.
    2. Extract the classes from all Jars and add them into one single Jar. This is commonly against the user agreement of the API, destroys digital signatures and useful manifest information as might be expressed in a Service Provider Interface.
    3. Install a class-loader that can read Jar inside Jars. That would require a trusted app.

    For a variety of reasons, the first is the best option.


    .. how would I go about signing all those jars?

    Consulting the docs for the signjar task would suggest something like (copy/pasted):

    <signjar
        alias="testonly" keystore="testkeystore"
        storepass="apacheant"
        lazy="true"
        >
      <path>
        <fileset dir="dist" includes="**/*.jar" />
      </path>
    </signjar>
    

    Warning

    Some of the Jars might already be digitally signed. If so, it is best to leave the original signature. How to do that, is more a question about the build tool.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I present a modalViewController that is actually a navigation controller with one view, and
In present project we have a requirement like, access one site collection column to
I present the user a NumericUpDown control so he can specify the size of
My present task is to dissect tcpdump data that includes P2P messages and I
I can present multiple pages in Silverlight using Content = new DetailsPage(); However is
I have to present 4 view controllers in sequence. One is the continuation of
At present I am using eclipse for JAVA project. I always wanted to use
I want to present a view controller where I have one Background imageView. Alpha
My present TextMate theme (Ruby Blue) is nice, except there's one annoying attribute that
Present One MS SQL DataBase 'DB'; DbContext1 with migration; DbContext2 migration not needed; Task

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.