Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: off screen image

Hi nc,

It looks to me like the problem is the declaration:

  private static Component DUMMY = null;

in DisplayEvent.java. The construction of a JPanel
for this variable is inside a try {...}, but the
declaration itself is probably triggering the
NoClassDefFoundError.

I don't work much with VisAD anymore, but perhaps this
declaration can be changed to Object, with a cast to
Component in the DisplayEvent.getDisplayComponent().
Of course, the declaration of Component as the return
value of this method may be enough to trigger a
NoClassDefFoundError when a DisplayEvent is constructed.
You or someone would have to experiment with this.

My advice would be to see if you can find some changes
to VisAD so that Java2D offscreen rendering will work
on a system without a display. If you can find simple
changes, perhaps one of the VisAD developers will apply
them to the system.

Good luck,
Bill

On Wed, 2 Aug 2006, ncubukcu wrote:

> if I remotely connect to my visad server and run a test program that
> constructs something like following;
> DisplayImplJ2D display = new DisplayImplJ2D("display1",300,300);
>
> this is what I get when I run my code;
>
> kCGErrorRangeCheck : Window Server communications from outside of
> session allowed for root and console user only
> Exception in thread "main" java.lang.NoClassDefFoundError
>         at visad.DisplayRenderer.setWaitFlag(DisplayRenderer.java:176)
>         at
> visad.java2d.DisplayRendererJ2D.setWaitFlag(DisplayRendererJ2D.java:943)
>         at visad.DisplayImpl.doAction(DisplayImpl.java:1732)
>         at visad.java2d.DisplayImplJ2D.doAction(DisplayImplJ2D.java:312)
>         at visad.ActionImpl.run(ActionImpl.java:353)
>         at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java:95)
> java.lang.NoClassDefFoundError
>         at visad.DisplayImpl.clearMaps(DisplayImpl.java:2191)
>         at visad.java2d.DisplayImplJ2D.clearMaps(DisplayImplJ2D.java:303)
>         at visad.DisplayImpl.<init>(DisplayImpl.java:170)
>         at visad.java2d.DisplayImplJ2D.<init>(DisplayImplJ2D.java:233)
>         at visad.java2d.DisplayImplJ2D.<init>(DisplayImplJ2D.java:211)
>         at visad.java2d.DisplayImplJ2D.<init>(DisplayImplJ2D.java:203)
>         at CreateImage.main(CreateImage.java:63)
> *
> *I know why I get this exception.. it want's me to run it in headless
> mode or I have to set  display to my local machine.  What I don't
> understand is why the off screen constructor above needs a display. Any
> idea how I can go around this. I have done all my excercises on a local
> machine but now that I need to use remote machine for visad, all my test
> cases are failing...
> thanks
> nc
>
> ==============================================================================
> To unsubscribe visad, visit:
> http://www.unidata.ucar.edu/mailing-list-delete-form.html
> ==============================================================================
>
>

==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690