Thanks, Kendall.

I was simply using the first example in the Xvfb man page,
1600x1200x32, and that was the problem.  I missed the
very first exception that said, "color depth (32) not supported,"
and then all heck broke loose.

I changed my Xvfb session to 24-bit, and all is working fine!

Thanks again, Joe



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 1:11 PM
> To: Joe Latone
> Subject: RE: [JAVA2D] X server dependency and consequences of using a
> remo te X server
>
>
> The only thing I can think to try is adjusting the XVFB instance you run
> to
> support different color depths and see if that helps - I can't remember
> ever
> seeing problems like the ones you ran into, but at the time I believe we
> were just doing simple GIF encoding.
>
> Also, did you try testing your XVFB instance to make sure it's working
> ok?
> You can just run an Xterm in that display, then use "xwd -root" I think
> to
> see what the display looks like.
>
> Good luck!
>
> ---> Kendall Gelner ([EMAIL PROTECTED])
>
> > -----Original Message-----
> > From: Joseph A. Latone [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 31, 2001 10:31 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA2D] X server dependency and consequences of using a
> > remo te X server
> >
> >
> > Thanks, Kendall.
> >
> > I did try Xvfb yesterday.  I found a version of Xvfb that seems to
> > work well on SPARC Solaris, from
> > http://puck.informatik.med.uni-giessen.de/download/GISWxwplt-s
> > parc.tar.gz.
> >
> > However, when I try to use JPEGImageEncoder.encode(), I get
> >
> >         java.lang.NoClassDefFoundError (which class?) or
> >         java.lang.RuntimeException: Unable to process image
> > stream, incorrect
> > format.
> >
> > I do not get these errors when running under a real X server.
> >  Any ideas?
> > The two different stack traces follow.  Joe
> >
> > >>>>>>>> NoClassDefFoundError <<<<<<<<
> > java.lang.reflect.InvocationTargetException:
> > java.lang.NoClassDefFoundError
> >         at java.lang.Class.forName0(Native Method)
> >         at java.lang.Class.forName(Class.java:120)
> >         at
> > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Graph
> > icsEnvironment
> > .java:58)
> >         at
> > java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1011)
> >         at
> > com.sun.media.jai.codecimpl.JPEGImage.<init>(JPEGImageDecoder.java:95)
> >         at
> > com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedI
> > mage(JPEGImage
> > Decoder.java:49)
> >         at
> > com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:67)
> >         at com.sun.media.jai.opimage.JPEGRIF.create(JPEGRIF.java:52)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:128)
> >         at
> > javax.media.jai.OperationRegistry.invokeFactory(OperationRegis
> > try.java:1651)
> >         at
> > javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(Thre
> > adSafeOperatio
> > nRegistry.java:479)
> >         at
> > javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:338)
> >         at
> > com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:103)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:128)
> >         at
> > javax.media.jai.OperationRegistry.invokeFactory(OperationRegis
> > try.java:1651)
> >         at
> > javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(Thre
> > adSafeOperatio
> > nRegistry.java:479)
> >         at
> > javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:338)
> >         at
> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:779)
> >         at
> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:825)
> >         at
> > javax.media.jai.RenderedOp.getSampleModel(RenderedOp.java:2052)
> >         at
> > com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageE
> > ncoder.java:13
> > 7)
> >
> > >>>>>>>> Unable to process image stream<<<<<<<<
> > java.lang.reflect.InvocationTargetException:
> > java.lang.RuntimeException:
> > Unable to process image stream, incorrect format.
> >         at
> > com.sun.media.jai.codecimpl.JPEGImage.<init>(JPEGImageDecoder.java:69)
> >         at
> > com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedI
> > mage(JPEGImage
> > Decoder.java:49)
> >         at
> > com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage
> > (ImageDecoderI
> > mpl.java:148)
> >         at
> > com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:118)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:128)
> >         at
> > javax.media.jai.OperationRegistry.invokeFactory(OperationRegis
> > try.java:1651)
> >         at
> > javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(Thre
> > adSafeOperatio
> > nRegistry.java:479)
> >         at
> > javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:338)
> >         at
> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:779)
> >         at
> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:825)
> >         at
> > javax.media.jai.RenderedOp.getSampleModel(RenderedOp.java:2052)
> >         at
> > com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageE
> > ncoder.java:13
> > 7)
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 31, 2001 9:19 AM
> > > To: Joe Latone; [EMAIL PROTECTED]
> > > Subject: RE: [JAVA2D] X server dependency and consequences
> > of using a
> > > remo te X server
> > >
> > > I'm not absolutely sure if you'd suffer a performance
> > penalty by using a
> > > remote X-server, but would think that would be the case...
> > After all,
> > > the
> > > whole reason you need a frame buffer at all is that some of
> > the graphics
> > > calls use native libraries to do the work.
> > >
> > > What you can do is use a program called XVFB to create a
> > "Virtual Frame
> > > Buffer".  The best article I've seen about it (along with links for
> > > obtaining XVFB) is at:
> > >
> > >
> > http://www.sunworld.com/sunworldonline/swol-03->
> 2000/swol-03-xvfb.html
> > >
> > > I've used a server side Java app that did some image manipulation
> > > (though
> > > not with JAI or Java2D) and it worked well for me.  It's also nice
> > > because
> > > you can completely control the characteristics of the frame
> > buffer you
> > > set
> > > up - 32 bit color, screen resolution, etc.
> > >
> > > ---> Kendall Gelner ([EMAIL PROTECTED])
> > >
> >
> > ==============================================================
> > =============
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body
> > of the message "signoff JAVA2D-INTEREST".  For general help,
> > send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
> >

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to