From: Cédric B. <ced...@ge...> - 2008-07-07 08:02:06
|
Hi Oliver, Oliver Newell a écrit : > Hi - > > I notice I'm getting an error from Maven now (just started happening a > few days ago) when it tries to grab the latest snapshot of the > gt2-referencing module. The dependency in my pom.xml is: > > <dependency> > <groupId>org.geotools</groupId> > <artifactId>gt2-referencing</artifactId> > <version>2.5-SNAPSHOT</version> > <scope>compile</scope> > </dependency> > > In fact, this dependency is incorrect. The artifactId moved one or two months ago, with the gt2- prefix removal. The correct dependency you should have is <artifactId>gt-referencing</artifactId> You have to fix this dependency on your project. gt2-referencing can still be on repositories, but it is a version old of at least 2 months. That's why if you try to use it, you will probably get some errors like your NoSuchMethodError. So if you work on trunk try to update your Geotools project and build it again with the command "mvn clean install -U". It should take the latest version of GeoAPI. By the way, javax/units/Unit is no more used, it is a JSR108 classes, and we have moved to JSR275, so if your project depends on JSR108, you should update the dependency to JSR275, like this : <dependency> <groupId>net.java.dev.jsr-275</groupId> <artifactId>jsr-275</artifactId> <version>1.0-beta-2</version> </dependency> Cheers, Cédric > The error is related to the transitive dependency > 'org.opengis:geoapi:2.2-SNAPSHOT ('Error Transferring File'). I do > notice that in the maven repository, > attempting to manually access the following: > > > http://maven.geotools.fr/repository/org/opengis/geoapi/2.2-SNAPSHOT/maven-metadata.xml > > results in a FORBIDDEN status return. I'm not that savvy about Maven > snapshots to know if this is an issue (I sort of suspect not), but I do > notice that the equivalent file > under the org/geotools/gt2-referencing/2.5-SNAPSHOT directory, i.e.: > > http://maven.geotools.fr/repository/org/geotools/gt2-referencing/2.5-SNAPSHOT/maven-metadata.xml > > can be accessed with no problem. (even if this is not the issue, it > might be good to have things consistent among the various directories to > avoid misguided guesses like this one! :) ) > > I did manage to manually download the latest JAR file for > http://maven.geotools.fr/repository/org/opengis/geoapi/2.2-SNAPSHOT. It > didn't work for some reason though - I get the following error message > when I try and run a projection-related bit of code. It looks like the > getUnit() method may have been removed (or modified) in the > ParameterDescriptor class? > > > Jul 5, 2008 4:06:40 PM org.geotools.factory.FactoryRegistry scanForPlugins > > Exception in thread "main" java.lang.NoSuchMethodError: > org.opengis.parameter.ParameterDescriptor.getUnit()Ljavax/units/Unit; > at > org.geotools.parameter.DefaultParameterDescriptor.<init>(DefaultParameterDescriptor.java:116) > at > org.geotools.referencing.operation.projection.ModifiedParameterDescriptor.<init>(ModifiedParameterDescriptor.java:66) > at > org.geotools.referencing.operation.projection.NewZealandMapGrid$Provider.<clinit>(NewZealandMapGrid.java:255) > 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 > org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:822) > at > org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:766) > at > org.geotools.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:801) > at > org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:193) > at > org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:280) > at > org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:314) > at > edu.mit.ll.wcs.service.impl.MapProjection.getDefaultParameters(MapProjection.java:84) > at > edu.mit.ll.wcs.service.impl.LamAzEqAreaProjection.<init>(LamAzEqAreaProjection.java:84) > at edu.mit.ll.wcs.tools.ConvertPt.main(ConvertPt.java:77) > caracas:../nextgen/wcs>ALSA lib pcm_hw.c:549:(snd_pcm_hw_start) > SNDRV_PCM_IOCTL_START failed: File descriptor in bad state > > > Something's not quite right - could be 'operator error' of course....Any > suggestions appreciated! > > (Also, if I should be reporting issues like this via another mechanism, > please advise....) > > > -Oliver > > > > > > > > > > > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > |