Actually the problem is much simpler (and I am stupid not to have realized earlier).
Unless you are building the GeoTools library from source on your local machine, the GeoTools version 8 jars that Maven is downloading for you are produced by the build server which recently switched from Java 5 to Java 6. But you are then compiling the Quickstart app with Java 5. That's the mismatch. Michael On 7 August 2011 02:18, joel rodriguez <[email protected]> wrote: > Hi Michael, > > Thanks for the advise. I ran it from the command line and got this error: > > Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile > (default-compile) on project tutorial: Compilation failure > [ERROR] > /Users/joelrodriguez/Documents/workspace/tutorial/src/main/java/org/geotools/tutorial/Quickstart.java:[5,-1] > cannot access org.geotools.data.FileDataStore > [ERROR] bad class file: > /Users/joelrodriguez/.m2/repository/org/geotools/gt-api/8-SNAPSHOT/gt-api-8-SNAPSHOT.jar(org/geotools/data/FileDataStore.class) > [ERROR] class file has wrong version 50.0, should be 49.0 > > > I believe my issue is here, I am going to search in google and see if I can > install the version 49 of the Filedatastore class. I am just not sure how to > do that if you have any guidance I would greatly appreciate it. > > Thanks, > > Joel > > On Sat, Aug 6, 2011 at 4:01 AM, Michael Bedward <[email protected]> > wrote: >> >> > I also read that you can tell Eclipse which JDK to use and in the >> > preferences I see under Java >> > and installed JREs that I have a check on Java JVM 1.5.0 (mac os x >> > default). >> > >> > This versions should be compatible right? >> >> Apple make this harder than it should be by having non-intuitive and >> frequently changed conventions about where Java is installed and where >> Java updates go. I'm not sure about Leopard, but with Snow Leopard if >> you want a JDK with javadocs included you now have to download it >> separately from the Apple developer site and when installed it goes >> somewhere completely different to the JDK that is bundled with the OS. >> >> My guess is that you do indeed have a mix up of versions, even if it >> isn't obvious. If possible, can you try building and running the >> Quickstart app from the command line rather than your IDE. From >> within the top source dir... >> >> mvn clean install >> mvn exec:java -Dexec.mainClass=org.geotools.tutorial.quickstart.Quickstart >> >> I *think* maven will use the same Java to build and run the app. If >> that works, it suggests you need to check your IDE setup again. >> >> Michael > > ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
