From: Lena P. <Len...@we...> - 2005-08-29 07:45:39
|
Hello again! Thank you for your help! I included the wms plugin now and the datastore w= orks until I try to use the FeatureReader. Which library is missing now=3F A= nd how can I find out which one is missing later on=3F Thanks for your support! Cheers, Lena Here's the snippet and the error message: String urlString =3D "http://localhost:8080/geoserver/wfs/GetCap= abilities"; URL u =3D new URL(urlString); =20 Map map =3D new HashMap(); map.put(WFSDataStoreFactory.URL.key,u); =20 map.put(WFSDataStoreFactory.TIMEOUT.key,new Integer(10000)); map.put(WFSDataStoreFactory.PROTOCOL,Boolean.FALSE); =20 WFSDataStoreFactory factory =3D new WFSDataStoreFactory(); WFSDataStore store =3D (WFSDataStore)factory.createNewDataStore(= map); =20 String[] typeNames =3D store.getTypeNames(); Query query =3D new DefaultQuery(typeNames[2); FeatureReader reader =3D store.getFeatureReader(query,Transactio= n.AUTO=5FCOMMIT); =20 int j =3D 0; while(reader.hasNext()){ Feature ft =3D reader.next(); =20 System.out.println("Feature "+j+" : "+ft); =20 j++; } reader.close(); System.out.println((j)+" Features gefunden"); =20 java.lang.NoClassDefFoundError: javax/vecmath/SingularMatrixException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at sun.misc.Service$LazyIterator.next(Unknown Source) at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.ja= va:420) at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegist= ry.java:114) at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistr= y.java:221) at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistr= y.java:193) at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.= java:90) at org.geotools.referencing.FactoryFinder.getCoordinateOperationFactory(F= actoryFinder.java:365) at org.geotools.referencing.CRS.<clinit>(CRS.java:273) at org.geotools.data.wfs.WFSDataStore.getSchema(WFSDataStore.java:320) at org.geotools.data.wfs.WFSDataStore.splitFilters(WFSDataStore.java:853)= at org.geotools.data.wfs.WFSDataStore.getFeatureReader(WFSDataStore.java:= 706) at SAXParserTest10.main(SAXParserTest10.java:97) David Zwiers <dav...@gm...> schrieb am 26.08.05 17:52:51: The WFS datastore has some class dependencies on the WMS plugin. Please ensure they are both on your ClassPath. David On 8/26/05, Nicolas Ribot <nic...@gm...> wrote: > Hi, >=20 > Looks like there is a missing jar, the one defining the > org/geotools/data/ows/Service class >=20 > Check your classpath to ensure you put all necessary jars in it. >=20 > Nicolas >=20 > On 8/26/05, Lena Pahl <Len...@we...> wrote: > > > > Hello everybody! > > I'm having problems to deal with a WFSDataStore. If I try this: > > > > //SAXParserTest10: > > String urlString =3D "http://localhost:8080/geoserver/wfs/Ge= tCapabilities"; > > URL u =3D new URL(urlString); > > > > Map map =3D new HashMap(); > > map.put(WFSDataStoreFactory.URL.key,u); > > map.put(WFSDataStoreFactory.TIMEOUT.key,new Integer(10000)= ); > > map.put(WFSDataStoreFactory.PROTOCOL,Boolean.FALSE); > > > > WFSDataStoreFactory factory =3D new WFSDataStoreFactory(); > > WFSDataStore store =3D (WFSDataStore)factory.createNewDataSt= ore(map); //Line 87 > > > > String[] typeNames =3D store.getTypeNames(); > > System.out.println(typeNames.toString()); > > > > I get the following error message: > > > > java.lang.NoClassDefFoundError: org/geotools/data/ows/Service > > at org.geotools.xml.wfs.WFSCapabilitiesComplexTypes$ServiceTyp= e.getValue(WFSCapabilitiesComplexTypes.java:1977) > > at org.geotools.xml.handlers.ComplexElementHandler.endElement(= ComplexElementHandler.java:184) > > at org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.jav= a:222) > > at org.apache.crimson.parser.Parser2.maybeElement(Unknown Sour= ce) > > at org.apache.crimson.parser.Parser2.content(Unknown Source) > > at org.apache.crimson.parser.Parser2.maybeElement(Unknown Sour= ce) > > at org.apache.crimson.parser.Parser2.parseInternal(Unknown Sou= rce) > > at org.apache.crimson.parser.Parser2.parse(Unknown Source) > > at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Sourc= e) > > at javax.xml.parsers.SAXParser.parse(Unknown Source) > > at javax.xml.parsers.SAXParser.parse(Unknown Source) > > at org.geotools.xml.DocumentFactory.getInstance(DocumentFactor= y.java:139) > > at org.geotools.data.wfs.WFSDataStore.findCapabilities(WFSData= Store.java:170) > > at org.geotools.data.wfs.WFSDataStore.<init>(WFSDataStore.java= :153) > > at org.geotools.data.wfs.WFSDataStoreFactory.createNewDataStor= e(WFSDataStoreFactory.java:170) > > at SAXParserTest10.main(SAXParserTest10.java:87) > > > > There is a capabilities document when I go directly to: "http://localh= ost:8080/geoserver/wfs/GetCapabilities". So what am I going wrong here=3F > > Thank you for your help! > > Lena > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F > > Mit der Gruppen-SMS von WEB.DE FreeMail k=F6nnen Sie eine SMS an alle > > Freunde gleichzeitig schicken: http://freemail.web.de/features/=3Fmc=3D021= 179 > > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Prac= tices > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing = & QA > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce= 5sf > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > > Geotools-gt2-users mailing list > > Geo...@li... > > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practi= ces > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & = QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5s= f > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practice= s Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA= Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Geotools-gt2-users mailing list Geo...@li... https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Mit der Gruppen-SMS von WEB.DE FreeMail k=F6nnen Sie eine SMS an alle=20 Freunde gleichzeitig schicken: http://freemail.web.de/features/=3Fmc=3D021179 |
From: Nicolas R. <nic...@gm...> - 2005-08-29 08:17:17
|
Hello Lena, This time, the missing jar seems to be vecmath-1.3.jar. To be sure not to miss any library, you should include gt2-main.jar (I'm sure it's already done :-) and all jars contained in the "shared" folder, that are needed for gt2-main. Then, for each plugin you use, include the plugin's jar and all its dependencies, that you will find in the "lib" subfolder of the plugin folder. For instance, if you use the postgis datastore, you should include gt2-postgis.jar and lib\postgis-driver-1.0.jar lib\postgresql-3.0.jar lib\wkb4j-1.0-RC1-modified.jar. Also be sure to include extension's jar if you use any of them (projection, graph....) (I'm talking about geotools 2.0.0, for other releases, paths may be slightly different) Another solution is to include ALL jars you will find in the geotools folde= rs ! Nicolas >=20 > Hello again! > Thank you for your help! I included the wms plugin now and the datastore = works until I try to use the FeatureReader. Which library is missing now? A= nd how can I find out which one is missing later on? > Thanks for your support! > Cheers, > Lena > Here's the snippet and the error message: |