Application jar file is corrupt

Hi Everyone,
Having written a very simple application using ME software develeopement kit, when ran the emulator prompts me to either INSTALL APPLICATION or MANAGE CERTIFICATE AURTHORITIES.
If INSTALL APPLICATION is selected I'm then prompted to ENTER A WEBSITE TO INSTALL FROM into a textbox. MANAGE CERTIFICATE AURTHORITIES presents some spurious code and I don't know what it means. However when ran for the first time, everything seemed to go swimmingly untill I was informe of (I Think) 'Application jar file is corrupt' and then subsequently as described above.
I don't know a great deel about computers, but looks to me like a random problem requiring a random solution - very frustrating! If anyone would like to help I'd be very greatful indeed.
James

pavanpotru, welcome to the forum. Please don't post in threads that are long dead. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
I'm locking this thread now.
db

Similar Messages

  • Where i Put my swing application jar file in jboss

    Hi experts...
    I develope swing application and convert it into jar file....I know jnlp deployment using tomcat..In tomcat i
    put my appcation.jar in webapps/root folder...This is not similar in jboss..I dont know where i put my applcation.jar in jboss.If any body know the idea please let me know..

    Hi
    You have to put your jar file in
    server/default/deploy
    Regards
    M Fazal Ur Rehman

  • Accessing web application JAR files from applet

    I've got an applet which is part of a web application.
    All the web application JARs are in the webapps/myappl/WEB-INF/lib directory, and I
    can't seem to place anything in that directory on the archive attribute of <OBJECT> tag.
    I'm running into trouble because I'm sending objects from the servlet to the applet and keep getting classnot found during deserialization because I've missed some jar file on the archive attribute. I've had to copy lots of jar files up to where the codebase in the HTML file is to make this run. My question is this.
    Is it better to just change the tomcat security policy file (catalina.policy in tomcat conf directory) so that the JARs are directly accessible and I don't have to copy them from WEB-INF/lib???? Has anyone done this before? What would the line look like?
    I'm assuming that I have to follow the instructions (THAT I DON'T UNDERSTAND)
    at the bottom of the policy file. Can someone help me out here????
    should I have something like
    grant codeBase "file:${catalina.home}/webapps/myappl/WEB-INF/classes/-"
    { permission java.security.AllPermission; };
    grant codeBase "file:${catalina.home}/webapps/myappl/WEB-INF/lib/-"
    { permission java.security.AllPermission; };
    Will this allow me to place references to jar files (and the classes directory) in the archive attribute, such as
    <OBJECT .....  >
        <param name="archive" value="../WEB-INF/lib/applet.jar,../WEB-INF/lib/someapp.jar,../WEB-INF/classes" />trailer for catalina.policy is
    // You can assign additional permissions to particular web applications by
    // adding additional "grant" entries here, based on the code base for that
    // application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
    // Different permissions can be granted to JSP pages, classes loaded from
    // the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
    // directory, or even to individual jar files in the /WEB-INF/lib/ directory.
    // For instance, assume that the standard "examples" application
    // included a JDBC driver that needed to establish a network connection to the
    // corresponding database and used the scrape taglib to get the weather from
    // the NOAA web server.  You might create a "grant" entries like this:
    // The permissions granted to the context root directory apply to JSP pages.
    // grant codeBase "file:${catalina.home}/webapps/examples/-" {
    //   permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
    //   permission java.net.SocketPermission "*.noaa.gov:80", "connect";
    // The permissions granted to the context WEB-INF/classes directory
    // grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
    // The permission granted to your JDBC driver
    // grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar" {
    //   permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
    // The permission granted to the scrape taglib
    // grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar" {
    //   permission java.net.SocketPermission "*.noaa.gov:80", "connect";
    // };

    Thank you for your reply.
    As I mentioned in my first post I had seen a couple of posts mentioning ServletContext before, but dismissed them as I am not using any servlets of my own. However, since you showed me exactly how it was used I realised I could probably just use a dummy servlet to get this information.
    The following page suggests a couple of techniques for doing just this.
    http://www.jguru.com/forums/view.jsp?EID=1087411
    So I think that's me sorted, cheers.

  • Run applications ( .jar files) by bash on linux

    On linux:
    I have a swing application and its jar file. I created an executable file using bash script to run the jar file
    #!/bin/bash
    java -jar myapp.jar
    this runs in console normally but when i clicked the executable file, the application runs too but immediately closes. I think the problem is that this can't recognize the swing-layout.jar (swing library) so that the swing components (JFrame,Jbutton) cannot be showed!
    There must be a way for the executable file to recognize the libraries (swing, layouts) for the application by using bash script ?

    There can be number of reasons for that. I suggest you following way:
    1. Modify your script in following way:
    #!/bin/bash
    java -jar myapp.jar 2>/tmp/log.err 1>/tmp/log.out
    After unsuccesful execution check content of /tmp/log.* files and see details of the error.
    Often such errors are caused by environment. May be you just don have java in your PATH .. May
    be DISPLAY is not set .. I don't know.
    To workaround env issue you need to dump environmentin from console:
    declare -x >env.sh
    After that include update your .sh script in following way and see the difference:
    #!/bin/bash
    . env.sh
    java -jar myapp.jar 2>/tmp/log.err 1>/tmp/log.out

  • How to know if the current application jar file has been overwritten?

    When I overwrite a jar file that is being used, the buttons that call new windows stop responding silently but is there some check I can make from within the application to know if the jar file has been overwritten, so that I can warn the user to restart it?
    I know this sounds bad so let me explain why I would want this, if you don't care then skip everything below this point.
    I have close to a hundred of users executing Java applications from a central repository in the network. This is important because the applications are always changing and evolving so it's important that I only have to update one binary. I do most updates after work hours so I don't have a problem there but sometimes there are critical errors that need to be corrected immediately. Depending on the amount of people using an application it may be impractical to warn and wait for everyone to close it and make everyone else wait for that so I just overwrite the files that need to be updated and then warn everyone to restart the application. The result is that buttons that call for frames that haven't been called yet stop working silently. Some users already know what to do when that happens but I want a more graceful approach. I wanted to check for this situation from inside the application so that I could inform the user of the update and provide information on what to do next. Can I do this? I tried some try and catch blocks of code but I can't seem to catch anything when that happens.

    You can write your own class loader that loads classes from that jar file. Make sure it isn't on the class path and when you want to create an object from that jar file, call up your class loader to do that. (You only have to do that for your "top-level" objects, within those objects creating another object will automatically be done by your class loader.)
    Periodically check whether the jar has been modified. If it has, refresh the application by creating a new instance of your class loader and using that to create new instances of all your objects.
    But that sounds like a lot of work just to avoid setting up an emergency change procedure where you get everybody to close their applications.

  • JWS application jar-files are downloaded almost every time

    hey,
    how can i debug the situation, where my application is downloaded very often (even if i havent updated all of the jar-files, they are all downloaded again)?
    can it be that they expire after a certain time? how can i check that?
    thanks,
    Mait

    There are jnlp parameters that can be specified that define when jars are downloaded. This information is in the JWS documentation.

  • Make j2me application jar file

    HI,
    I am using Eclipse SDK 3.2.1 for developing j2me application in mac os x10.5. i need to create jar, jad file for my application. anybody help me how to do this?

    A program I've used before is Java Launcher for making jar/exe files from my classes.
    Link to Java Launcher: http://www.syncedit.com/software/javalauncher/
    Also, I believe JADMaker can be used to take the jars and create jad files from them.
    Also, this site's jad tutorial is pretty nice as well: http://www.autexier.de/jmau/dev/j2me/j2me.html

  • Quickest way to transfer applications/jar files?

    Hi,
    I've got quite a few files I want to transfer to my phone, the problem is, every 3 or so I install the phone will crash, meaning I have to disconnect the USB cable, turn the phone off, wait for it to boot back up and plug in the cable again - a bit of a pain and is making a time consuming job (with all of the stupid confirmations) a *lot* more time consuming.
    Anyway to transfer across loads at once?
    Cheers
    Solved!
    Go to Solution.

    Maybe you should get your self a Bluetooth dongle.
    BTW, what phone are you talking about?
    Grayburn @ www.nokiausers.net & www.dailymobile.se....come say Hello!!!
    If you appreciate ANY help from a member,then show it by clicking on the Blue Star button, cheers

  • Crystal Report not works in JAR File

    I'm using Eclipse All in one, which includes Crystal Reports.. I Connected my Java program with Crystal Reports and its working properly. Now my problem is that the Report is not working in JAR files.. It throws some exception as
    "com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects
    com.businessobjects.reports.sdk.JRCCommunicationAdapter---- Error code:-2147215357 Error code name:internal"
    Whats the Error.. I don't know. I think that i may missed some CLASSPATH Files. The included CLASSPATH Files are:
    ReportViewer.jar
    jrcerom.jar
    Concurrent.jar
    CrystalCharting.jar
    CrystalCommon.jar
    CrystalContentModels.jar
    CrystalExporters.jar
    CrystalExportingBase.jar
    CrystalFormulas.jar
    CrystalQueryEngine.jar
    CrystalReportEngine.jar
    CrystalReportingCommon.jar
    icu4j.jar
    keycodeDecoder.jar
    log4j.jar
    MetafileRenderer.jar
    rasapp.jar
    rascore.jar
    rpoifs.jar
    Serialization.jar
    URIUtil.jar
    xercesImpl.jar
    xml-apis.jar
    and the mysql-connector jar file
    Anybody help me please...

    Unable to load database connector
    'com.crystaldecisions.reports.queryengine..driverImpl.
    DriverLoader
    now you have any idea.. pleaseIs that a typo where you have two periods below?
    queryengine..driverImplOther than that I don't think anybody here can help you with that. If your classpath includes all necessary JAR files and you are able to access all your resources from within your application JAR file, then I imagine there is a problem with the third-party crystal decisions JAR file or how you are attempting to use it.
    My advice to you is to try and contact support with the vendor or provider of this API or possibly try posting on a support forum on their website to see if somebody can help you there.

  • Jar Files in a Jar File - Classpath Error

    Hi,
    I created a jar file that will have all the class files of the application. In the manifest file class path, I have the jar files the application is dependent on. The dependent jar files were kept outside of the application jar file. I was able to execute the main file in the application jar file. Then I created another jar file that holds all the dependent jar files the application is dependent on along with the application jar file into one super jar file. configured the main class attribute of the super jar file to that in the application jar file. When I try to execute it, I'm getting an error saying Class Not Found. Can someone guide me in setting the classpath for this super jar file in its manifest file.
    Presently my manifest file classpath variable in the super jar file is set as App.jar Depend1.jar Depend2.jar
    Thanks,
    E H

    Java's standard class loaders do not support jar files inside of other jar files, and will give the error you see.
    You can write your own customized class loader, use a 3rd-party solution (onejar at sourceforge is one), or remove the interior jars.

  • Crystal Report not working in JAR File

    I am using Eclipse All in one, which includes the Crystal Report... I Finished every thing and the Crystal Report is working in Eclipse.. But its not working in JAR files.. Anybody suggest me WHICH FILES SHOULD BE SET AS CLASSPATHS FOR CREATING THIS JAR FILE...
    Thanks in advance

    Unable to load database connector
    'com.crystaldecisions.reports.queryengine..driverImpl.
    DriverLoader
    now you have any idea.. pleaseIs that a typo where you have two periods below?
    queryengine..driverImplOther than that I don't think anybody here can help you with that. If your classpath includes all necessary JAR files and you are able to access all your resources from within your application JAR file, then I imagine there is a problem with the third-party crystal decisions JAR file or how you are attempting to use it.
    My advice to you is to try and contact support with the vendor or provider of this API or possibly try posting on a support forum on their website to see if somebody can help you there.

  • CLASSPATH and JDBC Drivers in a Jar File

    Hi all, I am creating an application in JDev that uses JDBC to connect to a 10g database. I am deploying my application to a jar and running it on the database server using the jdk installed with the database. $ORACLE_HOME/jdk/bin I want to also use the jdbc driver installed in $ORACLE_HOME/jdbc/lib instead of including the driver in my application jar file. How can I cause my jar file to find the jdbc lib?
    Can I register it directly with the DriverMannager using the file? My app knows the $ORACLE_HOME.
    Or do I just include the jdbc driver in my jar?
    John

    I was hoping it would be that easy. But I am still having problems. Here is my setup.
    export MON_JAVA="$ORACLE_HOME/jdk/bin/java -classpath /u01/app/oracle/product/10.2.0/db_1/jdbc/lib/ojdbc14.jar"
    $MON_JAVA -jar PMonitor.jar -c trace
    and I get this error when connecting to the database.
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
    I also tried the classes.jar with the same results.

  • Web application .war file

    I have a war file with the following structure
    index.jsp
    WEB-INF/web.xml
    WEB-INF/classes (all my servlets here)
    WEB-INF/lib (all my application jar files)
    The web.xml just defines all the servlets as follows
    =================================================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
    <servlet>
    <servlet-name> HtmlServlet </servlet-name>
    <servlet-class> <PKG PATH>.HtmlServlet </servlet-class>
    </servlet>
    <servlet>
    <servlet-name> ChartServlet </servlet-name>
    <servlet-class> <PKG PATH>.ChartServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> HtmlServlet </servlet-name>
    <url-pattern> /HtmlServlet </url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name> ChartServlet </servlet-name>
    <url-pattern> /ChartServlet </url-pattern>
    </servlet-mapping>
    <welcome-file-list>
         <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    =======================================
    WHen I run my application, the index.jsp starts compiling
    and throws an error
    java.lang.NoClassDefFoundError: org/omg/CORBA/ORB
    This class is in one of the jar files in my WEB-INF/lib folder.
    What am I missing? Do I have to declare something in my web.xml file or do I need to put that in weblogic.xml? Currently I dont
    have any weblogic.xml file.
    Thanks,
    Bharat Nagwani

    Hi Michael,
    I am having the same problem. can you provide more information. I was not
    able to find out the answer in the servlet 2.2 specification.
    Thanks,
    Rob
    Michael Girdley wrote:
    I believe that you need to register your helper classes in the Web.XML file
    in your Web application. Check out the servlet 2.2 specification for more
    information.
    Thanks,
    Michael
    Michael Girdley
    BEA Systems
    Learning WebLogic? http://learnweblogic.com
    "bharat nagwani" <[email protected]> wrote in message
    news:3a71da38$[email protected]..
    I have a war file with the following structure
    index.jsp
    WEB-INF/web.xml
    WEB-INF/classes (all my servlets here)
    WEB-INF/lib (all my application jar files)
    The web.xml just defines all the servlets as follows
    =================================================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
    <servlet>
    <servlet-name> HtmlServlet </servlet-name>
    <servlet-class> <PKG PATH>.HtmlServlet </servlet-class>
    </servlet>
    <servlet>
    <servlet-name> ChartServlet </servlet-name>
    <servlet-class> <PKG PATH>.ChartServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> HtmlServlet </servlet-name>
    <url-pattern> /HtmlServlet </url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name> ChartServlet </servlet-name>
    <url-pattern> /ChartServlet </url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    =======================================
    WHen I run my application, the index.jsp starts compiling
    and throws an error
    java.lang.NoClassDefFoundError: org/omg/CORBA/ORB
    This class is in one of the jar files in my WEB-INF/lib folder.
    What am I missing? Do I have to declare something in my web.xml file or doI need to put that in weblogic.xml? Currently I dont
    have any weblogic.xml file.
    Thanks,
    Bharat Nagwani

  • Running a jar file from java code

    Hi!
    Im trying to run a jar file from my code.
    I've tried Classloader, but that doesnt work because it doesnt find the images (also embedded in the 2nd jar file).
    WHat I would like to do is actually RUN the 2nd jar file from the first jar file. There must be a way to do this right?
    any ideas?

    ok, I found some wonderful code (see below) that will try to start the jar. But it doesn't. What it does is produce the following error when my application runs...
    So it's not finding the images in the jar file that I am trying to run? Strange. I checked the URL that sending, but it seems ok....
    I think I will check the url again to make sure......
    any ideas?
    Uncaught error fetching image:
    java.lang.NullPointerException
         at sun.awt.image.URLImageSource.getConnection(Unknown Source)
         at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
         at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
         at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
         at sun.awt.image.ImageFetcher.run(Unknown Source)
    the code....
    /* From http://java.sun.com/docs/books/tutorial/index.html */
    import java.io.IOException;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.lang.reflect.Modifier;
    import java.net.JarURLConnection;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.jar.Attributes;
    * Runs a jar application from any url. Usage is 'java JarRunner url [args..]'
    * where url is the url of the jar file and args is optional arguments to be
    * passed to the application's main method.
    public class JarRunner {
      public static void main(String[] args) {
        URL url = null;
        try {
          url = new URL(args[0]);//"VideoTagger.jar");
        } catch (MalformedURLException e) {
          System.out.println("Invalid URL: ");
        // Create the class loader for the application jar file
        JarClassLoader cl = new JarClassLoader(url);
        // Get the application's main class name
        String name = null;
        try {
          name = cl.getMainClassName();
        } catch (IOException e) {
          System.err.println("I/O error while loading JAR file:");
          e.printStackTrace();
          System.exit(1);
        if (name == null) {
          fatal("Specified jar file does not contain a 'Main-Class'"
              + " manifest attribute");
        // Get arguments for the application
        String[] newArgs = new String[args.length - 1];
        System.arraycopy(args, 1, newArgs, 0, newArgs.length);
        // Invoke application's main class
        try {
          cl.invokeClass(name, newArgs);
        } catch (ClassNotFoundException e) {
          fatal("Class not found: " + name);
        } catch (NoSuchMethodException e) {
          fatal("Class does not define a 'main' method: " + name);
        } catch (InvocationTargetException e) {
          e.getTargetException().printStackTrace();
          System.exit(1);
      private static void fatal(String s) {
        System.err.println(s);
        System.exit(1);
    * A class loader for loading jar files, both local and remote.
    class JarClassLoader extends URLClassLoader {
      private URL url;
       * Creates a new JarClassLoader for the specified url.
       * @param url
       *            the url of the jar file
      public JarClassLoader(URL url) {
        super(new URL[] { url });
        this.url = url;
       * Returns the name of the jar file main class, or null if no "Main-Class"
       * manifest attributes was defined.
      public String getMainClassName() throws IOException {
        URL u = new URL("jar", "", url + "!/");
        JarURLConnection uc = (JarURLConnection) u.openConnection();
        Attributes attr = uc.getMainAttributes();
        return attr != null ? attr.getValue(Attributes.Name.MAIN_CLASS) : null;
       * Invokes the application in this jar file given the name of the main class
       * and an array of arguments. The class must define a static method "main"
       * which takes an array of String arguemtns and is of return type "void".
       * @param name
       *            the name of the main class
       * @param args
       *            the arguments for the application
       * @exception ClassNotFoundException
       *                if the specified class could not be found
       * @exception NoSuchMethodException
       *                if the specified class does not contain a "main" method
       * @exception InvocationTargetException
       *                if the application raised an exception
      public void invokeClass(String name, String[] args)
          throws ClassNotFoundException, NoSuchMethodException,
          InvocationTargetException {
        Class c = loadClass(name);
        Method m = c.getMethod("main", new Class[] { args.getClass() });
        m.setAccessible(true);
        int mods = m.getModifiers();
        if (m.getReturnType() != void.class || !Modifier.isStatic(mods)
            || !Modifier.isPublic(mods)) {
          throw new NoSuchMethodException("main");
        try {
          m.invoke(null, new Object[] { args });
        } catch (IllegalAccessException e) {
          // This should not happen, as we have disabled access checks
    }

  • How to open files in MIDP (from the jar file)?

    Hello,
    I can't seem to figure out how to open a file that is in my MIDP applications jar-File.
    From what I've found via Google, I assume that the way to do it should be by using
    Connector.openInputStream("file:{path_to_my_file}")
    but I only get the error
    java.lang.ClassNotFoundException: com.sun.midp.io.j2me.file.Protocol
    (Running the Emulator from Suns WTK 2.0 with DefaultColorPhone)
    I've also tried file:// with the same result.
    Any ideas?
    Many thanks in advance!
    Bjoern

    I think I've found something that looks promising now:
    Class.getResourceAsStream()

Maybe you are looking for

  • In Disk 0 one of the drive is not showing in Explorer and only have "Delete Volume" option is available in Disk Management.

    Hi, In Disk 0 and I am unable access one of the drive and unable to assign a drive letter to it. I've gone through the MMC for disk management but the only option i get is Delete Volume or Help. The disk management states that the drive is Primary an

  • Which is really higher quality...WAV or ALAC ??

    This might seem an age old question but I cant get my head round it. I understand both are lossless (perfect) formats, HOWEVER when I convert say for example a DJ mix from WAV to apple lossless, like i did this morning...it compressed by 33%, the fil

  • External Editing in JPEG

    I really want to edit my photos with LR adjustments in CS3 in JPEG format, but the only options I am allowed seem to be TIFF and PNG. After reading Kelby's book, I was under the impression that JPEG is an option. I normally wouldn't care, but PS does

  • Cant mount rockbox iPod on mac

    I installed rockbox on my iPod 6g, and when i try to transfer files, it will not mount on OS X. I think that this might be because it uses the mass storage device thing, but i can't get it to mount. I do have ubuntu and windows on my mac, but i can't

  • Indesign CS6 Server Licensing

    Hi, What are the differences between the Limited Single Instance and the Limited Single Instance Development? I can see the following link however would like to know the following questions as well. http://www.adobe.com/products/indesignserver/buying