Hi Joel, I just did the following...
- updated my own mac to Java 1.6.0_26 - cleaned out the GeoTools jars from my local repository - created a new project using the pom and code from the tutorial, specifying GeoTools 8-SNAPSHOT - built the project and ran it from the command line - repeated the build and running from within NetBeans (I don't use Eclipse) The build was successful and the application ran without error. So, at the moment I'm at a loss to suggest why it's not working for you. Sorry I can't be more helpful. If you do get it to work please post the solution to the list. Michael On 9 August 2011 10:21, joel rodriguez <[email protected]> wrote: > Hi Michael, > > Thanks for the reply, I kind of had given up on the Quickstart app example, > but your email made sense so I went back to my mac and installed java 6, I > also pointed eclipse preferences to use the 1.6 jre then started the example > from scratch but got the same error as before the class mismatch. > > This is from my terminal now: > > leopard:~ joelrodriguez$ java -version > java version "1.6.0_26" > Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-9M3425) > Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode) > leopard:~ joelrodriguez$ javac -version > javac 1.6.0_26 > leopard:~ joelrodriguez$ > > > So just for sanities sake, with java 6 on my mac and eclipse pointing to > java 6 jre in the preferences I should not be getting a class mismatch error > correct? > > Thank you, > > Joel > > On Sun, Aug 7, 2011 at 9:42 PM, Michael Bedward <[email protected]> > wrote: >> >> 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 >> > >> > > > ------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
