"Brian P. Rickabaugh" wrote:
> Hello all:
>
> For several months I've been using 3270 object within servlets to
> perform screen scraping. This object actually uses AWT components and
> therefore it needs a windowing environment to connect to. Up until
> recently this hasn't been a problem. 1 of 2 things happens now, either
> the servlet throws a NoClassDefFound Exception claming it cannot find
> sun.awt.X11GraphicsEnvironment and sometimes it throws an IOException
> claming it cannot connect to the DISPLAY variable. The NoClassDefFound
> Exception doesn't really make any sense as
> sun.awt.X11GraphicsEnvironment is contained in rt.jar. By the way, I'm
> using JRun on a Sun Solaris box.
>
I just debugged a NoClassDefFound problem in a different context. Don't know
if it will help, but you can have a look.
The gist of it is that the class name reported is NOT the one that cannot be
found. If it was, you'd get a ClassNotFoundException instead. Rather,
NoClassDefFoundException seems to indicate that it is a superclass of the
named class, or an interface that it implements, that cannot be found. This
doesn't help you much on an internal class like this one, but at least you
won't be looking in the wrong place (I made the same assumption initially --
the class name being reported was right there in my JAR file, plain as day,
but I had forgotten to include a JAR file containing the interfaces that it
implemented).
In your case, it may be that one of the native libraries used by AWT is either
no longer available, or perhaps cannot initialize itself correctly (because of
the "connection to the display" problem) and therefore appears not to be
there.
> Brian
>
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html