Skip to content

Commit 1f9e63a

Browse files
committed
+ Added necessary JPA dependencies to make Petclinic JUnit tests pass
+ Removed unused imports for @RequestParam Note: While unit tests pass in eclipse, NoClassDefFound errors are still being thrown when tests are run from the command line.
1 parent 96ba0d8 commit 1f9e63a

File tree

7 files changed

+23
-17
lines changed

7 files changed

+23
-17
lines changed

org.springframework.samples.petclinic/.classpath

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
88
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
99
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.test"/>
10-
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-4.4.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar"/>
10+
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-4.4.0.jar"
11+
sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar"/>
1112
<classpathentry kind="output" path="target/classes"/>
1213
</classpath>

org.springframework.samples.petclinic/ivy.xml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,33 @@
1919
</publications>
2020

2121
<dependencies>
22-
<dependency org="com.oracle.toplink.essentials" name="com.springsource.oracle.toplink.essentials" rev="2.0.0.b41-beta2" conf="compile->compile"/>
23-
<dependency org="javax.persistence" name="com.springsource.javax.persistence" rev="1.0.0" conf="compile->compile"/>
2422
<dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.4.0" conf="provided->runtime"/>
25-
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="compile->runtime"/>
23+
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.1.2" conf="compile->runtime"/>
2624
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
27-
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.dbcp" rev="1.2.2.osgi" conf="compile->runtime"/>
28-
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="compile->runtime"/>
29-
<dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="1.1.2" conf="compile->runtime"/>
25+
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.dbcp" rev="1.2.2.osgi" conf="compile->runtime"/>
26+
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="compile->runtime"/>
27+
<dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="1.1.2" conf="compile->runtime"/>
3028
<dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="1.5.4" conf="compile->compile"/>
31-
<dependency org="org.hibernate" name="com.springsource.org.hibernate" rev="3.2.6.ga" conf="compile->compile"/>
32-
<dependency org="org.hsqldb" name="com.springsource.org.hsqldb" rev="1.8.0.9" conf="compile->runtime"/>
33-
<dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm" rev="2.2.3" conf="compile->compile" />
34-
<dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm.commons" rev="2.2.3" conf="compile->compile" />
29+
<dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm" rev="2.2.3" conf="compile->compile" />
30+
<dependency org="org.objectweb.asm" name="com.springsource.org.objectweb.asm.commons" rev="2.2.3" conf="compile->compile" />
3531
<dependency org="org.springframework" name="org.springframework.orm" rev="latest.integration" conf="compile->compile"/>
3632
<dependency org="org.springframework" name="org.springframework.web.servlet" rev="latest.integration" conf="compile->compile"/>
33+
<dependency org="org.hsqldb" name="com.springsource.org.hsqldb" rev="1.8.0.9" conf="compile->runtime"/>
34+
<dependency org="javax.persistence" name="com.springsource.javax.persistence" rev="1.0.0" conf="compile->compile"/>
35+
<dependency org="org.hibernate" name="com.springsource.org.hibernate" rev="3.2.6.ga" conf="compile->compile"/>
36+
<dependency org="org.hibernate" name="com.springsource.org.hibernate.ejb" rev="3.3.1.ga" conf="compile->compile"/>
37+
<dependency org="org.jboss.util" name="com.springsource.org.jboss.util" rev="2.0.4.GA" conf="compile->compile"/>
38+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa" rev="1.0.2" conf="compile->compile"/>
39+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.java5" rev="1.0.2" conf="compile->compile"/>
40+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.lib" rev="1.0.2" conf="compile->compile"/>
41+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.lib.java5" rev="1.0.2" conf="compile->compile"/>
42+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.persistence" rev="1.0.2" conf="compile->compile"/>
43+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.persistence.jdbc" rev="1.0.2" conf="compile->compile"/>
44+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.jdbc" rev="1.0.2" conf="compile->compile"/>
45+
<dependency org="org.apache.openjpa" name="com.springsource.org.apache.openjpa.jdbc.java5" rev="1.0.2" conf="compile->compile"/>
46+
<dependency org="com.oracle.toplink.essentials" name="com.springsource.oracle.toplink.essentials" rev="2.0.0.b41-beta2" conf="compile->compile"/>
3747
<!-- test dependencies -->
38-
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.4.0" conf="test->runtime" />
48+
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.4.0" conf="test->compile" />
3949
<dependency org="org.springframework" name="org.springframework.test" rev="latest.integration" conf="test->compile"/>
4050

4151
</dependencies>

org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/AddPetForm.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import org.springframework.web.bind.annotation.ModelAttribute;
1515
import org.springframework.web.bind.annotation.RequestMapping;
1616
import org.springframework.web.bind.annotation.RequestMethod;
17-
import org.springframework.web.bind.annotation.RequestParam;
1817
import org.springframework.web.bind.annotation.SessionAttributes;
1918
import org.springframework.web.bind.annotation.InitBinder;
2019
import org.springframework.web.bind.annotation.PathVariable;

org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/AddVisitForm.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.springframework.web.bind.annotation.ModelAttribute;
1212
import org.springframework.web.bind.annotation.RequestMapping;
1313
import org.springframework.web.bind.annotation.RequestMethod;
14-
import org.springframework.web.bind.annotation.RequestParam;
1514
import org.springframework.web.bind.annotation.SessionAttributes;
1615
import org.springframework.web.bind.annotation.InitBinder;
1716
import org.springframework.web.bind.annotation.PathVariable;

org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/ClinicController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.springframework.stereotype.Controller;
77
import org.springframework.ui.ModelMap;
88
import org.springframework.web.bind.annotation.RequestMapping;
9-
import org.springframework.web.bind.annotation.RequestParam;
109
import org.springframework.web.bind.annotation.PathVariable;
1110
import org.springframework.web.servlet.ModelAndView;
1211

org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/EditOwnerForm.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.springframework.web.bind.annotation.ModelAttribute;
1111
import org.springframework.web.bind.annotation.RequestMapping;
1212
import org.springframework.web.bind.annotation.RequestMethod;
13-
import org.springframework.web.bind.annotation.RequestParam;
1413
import org.springframework.web.bind.annotation.SessionAttributes;
1514
import org.springframework.web.bind.annotation.InitBinder;
1615
import org.springframework.web.bind.annotation.PathVariable;

org.springframework.samples.petclinic/src/main/java/org/springframework/samples/petclinic/web/EditPetForm.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.springframework.web.bind.annotation.ModelAttribute;
1414
import org.springframework.web.bind.annotation.RequestMapping;
1515
import org.springframework.web.bind.annotation.RequestMethod;
16-
import org.springframework.web.bind.annotation.RequestParam;
1716
import org.springframework.web.bind.annotation.SessionAttributes;
1817
import org.springframework.web.bind.annotation.InitBinder;
1918
import org.springframework.web.bind.annotation.PathVariable;

0 commit comments

Comments
 (0)