Loading applet for a jar within an ear

Hi,
Apologies if my question sounds ignorant, this is the first time i'm playing with applets.
I'm trying to load an applet from a JAR (applet.jar) which contains all the files specific to the applet. The applet.jar resides within an ear (application.ear) which is deployed on JBoss.
The applet related stuff is in the package com.dms.applet (which makes up the applet.jar)
My index.html resides in a war file (webapp.war), which essentially contains a bunch of servlets. Index.html is a two frame page, which tries to load the applet in one frame and a servlet in another (servlets work fine).
My <APPLET> tag for the frame in which the applet is displayed (is another html file - applet.html) looks something like this:
<html><body>
<APPLET
     code="com.dms.applet.NavigationApplet.class"
     codebase=./"
     archive="applet.jar, application.ear"
     width=200
     height=500
>
</APPLET></body></html>
however, the applet always fails to load, i get the following exception when i open the java console:
java.lang.ClassNotFoundException:
com.dms.applet.NavigationApplet.class
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadCode(Unknown Source)
     at sun.applet.AppletPanel.createApplet(Unknown Source)
     at sun.plugin.AppletViewer.createApplet(Unknown Source)
     at sun.applet.AppletPanel.runLoader(Unknown Source)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
     at sun.applet.AppletClassLoader.getBytes(Unknown Source)
     at sun.applet.AppletClassLoader.access$100(Unknown Source)
     at sun.applet.AppletClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     ... 10 more
load: class com.dms.applet.NavigationApplet.class not found.
java.lang.ClassNotFoundException:
com.dms.applet.NavigationApplet.class
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadCode(Unknown Source)
     at sun.applet.AppletPanel.createApplet(Unknown Source)
     at sun.plugin.AppletViewer.createApplet(Unknown Source)
     at sun.applet.AppletPanel.runLoader(Unknown Source)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
     at sun.applet.AppletClassLoader.getBytes(Unknown Source)
     at sun.applet.AppletClassLoader.access$100(Unknown Source)
     at sun.applet.AppletClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     ... 10 more
It seems evident that the applet class loader can't find my applet.class and hence can't load it. I guess that its something wrong with my <APPLET> tag, but can't quite seem to get my finger on it. Do i need to explicitly tell the class loader to look for it in the applet.jar which is in the applicatin.ear?
Any help would be very much appreciated.
Thanks in advance
EnterpriseJavaBones

Hi,
I managed to fix this problem. For those who mite come across the same issue in the future, this is how i did it.
I put the applets code in the war file under an applet dir. That the the index.html is in the root (of the war dir) and the applets code is in a /applet dir.
Hence the codebase simply reads, codebase="applet/"
Cheers
EnterpriseJavaBones

Similar Messages

  • Invoking JAR within an EAR

    I am having trouble invoking my project which is packaged in a jar and the jar is then packaged in an ear file.
    I need to deploy this big ear file onto an AIX server. No single jar file can be deployed onto the server so I have no option but to include my batch project into the ear file, however, when I try to invoke my main within this jar (within the ear), the class can't be found! Can anyone help me with this? Thanks!

    oh also I forgot to mention that I am invoking my program via shell script.
    My script invokes the main function, so my first problem is not being able to 'see' that main function in my ear.I did, however, defined my ear file inside the classpath and used the classpath option when calling my programs. Thanks!

  • Loading applets for Type A only

    Hi
    Sorry if this appears elsewhere but I've searched on what I can think of and haven't found the answer.
    I'm trying to load an applet to a SIM so that it will only run when the NFC phone it's sitting in communicates with the reader using the Type A protocol (and then I want to do the same for another applet that only runs when Type B is the protocol).
    I've tried using the following at the end of the INSTALL for INSTALL command
    EF0D // Contactless specific parameters
    A00B // Contactless Protocol Parameters
    800181 // Assigned Protocols for Implicit Selection (Type A only)
    810101 // Initial Contactless Activation State (Activated)
    A503 // Communication Interface Access Parameters
    8201C0 // Communication Interface Access per Instace (Contact & C'less)
    This loads the applet to the card OK but when I then issue a SELECT command in Type B protocol, the application is selected - which is not what I want.
    On further reading it appears the 800181 command is to program the applet as the default "goto" applet when the card is addressed without a SELECT command (the so called Implicit Selection). The system I use always issues an explicit SELECT command (it's in the spec) and so I realise now it's not the correct command to use.
    Reading through the GP spec it seems it's possible to get an applet to only respond to SELECT commands that are coming from one protocol or the other but I cannot see which command to use :(
    Can someone please point me in the right direction as to which GP command to use to load an applet that will only work with a Type A (or type B) protocol?
    Many thanks.

    From my understanding, you can either set the contactless activation state to ACTIVATED, DEACTIVATED and NOT_ ACTIVATABLE. The communication interface access is for access over either contact or contacless interface. Neither of these are fine grained enough to only allow on a given CL protocol. The protocol setting seems to only be for applications that don't support explicit selection and only support a subset of the CL protocols.
    - Shane

  • Referencing an optional package in a jar inside an ear

    UPDATE: We no longer need this as the third-party will change their shared-library ear to a jar for use on other application servers.
    We have no trouble deploying an ear containing a jar as a shared library, and then referencing the classes in it from another application by specifying the appropriate <library-ref> in weblogic-application.xml.
    In some installations, that shared library is not required, and indeed may not be present. In that case, the <library-ref> is unresolved, and the application will not deploy. We would like to avoid having two versions of our application - one with the <library-ref> and one without.
    If we add the Extension-Name property to the manifest of the jar mentioned above, and deploy the jar (not the ear) as a shared library, our application can reference classes in that jar. The problem is that the library ear (containing the jar) comes from a third party, and we cannot extract out the jar. And the "optional package" mechanism does not appear to work for jars within ears. We've specified the Extension-Name from the library ear ( the one from the library jar is not visible) in the Extension-List of the application. There is no complaint that the optional package is unresolved, but accessing the classes gives ClassNotFoundException.
    I did not find any documentation that optional package jars within an ear should be visible to other deployment units, but it seems odd that the third party would package them such that they can only be referenced with the <library-ref> (i.e. on WLS).
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/libraries.html
    http://java.sun.com/j2ee/verified/packaging.html
    Edited by: mikereiche on Nov 11, 2011 4:34 PM

    The JarInputStream class is used to read the contents of a JAR file from any input stream.
    InputStream input=getResourceAsStream("/input.xml");
    JarInputStream jis
    =new JarInputStream(input);

  • Referencing a jar inside an ear

    Hi,
    I have a program where I need to get a reference to a jar inside an ear
    file. For example, I have this variable set:
    $WL_HOME/config/mydomain/applications/test.ear and I want to set a variable
    for a jar inside this ear.
    Does anyone know the best way to do that?
    Thanks

    When you say "set a variable", do you mean read an XML or properties file
    and modify it and write it back?
    It is relatively simple using the java.util.zip / java.util.jar packages.
    Editing XML is a little harder; I would suggest relying on something like
    JDOM or the libs from The Mind Electric.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Diane Curley" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    I have a program where I need to get a reference to a jar inside an ear
    file. For example, I have this variable set:
    $WL_HOME/config/mydomain/applications/test.ear and I want to set avariable
    for a jar inside this ear.
    Does anyone know the best way to do that?
    Thanks

  • Deploying jars within a single (exploded) ear

    Our project currently uses 8.1 SP3 with split deployment structure.
    Currently the project is split into multiple ears deployed on a single (managed) server. It is my understanding that calls made across ear's even on the same server (jvm) need to be marshalled and unmarshalled using pass by value.
    We are trying to consolidate all our EJBs and Web apps into a single .ear so that we can take advantage of call-by-reference. We also have a requirement of being able to deploy "groups" of EJBs (within a single jar) and/or a web app. Deploying a single ear for the entire project would be one extreme, as it would be painful to deploy individual modules within the ear. On the other hand, using an exploded ear would be too "granular" a way of deploying our changes (we have many EJBs, etc.).
    Is it possible to deploy an exploded ear consisting of jar and war files ? I am in the process of trying this and was looking for feedback. The idea is of being able to deploy parts of the app, such as a .jar or a .war file. Can wlpackage create an exploded ear using .jar and .war files instead of modules consisting of .java/.jsp, etc. files? Thanks for your help!

    There is a classpath issue. Normally ejbs are loaded on top of the ears classpath, so whenever you redeploy them, you have to redeploy the webapps, too. In 8.1 you can build your custom class loader hierarchy. Take a look at http://e-docs.bea.com/wls/docs81/programming/classloading.html#1065667
    -Kai

  • Applet freezes while Jar is loading

    Hi everyone,
    I have a fundamental question concerning the loading mechanism of an applets resources.
    The problem is as follows:
    I have two jars, the first containing all *.class files, the second (size: 10MB) containing only graphics and sounds.
    I start the applet with this code:
    <APPLET ARCHIVE="init.jar,resources.jar" HEIGHT="100" [...]>Of course the point is to have the small init.jar loaded fast an display a loading animation while the big file is beeing loaded in the background. Up to here everything works as expected. When i start the applet, the init.jar is loaded and displays a loading animation as long as i try to get a resource from the resource.jar.
    When I do that, my applet freezes while the big resource.jar file is beeing downloaded.
    This is how i access the resource in the resource.jar
    public void run() {
         while(/*some condition*/) {
              // this is the line which blocks until whole jar is downloaded
              java.io.InputStream input = this.getClass().getClassLoader().getResourceAsStream(/*resource String*/);
              // use input to load resource
    }The freeze happens only upon the first time the while-loop runs, after that the resource.jar is chached and access is almost instant.
    Now the concrete problem is, that the applet freezed in all its threads while the jar is beeing downloaded. I NEED to display an idle animation while this is done.
    Has anyone any suggestion how i can avoid the complete freeze?
    I have already concidered to load the resources without specifing the jar in the HTML-ARCHIVE-Tag, this works becouse of the codebase i can load the ressources from, but the problem is, that these resources have a large overhead from the server to the client until i can use them in the program.
    Also it is no option to load them all on startup in another backgound thread (which would slove the freeze problem, i tried it), becouse i have to dynamically load and unload these resources to avoid OutOfMemory-Errors. Reloading them brings the overhead-Problem up again.
    Only when i specify the 2nd jar in the ARCHIEVE-Tag i have direct access to the browsers chache without wasting memory when holding references to all resources.
    After all every loading and stuff works, there are no errors in the programm only this strange behaviour. I Also tried it with different VMs, on different OS, and different Browser, all the same.
    I would be glad if someone could give me a hint on this, i've been searching for days now, even tried to analyse the Classoader sources but ended up in sun's native calls...
    Thank you in advance
    - Loddi

    I've been encountering the same problem and I think I've figured out the reason behind it and how to solve it.
    It appears that the class loader can only ever load one resource at a time. Once you've forced it to start downloading resources.jar, it can't load any classes until that download has finished, not even classes that are part of the Java API. In your case I believe the solution would be to display one loop of your idle animation before you start loading resources.jar, to make sure that everything the idle animation needs has already been loaded by the class loader.

  • Problem in loading applet from non executable jar file

    hello ,
    I am new to jar concept plz help.. I am trying to call an applet from another applet through frame it is working fine but its download time is much more. now i want to store all my images , sound files and class files of other applets in a jar file and want to access these inner applets from this jar file so that it will make only one http connection with the server for this jar file only and can reduce the download time of applet.
    Can anyone can give me suggestion plz..
    Thanx

    You have to download what you have to download. You
    probably can't easily share images between 2 separate
    Jar files. Unless you can expose them through the
    other applet via a method that can be known once you
    have the reference to the other applet.Thanx but i think i have to elaborate the problem :
    my project structure is just like this ::
    on the top is ::
    Applet A---> from this applet i am callling Applet B & Applet C in frame
    and communication is established between these 3 applets successfully .
    now i have made a single non executable jar file which contains images , sound and class files of these applets .
    so i am referencing images and sound files in applets through this jar.
    but i wanted to load Applet B & C through this jar file only.
    How can i do this ??
    Thanx .. I hope now the problem is clear

  • Applet inside a JAR: Cannot access other classes within the JAR

    Hello,
    Description
    Web app + applet (packaged in a JAR)
    I have followed this tutorial
    JAR contents
    package mypackage
    SimpleApplet.class
    SimpleObj.class
    _"SimpleApplet" uses "SimpleObj"_
    package mypackage;
    public class SimpleApplet extends JApplet {
        @Override
        public void init() {
            SimpleObj obj = new SimpleObj();
    HTML code
    <applet archive="SimpleApplet.jar" codebase="." code="mypackage.SimpleApplet.class" width="800" height="600" />
    SimpleObj cannot be found (Java Console)
    java.lang.NoClassDefFoundError: mypackage/SimpleObj
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: mypackage.SimpleObj
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 8 more
    Caused by: java.io.IOException: open HTTP connection failed:*http://localhost:8080/SimpleApp/mypackage/SimpleObj.class*
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 12 more
    Exception: java.lang.NoClassDefFoundError: mypackage/SimpleObj
    It looks like JRE does not search for the SimpleObj class inside the JAR, but tries to get it from the server...
    Any ideas?
    Thanks in advance,
    Gerard
    Edited by: gsoldevila on Dec 10, 2008 2:05 AM

    misread, deleted
    Edited by: atmguy on Dec 10, 2008 1:12 PM

  • JRE freeze when loading applet twice, through VSAT network

    Here is a good one for you guys I think ...
    ===========
    What I got:
    ===========
    I have a java web application, runing with Tomcat 5.5.
    I use a Apache HTTP Server 2.0.52 for my statiques ressources (html, etc ...), and the modjk connector 1.2.13 to forward all the dynamic requests from the client to the application server.
    One of my html pages contains a signed java applet.
    Basically, this applet control a scanner and send the scanned image to the web application server.
    This applet:
    - use some swing components
    - use the netscape.javascript.JSObject to call javascript functions
    - use the morena API (which include a native library) in order to control a TWAIN scanner
    - format the scanned image into a JPEG image
    - send the formatted image to the web server, using an HttpURLConnection
    (I use a servlet on server side to get the uploaded image)
    - wait for the server response, that tells my applet if the upload has been successfull or not
    Some additional infos:
    - I use morena 6.2.0.0
    - I use JRE 1.5.0.0.1 to run the applet
    - JRE on client side is configured as follow:
    - no applet caching
    - network parameters: "use the browser parameters"
    ==============
    My problem is:
    ==============
    - Through a LAN network, the applet works perfectly ...
    - Through an internet network (I use a VSAT / IDIRECT network), I can load and run my applet the first time
    but when I try to run my applet for the second time (without closing the browser), it just doesn't start, and the JRE crash
    (i.e. the java console freeze ..., just like if it was waiting for something ...)
    nothing happen after that, and I have to kill my JRE / Browser
    the funny stuff about it is that the applet works fine (even through VSAT network) when I don't upload the scanned image on the server
    load and run ok as many time as I want ...
    => seems that something's going wrong during the uploading process
    ==========================
    What I have already tried:
    ==========================
    1/ getting rid of the Java - Javascript communication (JSObject seems to have heaps of bugs ...)
    => no changes
    2/ be careful to close correctly my HttpURLConnection, with a HttpURLConnection.disconnect()
    => no changes
    3/ put the morena jars directly on the client side (in the lib/ext directory of the JRE):
    the morena API use a native library, and apparently, a native library can not be loaded by 2 different ClassLoader
    just to avoid any "java.lang.UnsatisfiedLinkError"
    as shown on http://forum.java.sun.com/thread.jspa?forumID=31&threadID=628889
    => no changes
    4/ have a closer look on the http apache server, just to get rid of the error
    "OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed."
    as shown on the bug 21425 in http://issues.apache.org/bugzilla/show_bug.cgi?id=21425
    => no changes
    5/ use the upgrade version 1.5.0.6 of the JRE
    => no changes
    ==========
    ANY HELP ?
    ==========
    and as usual, I had to fix this problem for yesterday ... :)))
    Any ideas about that ?
    need more infos ?: just let me know
    ======================================================================================
    Here is the piece of code I use to upload the image from the client to the web server:
    ======================================================================================
    * Upload de cette image sur le serveur, apr�s passage au format JPEG
    * @param imageSelectionnee BufferedImage image � transf�rer
    * @throws ComposantNumerisationException exception pouvant etre lev� lors de l'upload
    public void uploadImage(BufferedImage imageSelectionnee)
        throws ComposantNumerisationException {
        // connexion http au server
        HttpURLConnection connexionServer = null;
        // flux de sortie, permettant d'envoyer les donn�es vers le serveur
        OutputStream fluxSortie = null;
        // parametres pour le libelle de l'exception
        ParametresProprietes parametres = null;
        // flux d'entr�e, pour lire la r�ponse du serveur
        BufferedReader fluxEntree = null;
        // r�ponse du serveur
        String reponseServeur = null;
        // image au format JPEG
        BufferedImage imageFormatJPEG = null;
        try {
            /* conversion de l'image au format JPEG */
            imageFormatJPEG = this.formatterImage(imageSelectionnee);
            /* ouverture d'une connexion vers le serveur */
            connexionServer = this.ouvrirConnexion(imageFormatJPEG);
            /* ecriture des donn�es dans le flux de sortie, vers le serveur */
            // cr�ation d'un outputStream
            fluxSortie = connexionServer.getOutputStream();
            // transfert des donn�es vers le serveur
            ImageIO.write(imageFormatJPEG, Constantes.TYPE_IMAGE, fluxSortie);
            fluxSortie.flush();
            /* lecture de la r�ponse du serveur */
            // cr�ation d'un flux de lecture sur le flux d'entr�e
            fluxEntree = new BufferedReader(new InputStreamReader(
                                                connexionServer.getInputStream()));
            // lecture de la r�ponse du serveur
            reponseServeur = fluxEntree.readLine();
            // v�rification du succes de l'upload, en fonction de la r�ponse du serveur
            if (!reponseServeur.startsWith("REPONSE")) {
                /* cas ou le message retour ne commence pas par "REPONSE":
                 * ce n'est pas la r�ponse de la servlet
                 *  => Tomcat nous a redirig� vers la page d'authentification */
                fenetreNumerisation.redirigerFenetreAuthentification();
            } else if (reponseServeur.compareTo("REPONSE:OK") != 0) {
                // la r�ponse du serveur indique qu'il y a eu un probl�me lors de l'upload
                throw new IOException(reponseServeur);
        } catch (IOException e) {
            // cr�ation des parametres pour ce libelle d'erreurs
            parametres = new ParametresProprietes();
            parametres.ajouterParametre("0", e.toString());
            throw new ComposantNumerisationException(
                    proprietes.getPropriete("ERREUR_UPLOAD", null),
                    proprietes.getPropriete("ERREUR_UPLOAD_TECH", parametres),
                    ComposantNumerisationException.ERREUR_NON_BLOCANTE);
        } finally {
            try {
                // fermeture de ce flux de sortie
                if (null != fluxSortie) {
                    fluxSortie.close();
                // fermeture du flux de lecture de la reponse
                if (null != fluxEntree) {
                    fluxEntree.close();
            } catch (IOException e) {
            // fermeture de la connexion
            if (null != connexionServer) {
                connexionServer.disconnect();
    * Ouverture d'une connexion vers la servlet d'upload de l'image
    * @param image BufferedImage image � transf�rer
    * @return HttpURLConnection une connexion http
    * @throws IOException exception IO
    * @throws ComposantNumerisationException exception
    private HttpURLConnection ouvrirConnexion(BufferedImage image)
        throws IOException, ComposantNumerisationException {
        // url du server
        URL urlServer = null;
        // connexion http au server
        HttpURLConnection connexionServer = null;
        // signature
        String signature = null;
        // g�n�ration de la signature de l'image � transf�rer
        signature = this.genererSignatureImage(image);
        // construction de l'url du serveur � appeler pour cet upload
        // en incluant un parametre pour transmettre la signature de l'image � transf�rer
        // + identifiant du passeport d'urgence courant
        urlServer = new URL(this.urlServeur + this.action +
                            "?" + Constantes.PARAM_SIGNATURE_IMAGE + "=" + signature +
                            "&" + Constantes.PARAM_IDDEMANDE + "=" + idDemande +
                            "&" + Constantes.PARAM_CODEMAJ + "=" + codeMaj +
                            "&" + Constantes.PARAM_TYPEDEMANDE + "=" + typeDemande);
        if (null == urlServer) {
            throw new IOException(proprietes.getPropriete(
                                "ERREUR_UPLOAD_CREATION_URL_SERVEUR", null));
        // ouverture d'une connexion http, gr�ce a cette url du server
        connexionServer = (HttpURLConnection) urlServer.openConnection();
        if (null == connexionServer) {
            throw new IOException(proprietes.getPropriete(
                    "ERREUR_UPLOAD_OUVERTURE_CONNEXION_SERVEUR", null));
        // param�trage de cette connexion
        // m�thode de transmission = POST
        connexionServer.setRequestMethod("POST");
        // autorisation de lire les donn�es venant du serveur
        connexionServer.setDoInput(true);
        // autorisation d'�crire des donn�es vers le serveur                         
        connexionServer.setDoOutput(true);
        // pas d'utilisation de caches
        connexionServer.setUseCaches(false);
        connexionServer.setDefaultUseCaches(false);
        // sp�cification du type des donn�es que l'on envoie vers le serveur
        connexionServer.setRequestProperty("content-type", "img/jpeg");
        return connexionServer;
    }=======================================================================================
    Here is the piece of code I use on server side to get the scaned image from the client:
    =======================================================================================
    * Lecture des donn�es en provenance de l'applet
    * @param request HttpServletRequest
    * @return ByteArrayOutputStream buffer contenant les donn�es lues
    * @throws TechnicalException exception
    * @throws FunctionalException si erreur fonctionnelle
    private ByteArrayOutputStream lireDonnees(HttpServletRequest request)
        throws FunctionalException, TechnicalException {
        // stream de sortie sur l'image
        ByteArrayOutputStream baos = null;
        // id du passeport d'urgence au format Integer
        // image issue de l'applet
        BufferedImage image = null;
        try {
            /* r�cup�ration de l'image */
            image = ImageIO.read(request.getInputStream());
            if (null == image) {
                logger.error(THIS_CLASS + Libelles.getLibelle("ERR-TEC-16", null));
                throw new TechnicalException(new ErreurVO("ERR-TEC-16",
                        null, "", true, false, false));
        } catch (IllegalArgumentException e) {
            logger.error(THIS_CLASS + Libelles.getLibelle("ERR-TEC-13", null));
            throw new TechnicalException(new ErreurVO("ERR-TEC-13",
                    null, "", true, false, false));
        } catch (IOException e) {
            logger.error(THIS_CLASS + Libelles.getLibelle("ERR-TEC-16", null));
            throw new TechnicalException(new ErreurVO("ERR-TEC-16",
                    null, "", true, false, false));
        return baos;
    * Ecriture de la reponse � envoyer � l'applet
    * @param response HttpServletResponse
    * @param erreur Message d'erreur
    * @throws IOException exception
    private void ecrireReponse(HttpServletResponse response, String erreur) throws IOException {
        // r�ponse � envoyer � l'applet
        String reponseServer = null;
        // flux de reponse
        PrintWriter fluxReponse = null;
        response.setContentType("text/html");
        // construction de la r�ponse � envoyer � l'applet
        if (null == erreur) {
            reponseServer = "REPONSE:OK";
        } else {
            /* cas ou il y a eu une exception lev�e lors de la reception des donn�es */
            reponseServer = "REPONSE:ERREUR:" + erreur;
        if (logger.isDebugEnabled()) {
            logger.debug(THIS_CLASS +
                    "Envoie de la r�ponse � l'applet, indiquant si l'upload s'est bien d�roul�: " +
                    reponseServer);
        //envoie de la r�ponse a l'applet
        fluxReponse = response.getWriter();
        fluxReponse.println(reponseServer);
        fluxReponse.close();
    }==============================================================================
    here is the traces I get when the applet doesn't work, through a VSAT network:
    ==============================================================================
    Java Plug-in 1.5.0_01
    Utilisation de la version JRE 1.5.0_01 Java HotSpot(TM) Client VM
    R�pertoire d'accueil de l'utilisateur = C:\Documents and Settings\assistw
    network: Chargement de la configuration du proxy d�finie par l'utilisateur ...
    network: Termin�.
    network: Chargement de la configuration du proxy � partir de Netscape Navigator ...
    network: Erreur lors de la lecture du fichier de registre : C:\Documents and Settings\assistw\Application Data\Mozilla\registry.dat
    network: Termin�.
    network: Chargement de la configuration proxy du navigateur ...
    network: Termin�.
    network: Configuration du proxy : Configuration du proxy du navigateur
    basic: Le cache est d�sactiv� par l'utilisateur
    c:   effacer la fen�tre de la console
    f:   finaliser les objets de la file d'attente de finalisation
    g:   lib�rer la m�moire
    h:   afficher ce message d'aide
    l:   vider la liste des chargeurs de classes
    m:   imprimer le relev� d'utilisation de la m�moire
    o:   d�clencher la consignation
    p:   recharger la configuration du proxy
    q:   masquer la console
    r:   recharger la configuration des politiques
    s:   vider les propri�t�s syst�me et d�ploiement
    t:   vider la liste des threads
    v:   vider la pile des threads
    x:   effacer le cache de chargeurs de classes
    0-5: fixer le niveau de tra�age � <n>
    basic: R�cepteur de modalit�s enregistr�
    basic: R�f�rence au chargeur de classes : sun.plugin.ClassLoaderInfo@b30913, refcount=1
    basic: R�cepteur de progression ajout� : sun.plugin.util.GrayBoxPainter@77eaf8
    basic: Chargement de l'applet...
    basic: Initialisation de l'applet...
    basic: D�marrage de l'applet...
    network: Connexion de http://rma_phileas/Client/html/composants/scanner/SAppletNumerisation.jar avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/html/composants/scanner/SAppletNumerisation.jar avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"
    security: Acc�s aux cl�s et au certificat dans le profil utilisateur Mozilla : null
    security: Chargement des certificats AC racine depuis C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\cacerts
    security: Certificats AC racine charg�s depuis C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\cacerts
    security: Chargement des certificats JPI depuis C:\Documents and Settings\assistw\Application Data\Sun\Java\Deployment\security\trusted.certs
    security: Certificats JPI charg�s depuis C:\Documents and Settings\assistw\Application Data\Sun\Java\Deployment\security\trusted.certs
    security: Chargement des certificats JPI depuis C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\trusted.certs
    security: Certificats JPI charg�s depuis C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\trusted.certs
    security: Chargement des certificats depuis la zone de stockage des certificats de session JPI
    security: Certificats charg�s depuis la zone de stockage des certificats de session JPI
    security: Recherche du certificat dans le magasin de certificats permanent JPI
    security: Recherche du certificat dans la zone de stockage des certificats de session JPI
    security: Obtenir l'objet de stockage des cl�s de la zone de stockage des certificats AC racine
    security: Obtenir l'objet de stockage des cl�s de la zone de stockage des certificats AC racine
    security: Recherche du certificat dans la zone de stockage des certificats AC racine
    security: D�terminer si le certificat peut �tre v�rifi� � l'aide des certificats de la zone de stockage des certificats AC racine
    ... [check certifications]
    sun.misc.Launcher$ExtClassLoader@92e78c
    <no principals>
    java.security.Permissions@157b46f (
    (java.lang.RuntimePermission stopThread)
    (java.security.AllPermission <all permissions> <all actions>)
    (java.io.FilePermission \C:\Program Files\Java\jre1.5.0_01\lib\ext\sunjce_provider.jar read)
    (java.util.PropertyPermission java.version read)
    (java.util.PropertyPermission java.vm.name read)
    (java.util.PropertyPermission java.vm.vendor read)
    (java.util.PropertyPermission os.name read)
    (java.util.PropertyPermission java.vendor.url read)
    (java.util.PropertyPermission java.vm.specification.vendor read)
    (java.util.PropertyPermission java.specification.vendor read)
    (java.util.PropertyPermission os.version read)
    (java.util.PropertyPermission java.specification.name read)
    (java.util.PropertyPermission java.class.version read)
    (java.util.PropertyPermission file.separator read)
    (java.util.PropertyPermission java.vm.version read)
    (java.util.PropertyPermission os.arch read)
    (java.util.PropertyPermission java.vm.specification.name read)
    (java.util.PropertyPermission java.vm.specification.version read)
    (java.util.PropertyPermission java.specification.version read)
    (java.util.PropertyPermission java.vendor read)
    (java.util.PropertyPermission path.separator read)
    (java.util.PropertyPermission line.separator read)
    (java.net.SocketPermission localhost:1024- listen,resolve)
    ... [check certifications]
    security: La v�rification du certificat � l'aide des certificats AC racine a �chou�
    security: Aucune information d'horodatage disponible
    basic: Modalit� empil�e
    basic: Modalit� d�sempil�e
    basic: Utilisateur s�lectionn� : 0
    security: L'utilisateur a accord� les droits d'acc�s au code pour cette session seulement
    security: Ajout du certificat dans la zone de stockage des certificats de session JPI
    security: Certificat ajout� dans la zone de stockage des certificats de session JPI
    security: Enregistrement des certificats dans la zone de stockage des certificats de session JPI
    security: Certificats enregistr�s dans la zone de stockage des certificats de session JPI
    ... [check certifications]
    sun.plugin.security.PluginClassLoader@10fe2b9
    <no principals>
    java.security.Permissions@fe315d (
    (java.lang.RuntimePermission accessClassInPackage.sun.audio)
    (java.lang.RuntimePermission stopThread)
    (java.security.AllPermission <all permissions> <all actions>)
    (java.util.PropertyPermission java.version read)
    (java.util.PropertyPermission java.vm.name read)
    (java.util.PropertyPermission javaplugin.version read)
    (java.util.PropertyPermission java.vm.vendor read)
    (java.util.PropertyPermission os.name read)
    (java.util.PropertyPermission java.vendor.url read)
    (java.util.PropertyPermission java.vm.specification.vendor read)
    (java.util.PropertyPermission java.specification.vendor read)
    (java.util.PropertyPermission os.version read)
    (java.util.PropertyPermission browser.vendor read)
    (java.util.PropertyPermission java.specification.name read)
    (java.util.PropertyPermission java.class.version read)
    (java.util.PropertyPermission file.separator read)
    (java.util.PropertyPermission browser.version read)
    (java.util.PropertyPermission java.vm.version read)
    (java.util.PropertyPermission os.arch read)
    (java.util.PropertyPermission browser read)
    (java.util.PropertyPermission java.vm.specification.name read)
    (java.util.PropertyPermission java.vm.specification.version read)
    (java.util.PropertyPermission java.specification.version read)
    (java.util.PropertyPermission java.vendor read)
    (java.util.PropertyPermission path.separator read)
    (java.util.PropertyPermission http.agent read)
    (java.util.PropertyPermission line.separator read)
    (java.net.SocketPermission rma_phileas connect,accept,resolve)
    (java.net.SocketPermission localhost:1024- listen,resolve)
    ... [check certifications]
    sun.misc.Launcher$ExtClassLoader@92e78c
    <no principals>
    java.security.Permissions@bd09e8 (
    (java.lang.RuntimePermission stopThread)
    (java.security.AllPermission <all permissions> <all actions>)
    (java.io.FilePermission \C:\Program Files\Java\jre1.5.0_01\lib\ext\Smorena.jar read)
    (java.util.PropertyPermission java.version read)
    (java.util.PropertyPermission java.vm.name read)
    (java.util.PropertyPermission java.vm.vendor read)
    (java.util.PropertyPermission os.name read)
    (java.util.PropertyPermission java.vendor.url read)
    (java.util.PropertyPermission java.vm.specification.vendor read)
    (java.util.PropertyPermission java.specification.vendor read)
    (java.util.PropertyPermission os.version read)
    (java.util.PropertyPermission java.specification.name read)
    (java.util.PropertyPermission java.class.version read)
    (java.util.PropertyPermission file.separator read)
    (java.util.PropertyPermission java.vm.version read)
    (java.util.PropertyPermission os.arch read)
    (java.util.PropertyPermission java.vm.specification.name read)
    (java.util.PropertyPermission java.vm.specification.version read)
    (java.util.PropertyPermission java.specification.version read)
    (java.util.PropertyPermission java.vendor read)
    (java.util.PropertyPermission path.separator read)
    (java.util.PropertyPermission line.separator read)
    (java.net.SocketPermission localhost:1024- listen,resolve)
    scl:
    Morena - Image Acquisition Framework version 6.2.0.0.
    Copyright (c) Gnome s.r.o. 1999-2004. All rights reserved.
    Licensed to "XXX".
    network: Connexion de http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageInputStreamSpi avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageInputStreamSpi avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"
    network: Connexion de http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageOutputStreamSpi avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageOutputStreamSpi avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"
    network: Connexion de http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageTranscoderSpi avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageTranscoderSpi avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"
    network: Connexion de http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageReaderSpi avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageReaderSpi avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"
    network: Connexion de http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageWriterSpi avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/html/composants/scanner/META-INF/services/javax.imageio.spi.ImageWriterSpi avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"
    network: Connexion de http://rma_phileas/Client/flux/protected/uploadimage.do?signature=c07690c12904320a253cbdeeded59238&idDemande=7&codeMaj=1133967329473&typeDemande=PU avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/flux/protected/uploadimage.do?signature=c07690c12904320a253cbdeeded59238&idDemande=7&codeMaj=1133967329473&typeDemande=PU avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"
    basic: Arr�t de l'applet...
    basic: R�cepteur de progression supprim� : sun.plugin.util.GrayBoxPainter@77eaf8
    basic: Jonction du thread d'applet...
    basic: Destruction de l'applet...
    basic: Elimination de l'applet...
    basic: Sortie de l'applet...
    basic: Thread d'applet joint...
    basic: R�cepteur de modalit�s non enregistr�
    basic: Recherche d'informations...
    basic: Lib�ration du chargeur de classes : sun.plugin.ClassLoaderInfo@b30913, refcount=0
    basic: Mise en cache du chargeur de classes : sun.plugin.ClassLoaderInfo@b30913
    basic: Taille de cache du chargeur de classes courant : 1
    basic: Termin�...
    basic: R�cepteur de modalit�s enregistr�
    basic: R�f�rence au chargeur de classes : sun.plugin.ClassLoaderInfo@b30913, refcount=1
    basic: R�cepteur de progression ajout� : sun.plugin.util.GrayBoxPainter@1e16483
    basic: Chargement de l'applet...
    basic: Initialisation de l'applet...
    basic: D�marrage de l'applet...
    network: Connexion de http://rma_phileas/Client/html/composants/scanner/SAppletNumerisation.jar avec proxy=DIRECT
    network: Connexion http://rma_phileas/Client/html/composants/scanner/SAppletNumerisation.jar avec cookie ":::langueSettings:::=FR; :::menuSettings_gabaritMaquette:::=%3CSETTINGS%3E%3CVERSION%3EVersion%201.2-Utilisateur%3C/VERSION%3E%3CINDEX_ITEM1%3E0%3C/INDEX_ITEM1%3E%3CINDEX_ITEM2%3E0%3C/INDEX_ITEM2%3E%3CINDEX_ITEM3%3Enull%3C/INDEX_ITEM3%3E%3C/SETTINGS%3E; JSESSIONID=D064486FD6C7CC17E7B256B66965FFEE"

    A workaround would be: don't use IE9. You want a solution, not a workaround.
    I think at this juncture you are best of creating a new bug report and be sure to reference the old closed one. It doesn't look entirely related though, your symptoms are different from what is described in it (freeze VS a crash). You tried this on several systems right? Also on machines on a different network?
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7072601

  • How to share dependant jars across rars & ears / avoid classcast exceptions

    <b>How can one share dependant jars between a ear application and a resource adapter and avoid getting a ClassCastException? </b>
    <P>
    In some appservers(such as Oracle) the resource adapter is the parent of your ear classloader, so a single instance multiple classloader problem doesn't occur. But in some appservers such as BEA Weblogic this isn't the case. Not sure why BEA decided to make resource adapter class loader seperate and not the parent of ear loader...
    <P>
    If I bundle the resource adapter specific classes in the corresponding module archive file, I will get a class cast exception, becos I will have a <i>single instance and multiple class loader situation</i> (assuming resource adapters uses its own classloader).
    <P>
    Second question related to the above: Web logic documentation recommends that we bundle the common files in APP-INF direcotory for embedded resource adapter apps. If I start bundling the resource adapter in an ear file, for every ear app we will have a rar bundled. What about the JNDI names? won't you have to rename the resource adapter differently for each ear so that there is no jndi name clash? Doesn't this defeat the purpose of having one common connector for all apps?
    <P>
    Here is a detailed description of what I want:
    Let say you have a ear file. Let's say there is a common.jar shared between your ear application (say the ejb module uses it), and your resource adapter.
    <P>
    In the case of Oracle's OC4J I can see there won't be any problem of having this common.jar part of the resource adapter(RA). When the RA class loader loads the rar, it makes sure the common.jar files are accessible in the chain of all class loaders it is a parent of. So, the ear loader, ejb loader etc...will have visibility -> hence no class cast exception.
    <p>
    But what do clients do when they want to have their ear deployable across multiple appservers not just oc4j. BEA recently changed their class loader structure...their resource loader is no longer parent of the ear, so the ejb app in the ear doesn't have visibility into common.jar packaged with rar. So, the only solution was to bundle the common.jar file with the ear. But this causes problems, because we can have a situation where certain object instances (that are not serialized or copied) can be shared across class loaders. This ends up in the single instance multiple class loader situation->hence classcastexception.
    <p>
    The only solution I found was to make the common.jar file a shared library. That way only one copy of the class files are there for both the rar and the ear and its visibility is there not only for rar but for ear since it is loaded by the system class loader or shared library class loader (if ther eis one such).
    <P>
    Please convey best practise recommendation.
    Sudhakar

    Pete <[email protected]> wrote:
    Is there a way to have a non-EJB jar at the EJB classloader level ? Sure, just add it to the Class-Path: manifest entry in your ejb.jar.
    Dimitri

  • Class not found in applet using 2 jar files

    I have an applet which has been working for years as a stand alone or connecting directly to a derby database on my home server. I have just changed it to connect to MySQL on my ISP server via AJAX and PHP.
    I am now getting a class not found error in my browser, probably because I'm stuffing up the class path.
    The HTML I am using to call the applet is:
    <applet code="AMJApp.class"
    codebase="http://www.interactived.com/JMTalpha"
    archive="AMJ014.jar,plugin.jar"
    width="500"height="500"
    MAYSCRIPT style="border-width:0;"
    name="jsap" id="jsap"></applet>The AMJ014.jar contains the applet and supporting class files.
    The error message is strange to me because it refers to a class I noticed on another web page but which has nothing to do with my applet. Anyway, the message in full is:
    load: class NervousText.class not found.
    java.lang.ClassNotFoundException: NervousText.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.ClassNotFoundException: NervousText.class
    java.lang.UnsupportedClassVersionError: AMJApp : Unsupported major.minor version 51.0
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClassCond(Unknown Source)
         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.defineClass(Unknown Source)
         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 sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.access$100(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.UnsupportedClassVersionError: AMJApp : Unsupported major.minor version 51.0

    Thanks again.
    The page code is:
    <html>
    <head>
      <title>Applet to JavaScript to PHP</title>
    </head>
    <body>
    <script type="text/javascript">
    function updateWebPage(myArg)
    document.getElementById("txt1").innerHTML=myArg;
    if (myArg=="")
      document.getElementById("cbxItem").innerHTML="";
      return;
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.onreadystatechange=function()
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        document.getElementById("cbxItem").innerHTML=xmlhttp.responseText;
    xmlhttp.open("GET","putitem.php?id="+myArg,true);
    xmlhttp.send();
    </script>
    <form>
    <table border=1 align='center' cellpadding=0 cellspacing=0 >
    <tr><td style='text-align:center; background-color:#C0C0C0'>Compiled Java Applet</td></tr>
    <tr><td><applet code="AMJApp.class" codebase="http://www.interactived.com/JMTalpha" archive="AMJ014.jar" width="500"height="500" MAYSCRIPT style="border-width:0;" name="jsap" id="jsap"></applet> </td></tr>
    <tr><td style='text-align:center; background-color:#C0C0C0'>HTML Textbox filled by JavaScript</td></tr>
    <tr><td><textarea style='width:500px; height:50px' name='txt1' id='txt1'>Query goes here</textarea></td></tr>
    <tr><td style='text-align:center; background-color:#C0C0C0'>HTML diagnostic messages rendered by PHP script</td></tr>
    <tr><td><div id="cbxItem">PHP info will populate this space</div></td></tr>
    </table>
    </form>
    </body>
    </html>The URL of the problem page is:
    http://www.interactived.com/JMTalpha/AMJTest.htm
    The code in the page is based on the following test page, which works:
    http://www.interactived.com/test5Applet.htm
    And the Applet, before I made any changes can be seen at this address:
    http://www.interactived.com/jartest0906.htm
    Thanks again for you interest.
    Edited by: 886473 on 21-Sep-2011 00:47

  • Struts not loading when EJB is part of the EAR?

    I've been building a struts 1.2 application that is part of .war file that is deployed within an ear file. The web application has been working fine with Weblogic 8.1
              Today, i added a ejb jar file to the ear and now i get a javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml when executing the web application.
              When I remove the EJB JAR, the web application works fine. So I can't imagine that there is something wrong with struts-config.xml file?
              Why would addind an EJB to the EAR cause this problem. Has anyone else seen this?

    The struts files where never in the EJB.
              I was able to fix this, strangley enough, by moving all the lbraries from the WEB-INF/lib directory within the war, and copy them to the APP-INF/lib directory within the ear.
              For some reason that fixed the problem, but now i have to clean up the code because I have duplicate libraries within my war and APP-INF/lib directory in my ear.
              Very very bizarre.

  • Problem in loading applets

    HI,
    Im facing a problem when im trying to open a URL containing a applet in IE 7.
    When i checked in the settings of IE the JVM used for loading of applets is java 2 v 1.5.0_03.
    This JRE is installed in my system.
    The error im getting in the browser is
    "THe JAVA RUN TIME ENVIRONMENT CANNOT BE LOADED"

    Well, this needs further investigation, Mr. Watson ;)
    Looking at the output you provided, it seems to me that you ommited the cache_version parameter. (on purpose?)
    The caching process involves the check for newer versions of the jars: this can be done either using the version tag, or letting plugin compare the cached jars with the ones on the server using their timestamp. According to the output you've got, the verification is done using that timestamp. This might be the problem.
    Did you check the logs of your webserver -you're using apache, right? Nothing unusual there? Raised debuglevel there?
    You could try to exclude some possible problems by trying to change the verification process: Instead of using the timestamp, give it a try and use version numbers for your jars.
    Since the version numbers are coded in the object tag in your jsp page, plugin can do the verification without getting the jar-files' timestamps.
    If this solves the problem, the timestamp is definitely the cause of your trouble.
    ;)

  • Dynamically Loading Applet in an IFRAME

    Hi All!
    I'm not sure if this is the right place to put my question, since it's more of a JavaScript issue. But, I'll just test my luck here.
    I have a signed applet that I wish to load dynamically. What I did was to create an HTML document containing the applet then have another HTML document, containing an IFRAME element with it's source pointing to the applet HTML document. This is how it looks like:
    *Applet.htm (HTML containing the applet)<HTML>
    <BODY>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
              width="0"
              height="0"
              id="JavaPOSDiags"
              name="JavaPOSDiags"
              viewastext>
              <PARAM name="CODE" value="javapos.DiagApplet">
              <PARAM name="ARCHIVE" value="JavaPOSDiags.jar">
              <PARAM name="NAME" value="JavaPOSDiags">
              <PARAM name="type" value="application/x-java-applet;jpi-version=1.3.0">
              <PARAM name="scriptable" value="true">
    </OBJECT>
    </BODY>
    </HTML>
    *Main.htm (HTML containing the IFRAME that loads the applet)<HTML>
    <BODY>
         <iframe id="fxJavaPOS" src="Blank.htm" width=0 height=0 frameborder=0 style="display: none"></iframe>     <!-- Blank.htm is another HTML file that contains a blank document. ->
         <script language=javascript>
              var bAppletLoaded = false;
              function loadApplet() {
                   var eJavaPOSFrame = document.getElementById("fxJavaPOS");
                   if(eJavaPOSFrame != null) {
                        eJavaPOSFrame.src = "Applet.htm";
                        bAppletLoaded = true;
              function testApplet() {
                   if(bAppletLoaded) {
                        var eJavaPOS = document.getElementById("fxJavaPOS").contentWindow;
                        var eJavaPOSApplet = eJavaPOS.document.getElementById("JavaPOSDiags");
                        try {
                             if(eJavaPOSApplet != null) {
                                  //call applet's methods/properties here...
                        } catch(exception) {
                             //an exception occured...
         </script>
         <input type=button id=loadApplet value="Load Applet" onclick="loadApplet()" name=loadApplet>
         <input type=button id=testApplet value="Test Applet" onclick="testApplet()" name=testApplet>
    </BODY>
    </HTML>My problem is, when testApplet() is called, an exception is thrown once the applet reference is compared to null:if(eJavaPOSApplet != null).... I don't know why this happens. When I do remove the comparison statement and just proceed w/ calling the applet's methods/properties, the browser goes crazy. It seems that the line:var eJavaPOSApplet = eJavaPOS.document.getElementById("JavaPOSDiags");gives me an object, but, I'm not sure if it is the applet, because referencing eJavaPOSApplet, e.g. calling methods or comparing to null, causes the browser to hang.
    Could this be a Java security issue?
    Can anyone help me?

    How long does it take to load the same remote image in a browser? (clear the cache first)
    What code are you using to load and wait for the image?
    Have you indentified for certain that the 15s is entirely down to image loading and not anything else?

Maybe you are looking for

  • Run adobe Air from USB stick

    Hi. I am making this experiment, under a linux enrionment now. I have copied a Adobe Air installation on the USB, mounted say in /media/usb with the runtime in /media/usb/air If I run: cd /media/usb/air ./Versions/1.0/Adobe\ AIR\ Application\ Install

  • Extractor to pul fields ...

    Hi all, I am extracting data from MM domian , can u please help me to find out which extractor pulls folling fields from ECC to BW . Vendor group,Contract number,Number of Material Groups,Product number,Invoice number,Invoice due date,Invoice amount

  • Downloading non-jar resources

    Hi, I would like to download a configuration file for the downloaded application. For example a config file named LookAndFeel.cfg which is not packaged into the jar file. This could enable changing the LookAndFeel of the app through changing only the

  • CastException: Tomcat 4.1.27, Oracle 9i, dbcp

    I have Tomcat 4.2.17 running and try to configure dbcp to access my Oracle 9i database. I exactly configured my server.xml and web.xml like in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html explained for a Oracle

  • Help with html / php contact form

    Hi guys I was hoping to get some help with a contact form on my website, to be honest I havent a clue about php but kind of okay with html thats why the php code is just a copy and paste from some website, just trying to marry it up with the html but