Hi,

I'm trying to use Log4J in an applet in IE. When the applet is initialised,
I get the following error:


Microsoft (R) VM for Java, 5.0 Release 5.0.0.3805
==============================================
?  help
c  clear
f  run finalizers
g  garbage collect
m  memory usage
q  quit
t  thread list
==============================================
com.ms.lang.VerifyErrorEx: org/apache/log4j/LogManager.<clinit>: type
mismatch: actual type org/apache/log4j/spi/RootCategory, expected type
org/apache/log4j/Logger
      at org/apache/log4j/LogManager.<clinit>
      at org/apache/log4j/LogManager.getLogger
      at org/apache/log4j/Logger.getLogger
      at MyApplet.init
      at com/ms/applet/AppletPanel.securedCall0
      at com/ms/applet/AppletPanel.securedCall
      at com/ms/applet/AppletPanel.processSentEvent
      at com/ms/applet/AppletPanel.processSentEvent
      at com/ms/applet/AppletPanel.run
      at java/lang/Thread.run


Has anyone got any ideas?

The error above is produce by the following  bare bones applet that creates
a logger object.  I create a cab file and sign it with full permissions, so
there are no security exceptions thrown.

import org.apache.log4j.Logger;
import java.awt.*;
import java.applet.*;


public class MyApplet extends Applet
{
      private static Logger log = null;

      public void init()
      {
            log = Logger.getLogger(MyApplet.class.getName());
      }
}

Here's my applet tag from my HTML:

<APPLET


            code     = "MyApplet.class"
                  archive      = "log4j-1.2.jar"
            width    = "400"
            height   = "100"
            hspace   = "0"
            vspace   = "0"
            align    = "top"
    >
        <param name = "useslibrary" VALUE="TEST APPLET">
        <param name = "useslibrarycodebase" VALUE="MyApplet.cab">
        <param name = "useslibraryversion" VALUE="1,0,0,0">

</APPLET>

Thanks,

Andrew.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to