You may well be able to find out what is needed using mvn dependency:tree
which will give you a list of jars pulled in by the module that you are in,
so main gives:


[INFO] org.geotools:gt-main:jar:11-SNAPSHOT
[INFO] +- org.geotools:gt-api:jar:11-SNAPSHOT:compile
[INFO] |  \- org.geotools:gt-referencing:jar:11-SNAPSHOT:compile
[INFO] |     +- java3d:vecmath:jar:1.3.2:compile
[INFO] |     +- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] |     +- org.geotools:gt-metadata:jar:11-SNAPSHOT:compile
[INFO] |     |  \- org.geotools:gt-opengis:jar:11-SNAPSHOT:compile
[INFO] |     |     \- net.java.dev.jsr-275:jsr-275:jar:1.0-beta-2:compile
[INFO] |     \- jgridshift:jgridshift:jar:1.0:compile
[INFO] +- org.geotools:gt-sample-data:jar:11-SNAPSHOT:test
[INFO] +- com.vividsolutions:jts:jar:1.13:compile
[INFO] +- jdom:jdom:jar:1.0:compile
[INFO] +- junit:junit:jar:4.4:provided
[INFO] +- org.easymock:easymock:jar:2.3:test
[INFO] +- org.geotools:gt-epsg-hsql:jar:11-SNAPSHOT:test
[INFO] |  \- hsqldb:hsqldb:jar:1.8.0.7:test
[INFO] +- xmlunit:xmlunit:jar:1.3:test
[INFO] \- javax.media:jai_core:jar:1.1.3:compile

Ian


On 17 September 2013 08:52, Oehler, Philipp <
[email protected]> wrote:

>  Hi there,****
>
> ** **
>
> at the moment I am using Geotools in a project where we can’t use Maven,
> because we use a different building system yet. So I’m using the jars to
> make it work.****
>
> Unfortunately, this seems to cause some trouble.****
>
> First, I added ALL the jars to my project, as suggested in the Eclipse
> Quickstart tut.. but this causes the ImageIO to crash, when I want to
> render a map and write it to a file. At the moment, I’m trying the other
> way; removing all jars, and adding only the ones which seem to be necessary
> (until all the packages can be found).****
>
> ** **
>
> But now, my program crashes at this point****
>
>         FileDataStore store;****
>
>              *try* {****
>
>                     store = FileDataStoreFinder.*getDataStore*(file);****
>
>                     *featureSource* = store.getFeatureSource();****
>
>              } *catch* (Exception e) {****
>
>              System.*out*.println("Error fetching data from shape file.
> Exit");****
>
>                     e.printStackTrace();****
>
>              }****
>
> ** **
>
> with a NullPointerException, because getDataStore(File) returns null. I
> used debug mode, and stepped into it, and found out that in
> CommonFactoryFinder.getFileDataStoreFactories(Hints) causes this, on the
> return line****
>
>     *public* *static* *synchronized* Set<FileDataStoreFactorySpi>
> getFileDataStoreFactories(Hints hints) {****
>
>         hints = mergeSystemHints(hints);****
>
>         *return* 
> *new*LazySet<FileDataStoreFactorySpi>(getServiceRegistry().getServiceProviders(
> ****
>
>                 FileDataStoreFactorySpi.*class*, *null*, hints));****
>
>     }****
>
> ** **
>
> This is strange, as both the jars containing the LazySet and the
> FileDataStoreFactorySpi are linked (gt-metadata-9.4.jar), but one of them
> seems to be missing (or another one is disturbing?!).****
>
> ** **
>
> Does anyone know how I could solve this? Are there any jars which could be
> missing, or which are unnecessary?****
>
> (At the moment, I’m using the following jars:****
>
> gt-api-9.4.jar****
>
> gt-coverage-9.4.jar****
>
> gt-main-9.4.jar****
>
> gt-metadata-9.4.jar****
>
> gt-opengis-9.4.jar****
>
> gt-referencing-9.4.jar****
>
> gt-render-9.4.jar****
>
> gt-swing-9.4.jar****
>
> jts-1.13.jar****
>
> )****
>
>
> Furthermore, is there a better way to deal with problems like this than
> manually adding jar which *seem* to contain the right content? This is a
> very annoying and exhausting way…****
>
> ** **
>
> Thanks in advance!
> Philipp****
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>


-- 
Ian Turton
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to