make sure you have the latest version of the code:
http://kenai.com/projects/beginningee6/sources/src/show/book
these are for the second edition of the book (came out a week or two ago) but should be essentially a clean up of the original one.
The first version was written and tested against GlassFish v3 while the second should work for GlassFish 3.0.1 (not 2.x)
Note that each chapter references a parent which has the versions you ask for :
http://kenai.com/projects/beginningee6/sources/src/content/book/tags/2.0.0/pom.xml
-Alexis
On 23 août 2010, at 16:55, glassfish_at_javadesktop.org wrote:
> Hello,
>
> I am fairly new to JEE so I'm currently working my way around Glassfish, Maven, etc. Specifically I'm going through the book 'Beginning Java EE 6 With Glassfish 3'. Of course the provided examples don't compile and don't run straight out of the box, most likely because the versions of the written about software have moved on. So I'm trying to generally understand what constraints the JEE versions and the included JEE jars impose on my apps.
>
> I saw that Glassfish already ships a number of JEE jars such as javax.persistence or eclipselink. I tried to discover their versions from the jar itself but none of the attributes looked like a 2.0 or similar version number. My first question is therefore, where can I find out about the versions of the included jars?
>
> When it comes to compiling my JEE app with Maven, I'm wondering, which version I need to specify for javax.persistence, eclipselink, etc. After adding yet another mirror and updating versions, I was able to get the book's Maven scripts to compile. However, running the sample application fails with a ClassNotFound exception for a javax.persistence class.
>
> I have a feeling that I should compile the app against exactly the same version of jars as dependencies that are included in Glassfish. Can someone confirm or dispute that theory (rather than guessing I would really like to know for sure)? This would mean, that I either have to specify exactly the same JEE versions in the Maven scripts so it can download them, or point Maven to the physical files shipped with Glassfish.
>
> Or should it not matter that I compiled against 2.1.0 but Glassfish let's say contains 2.0.1?
>
> I googled for quite a while but I couldn't find any article or documentation that would specifically answer my questions. I would really appreciate it, if someone could tell me if I'm on the right track. It would also be great if someone had a link to more material on this.
>
> Thanks a lot, Christoph
> [Message sent by forum member 'cwienands']
>
> http://forums.java.net/jive/thread.jspa?messageID=480815
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>