Still No Joy With Airline Sample
The title says it all.
I changed the applicationContext-jpa.xml, because after glancing through it I realized that the dataSource properties were still set to the default values for HSQLDB. (I'm using MySQL.)
After changing the properties to point to my database I started getting exceptions on startup. Some of them have to do with referential integrity. If I look at the database, I can see that there's already data in the tables. If I open jpa/applicationContext-jpa.xml, I can see that the DatabaseInitializer bean is the likely culprit, so I commented that out.
I also found two problems with the configuration:
1. No default ctor for flightController in mvc-servlet.xml; added a reference to airlineService.
2. No default ctor for airlineService in service/applicationContext.xml; added references to flightDao and ticketDao.
At last I'm able to bring up the JSP that shows flights. Gotta start working with the clients one by one to see what's up with those.
It might help some other people to modify the /samples for the 1.5.0 download to match the readme.txt documentation that came with the 1.0.4 download; add the bit about modifying the jpa/applicationContext-jpa.xml if you aren't using HSQLDBC; and correct the two bean configs that I noted above. Thanks.
%
Another Fix For Airline Sample
I wasn't getting any data into the flight.jsp, because the variable "flight" couldn't be resolved.
I changed the FlightsController singleFlight method to fix it. I changed this:
Code:
@RequestMapping(value = "/flight")
public String singleFlight(@RequestParam("id")long id, ModelMap model) throws Exception {
Flight flight = airlineService.getFlight(id);
model.addAttribute(flight);
return "flight";
}
to this:
Code:
@RequestMapping(value = "/flight")
public String singleFlight(@RequestParam("id")long id, ModelMap model) throws Exception {
Flight flight = airlineService.getFlight(id);
model.addAttribute("flight", flight);
return "flight";
}
I had to make another change to flights.jsp. I changed this line:
Code:
<c:url var="flightUrl" value="flight">
to this:
Code:
<c:url var="flightUrl" value="/flight">
All is well now. Web MVC client appears to be working fine. Now onto the WS clients.
%
Airline Sample JAX-WS Client Builds and Runs Fine
The JAX-WS client for the airline sample builds and runs fine for me using the Ant build.xml that's provided.
Airline Sample Spring-WS Client Build Fails
The Spring WS client build fails while processing spring-core-1.2.9.pom: Failed to resolve activation-1.0.2.jar
I'll have to dig into Maven to see how to resolve this.
%