Thanks for reply. Now I can run the sample. I added the following
dependency:

       <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-main</artifactId>
            <version>${geotools.version}</version>
        </dependency>

Otherwise, I continue recieve others no class def found.

On 30 May 2011 09:42, Jody Garnett <[email protected]> wrote:

> Seems nobody has gotten back to you; can you do me a favour and run the
> following maven command:
>
> mvn dependency:tree
>
>
> It should produce a dependency tree so we can see what jars it actually
> brought in for you to work with. The no class def found messages does not
> make too much sense to me (only thing I could think of is if you are some
> how accidentally mixing and matching geotools versions?).
>
> --
> Jody Garnett
>
> On Sunday, 29 May 2011 at 12:45 AM, Odilon Lima wrote:
>
> Hi all,
>
> I am new to the list and using GeoTools. I am trying to run image sample (
> ImageLab.java) and the following error occurred:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/geotools/styling/TextSymbolizer$PolygonAlignOptions
>     at
> org.geotools.renderer.lite.StreamingRenderer.<init>(StreamingRenderer.java:251)
>     at org.geotools.swing.JMapFrame.<init>(JMapFrame.java:151)
>     at ImageLab.displayLayers(ImageLab.java:108)
>     at ImageLab.getLayersAndDisplay(ImageLab.java:74)
>     at ImageLab.main(ImageLab.java:50)
> Caused by: java.lang.ClassNotFoundException:
> org.geotools.styling.TextSymbolizer$PolygonAlignOptions
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>     ... 5 more
>
> The Maven configuration is as described on the site (I am using version
> 2.7.1). Does anyone know whether you need to configure anything beyond
> what is described?
>
> Thanks in advance.
>
> --
> Odilon Lima
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>


-- 
Odilon Lima
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to