Cpt 2 Running Main
From C:\JavaEE6\Chapter02 I ran
mvn exec:java -Dexec.mainClass="com.apress.javaee6.chapter02.Main"
It made a new derby database for me:
C:\JavaEE6\Chapter02>mvn exec:java -Dexec.mainClass="com.apress.javaee6.chapter0
2.Main"
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] artifact org.codehaus.mojo:exec-maven-plugin: checking for updates from m
aven2-repository.dev.java.net
[INFO] artifact org.codehaus.mojo:exec-maven-plugin: checking for updates from c
entral
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/exec-maven-plugin/1
.1.1/exec-maven-plugin-1.1.1.pom
4K downloaded
Downloading: http://download.java.net/maven/2/org/codehaus/mojo/exec-maven-plugi
n/1.1.1/exec-maven-plugin-1.1.1.jar
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/exec-maven-plugin/1
.1.1/exec-maven-plugin-1.1.1.jar
33K downloaded
[INFO] ------------------------------------------------------------------------
[INFO] Building Chapter 02 - JPA
[INFO] task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
[WARNING] POM for 'org.apache.derby:derbyclient:pom:10.5.1.1:compile' is invalid
. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for proj
ect org.apache.derby:derbyclient at C:\Documents and Settings\Walt\.m2\repositor
y\org\apache\derby\derbyclient\10.5.1.1\derbyclient-10.5.1.1.pom
[WARNING] POM for 'org.apache.derby:derbyclient:pom:10.5.1.1:compile' is invalid
. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for proj
ect org.apache.derby:derbyclient at C:\Documents and Settings\Walt\.m2\repositor
y\org\apache\derby\derbyclient\10.5.1.1\derbyclient-10.5.1.1.pom
[WARNING] POM for 'org.apache.derby:derby:pom:10.5.1.1:test' is invalid. It will
be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.a
pache.derby:derby at C:\Documents and Settings\Walt\.m2\repository\org\apache\de
rby\derby\10.5.1.1\derby-10.5.1.1.pom
[WARNING] POM for 'org.apache.derby:derby:pom:10.5.1.1:test' is invalid. It will
be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.a
pache.derby:derby at C:\Documents and Settings\Walt\.m2\repository\org\apache\de
rby\derby\10.5.1.1\derby-10.5.1.1.pom
Downloading: http://download.java.net/maven/1/org.apache.derby/jars/derby-10.5.1
.1.jar
Downloading: http://download.java.net/maven/2/org/apache/derby/derby/10.5.1.1/de
rby-10.5.1.1.jar
Downloading: http://download.java.net/maven/glassfish/org/apache/derby/derby/10.
5.1.1/derby-10.5.1.1.jar
Downloading: http://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo
//org/apache/derby/derby/10.5.1.1/derby-10.5.1.1.jar
Downloading: http://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo
//org/apache/derby/derby/10.5.1.1/derby-10.5.1.1.jar
Downloading: http://people.apache.org/repo/m1-ibiblio-rsync-repository/org.apach
e.derby/jars/derby-10.5.1.1.jar
2454K downloaded
Downloading: http://download.java.net/maven/1/junit/jars/junit-4.6.jar
Downloading: http://download.java.net/maven/2/junit/junit/4.6/junit-4.6.jar
Downloading: http://download.java.net/maven/glassfish/junit/junit/4.6/junit-4.6.
jar
Downloading: http://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo
//junit/junit/4.6/junit-4.6.jar
Downloading: http://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo
//junit/junit/4.6/junit-4.6.jar
Downloading: http://people.apache.org/repo/m1-ibiblio-rsync-repository/junit/jar
s/junit-4.6.jar
Downloading: http://repo1.maven.org/maven2/junit/junit/4.6/junit-4.6.jar
213K downloaded
Downloading: http://download.java.net/maven/2/org/apache/maven/maven-toolchain/1
.0/maven-toolchain-1.0.pom
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-toolchain/1.0/
maven-toolchain-1.0.pom
3K downloaded
Downloading: http://download.java.net/maven/2/junit/junit/3.8.2/junit-3.8.2.pom
Downloading: http://download.java.net/maven/1/junit/poms/junit-3.8.2.pom
Downloading: http://download.java.net/maven/2/junit/junit/3.8.2/junit-3.8.2.pom
Downloading: http://download.java.net/maven/glassfish/junit/junit/3.8.2/junit-3.
8.2.pom
Downloading: http://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo
//junit/junit/3.8.2/junit-3.8.2.pom
Downloading: http://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo
//junit/junit/3.8.2/junit-3.8.2.pom
Downloading: http://people.apache.org/repo/m1-ibiblio-rsync-repository/junit/pom
s/junit-3.8.2.pom
Downloading: http://repo1.maven.org/maven2/junit/junit/3.8.2/junit-3.8.2.pom
747b downloaded
[WARNING] POM for 'commons-cli:commons-cli:pom:1.0:runtime' is invalid. It will
be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project common
s-cli:commons-cli at C:\Documents and Settings\Walt\.m2\repository\commons-cli\c
ommons-cli\1.0\commons-cli-1.0.pom
[WARNING] POM for 'commons-cli:commons-cli:pom:1.0:runtime' is invalid. It will
be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project common
s-cli:commons-cli at C:\Documents and Settings\Walt\.m2\repository\commons-cli\c
ommons-cli\1.0\commons-cli-1.0.pom
[WARNING] POM for 'commons-cli:commons-cli:pom:1.0:runtime' is invalid. It will
be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project common
s-cli:commons-cli at C:\Documents and Settings\Walt\.m2\repository\commons-cli\c
ommons-cli\1.0\commons-cli-1.0.pom
[WARNING] POM for 'commons-cli:commons-cli:pom:1.0:runtime' is invalid. It will
be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project common
s-cli:commons-cli at C:\Documents and Settings\Walt\.m2\repository\commons-cli\c
ommons-cli\1.0\commons-cli-1.0.pom
Downloading: http://download.java.net/maven/2/org/codehaus/plexus/plexus-contain
er-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.pom
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-
default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.pom
1K downloaded
[INFO] [exec:java]
[EL Info]: 2009-09-26 12:40:41.609--ServerSession(30836417)--EclipseLink, versio
n: Eclipse Persistence Services - 2.0.0.v20090713-r4647
[EL Info]: 2009-09-26 12:40:44.375--ServerSession(30836417)--file:/C:/JavaEE6/Ch
apter02/target/classes/-chapter02PU login successful
[EL Warning]: 2009-09-26 12:40:44.937--ServerSession(30836417)--Exception [Eclip
seLink-4002] (Eclipse Persistence Services - 2.0.0.v20090713-r4647): org.eclipse
.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be per
formed on 'BOOK' because it does not exist.
Error Code: -1
Call: DROP TABLE BOOK
Query: DataModifyQuery(sql="DROP TABLE BOOK")
[EL Info]: 2009-09-26 12:40:45.359--ServerSession(30836417)--file:/C:/JavaEE6/Ch
apter02/target/classes/-chapter02PU logout successful
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Sat Sep 26 12:40:45 PDT 2009
[INFO] Final Memory: 15M/28M
[INFO] ------------------------------------------------------------------------
C:\JavaEE6\Chapter02>





