johann Sorel wrote:
> Hello,
> 
> I have a very blocking problem with Geotools.
> 
> 
> I'm building a 3D view, and each time i try to add an Image, i have an error :
> 
>         Exception in thread "AWT-EventQueue-0" 
> java.lang.NoClassDefFoundError: javax/media/jai/ComponentSampleModelJAI
>         at 
> org.geotools.image.io.TextImageReader$Spi.<clinit>(TextImageReader.java:370)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at sun.misc.Service$LazyIterator.next(Service.java:271)
>         at 
> javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:190)
>         at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:121)
>         at 
> javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:142)
>         at javax.imageio.ImageIO.<clinit>(ImageIO.java:48)
>         at 
> altersig.root.view.j3dview.Alterj3dPanel.createSceneGraph(Alterj3dPanel.java:131)

WHat version of jai are you using? Also geotools requires both jai core
and jai image i/o. I believe the recommended versions are 1.1.3, and 1.1
respectively.
> 
> I was using JavaMonkeyEngine first, crashes on loading, i think it was the 
> 3Dengine the problem so i changed
> Then tryied Java3D, works ONLY if i don't load an Image :
> 
>             BufferedImage image;
>             URL url = 
> Alterj3dPanel.class.getResource("/data/moteurj3d/fond1.jpg");            
>             image = ImageIO.read(url);
>             ImageComponent2D image2d = new 
> ImageComponent2D(ImageComponent2D.FORMAT_RGB, image);
>             background.setImage(image2d);
>  
> Geotools generate a conflict with this line : 
>             image = ImageIO.read(url);
> 
> I tried to remove Geotools libraries, and it works.
> 
> when reading the error i see :
>        at 
> org.geotools.image.io.TextImageReader$Spi.<clinit>(TextImageReader.java:370)
> What is doing a Geotools class here????? i have no geotools imports in my 
> class, neither the ImageIO class
> 
Geotools contains a number of jai plugins. So if you are using jai and
any geotools libraries are on the classpath they will get picked up. I
suspect some geotools jars are sneaking into your classpath some how.
> everything works perfectly without the geotools jars.........
> 
> have an idea?
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Geotools-gt2-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


-- 
Justin Deoliveira
The Open Planning Project
[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-gt2-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to