java.lang.NoClassDefFoundError: sun/awt/windows/WToolkit

I've been using the same upload servlet (based on the O'Reilly) for the past year. I noticed today that it throws an exception when trying to resize the image (after upload). Was wondering if anyone had any ideas about why this might be popping up now.

I am running Windows 2000 Pro and recently installed Service Pack 2, the Critical Updates Patch, and the Patch for the Code Red Worm.

The exception:

java.lang.NoClassDefFoundError: sun/awt/windows/WToolkit

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:120)

at java.awt.Toolkit$2.run(Toolkit.java:498)

at java.security.AccessController.doPrivileged(Native Method)

at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:489)

at javax.swing.ImageIcon.(ImageIcon.java:77)

at javax.swing.ImageIcon.(ImageIcon.java:103)

at MediaUpload.doResize(MediaUpload.java:185)

at MediaUpload.doPost(MediaUpload.java:83)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)

at com.unify.ewave.servletexec.ServletExec.CallServletService(ServletExec.java)

at com.unify.ewave.servletexec.ServletExec.processServletRequest(ServletExec.java)

at com.unify.ewave.servletexec.ServletExec.ProcessRequest(ServletExec.java)

at com.unify.ewave.servletexec.ServletExec.ProcessRequest(ServletExec.java)

Thanks!

[1476 byte] By [paulbrockmeyer] at [2007-9-26 2:30:06]
# 1

Hi Paul,

I have a similar problem to yours. I am using the Java 2d api to create an application server side that is accessed via ASP and creates thumbnails for larger images.

My thumbnail that is accessed through DOS works fine, but when I convert it to be accessed through ASP, once uploaded into the Trustlib file, it comes up with the following error message:

HTTP 500.100 - Internal Server Error - ASP error

Internet Information Services

--

Technical Information (for support personnel)

Error Type:

Java Exception (0x80004005)

java.lang.NoClassDefFoundError: javax/swing/ImageIcon

/toner works/testing/java.asp, line 5

I am running build 1.3.1_01 (Java 2).

If you could give me some ideas I would really appreciate it. Please email me on chris@moweb.com.au.

Thanks,

Chris Macko

MoWEB

chrismacko at 2007-6-29 9:48:22 > top of Java-index,Desktop,Core GUI APIs...