Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Loading Issue

 
Yamini Sundar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are supporting one application that uses applet, There is an software updates happened in our company and then the applet in this particular application is not loading properly in most of the machines. I have checked the JRE versions and it is JRE 1.5.0_15 and JRE 1.4.2_13. In half of the machines the applet is loading fine and others are facing this problem.I have checked the script error which showing in the screen and displays "null pointer exception" which is occurs while trying to load the applet tree. This application is running fine when we tried it from our offshore location. Can anybody help me whether this may happen due to any environment problem.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

What's the applet trying to when the NPE is thrown? Post the full stack trace, and some relevant code excerpt.
 
Yamini Sundar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The below exception is displaying the Sun jave console, this exception is coming in some machines. Please tell me if any body knows about this exception

java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$300(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$CallMethodThread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
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.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source)
... 6 more
Caused by: java.lang.NullPointerException
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.java2d.SunGraphics2D.makeFontMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.scand.jtree.z.X(Unknown Source)
at com.scand.jtree.TreeCtrl.getPreferredSize(Unknown Source)
at com.scand.jtree.w.XY(Unknown Source)
at com.scand.jtree.TreeApplet.insertNewRoot(Unknown Source)
at com.scand.jtree.TreeApplet.insertNewRoot(Unknown Source)
... 16 more
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.java2d.SunGraphics2D.makeFontMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.scand.jtree.z.X(Unknown Source)
at com.scand.jtree.TreeCtrl.getPreferredSize(Unknown Source)
at com.scand.jtree.w.XY(Unknown Source)
at com.scand.jtree.TreeCtrl.wy(Unknown Source)
at com.scand.jtree.TreeCtrl.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.java2d.SunGraphics2D.makeFontMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.scand.jtree.z.Z(Unknown Source)
at com.scand.jtree.z.V(Unknown Source)
at com.scand.jtree.TreeCtrl.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$300(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$CallMethodThread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
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.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source)
... 6 more
Caused by: java.lang.NullPointerException
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.java2d.SunGraphics2D.makeFontMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.scand.jtree.z.X(Unknown Source)
at com.scand.jtree.TreeCtrl.getPreferredSize(Unknown Source)
at com.scand.jtree.w.XY(Unknown Source)
at com.scand.jtree.TreeApplet.insertNewRoot(Unknown Source)
at com.scand.jtree.TreeApplet.insertNewRoot(Unknown Source)
... 16 more
Exception in thread "AWT-EventQueue-3" java.lang.NullPointerException
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.java2d.SunGraphics2D.makeFontMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.scand.jtree.z.X(Unknown Source)
at com.scand.jtree.TreeCtrl.getPreferredSize(Unknown Source)
at com.scand.jtree.w.XY(Unknown Source)
at com.scand.jtree.TreeCtrl.wy(Unknown Source)
at com.scand.jtree.TreeCtrl.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$300(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$CallMethodThread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
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.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source)
... 6 more
Caused by: java.lang.NullPointerException
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.java2d.SunGraphics2D.makeFontMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.scand.jtree.z.X(Unknown Source)
at com.scand.jtree.TreeCtrl.getPreferredSize(Unknown Source)
at com.scand.jtree.w.XY(Unknown Source)
at com.scand.jtree.TreeApplet.insertNewRoot(Unknown Source)
at com.scand.jtree.TreeApplet.insertNewRoot(Unknown Source)
... 16 more
Exception in thread "AWT-EventQueue-4" java.lang.NullPointerException
at sun.font.FontManager.getFont2D(Native Method)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(Unknown Source)
at sun.font.FontDesignMetrics.<init>(Unknown Source)
at sun.java2d.SunGraphics2D.makeFontMetrics(Unknown Source)
at sun.java2d.SunGraphics2D.getFontMetrics(Unknown Source)
at com.scand.jtree.z.X(Unknown Source)
at com.scand.jtree.TreeCtrl.getPreferredSize(Unknown Source)
at com.scand.jtree.w.XY(Unknown Source)
at com.scand.jtree.TreeCtrl.wy(Unknown Source)
at com.scand.jtree.TreeCtrl.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The call that's causing trouble is Graphics2D.getFontMetrics. Make sure that whatever is passed in as parameter (a Font object, most likely) describes a font that is available on that system.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic