On Thu, 2004-03-04 at 05:02, Murthy wrote:
> Hi,
>
> I'm encountering the below error while trying to
> generate the '.rtf' file with images. Without images
> '.rtf' file is opening fine.
I'd guess this is more related to AWT than cocoon. This the source of
the method the exception is thrown in (taken from JDK 1.4, the line
numbers are different to your stack trace so I guess you are using JDK
1.3 but the code is probably similar). The stack trace originates inside
the anonymous class. Maybe this will help you locate the cause of the
trace.
/**
* Gets the default toolkit.
* <p>
* If there is a system property named <code>"awt.toolkit"</code>,
* that property is treated as the name of a class that is a subclass
* of <code>Toolkit</code>.
* <p>
* If the system property does not exist, then the default toolkit
* used is the class named <code>"sun.awt.motif.MToolkit"</code>,
* which is a motif implementation of the Abstract Window Toolkit.
* <p>
* Also loads additional classes into the VM, using the property
* 'assistive_technologies' specified in the Sun reference
* implementation by a line in the 'accessibility.properties'
* file. The form is "assistive_technologies=..." where
* the "..." is a comma-separated list of assistive technology
* classes to load. Each class is loaded in the order given
* and a single instance of each is created using
* Class.forName(class).newInstance(). This is done just after
* the AWT toolkit is created. All errors are handled via an
* AWTError exception.
* @return the default toolkit.
* @exception AWTError if a toolkit could not be found, or
* if one could not be accessed or instantiated.
*/
public static synchronized Toolkit getDefaultToolkit() {
if (toolkit == null) {
try {
// We disable the JIT during toolkit initialization. This
// tends to touch lots of classes that aren't needed again
// later and therefore JITing is counter-productiive.
java.lang.Compiler.disable();
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction() {
public Object run() {
String nm = null;
Class cls = null;
try {
nm = System.getProperty("awt.toolkit",
"sun.awt.motif.MToolkit");
try {
cls = Class.forName(nm);
} catch (ClassNotFoundException e) {
ClassLoader cl = ClassLoader.getSystemClassLoader();
if (cl != null) {
try {
cls = cl.loadClass(nm);
} catch (ClassNotFoundException ee) {
throw new AWTError("Toolkit not found: " + nm);
}
}
}
if (cls != null) {
toolkit = (Toolkit)cls.newInstance();
if (GraphicsEnvironment.isHeadless()) {
toolkit = new HeadlessToolkit(toolkit);
}
}
} catch (InstantiationException e) {
throw new AWTError("Could not instantiate Toolkit: " +
nm);
} catch (IllegalAccessException e) {
throw new AWTError("Could not access Toolkit: " + nm);
}
return null;
}
});
loadAssistiveTechnologies();
} finally {
// Make sure to always re-enable the JIT.
java.lang.Compiler.enable();
}
}
return toolkit;
}
-Janek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]