 |
BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2
 | This is the forum to discuss the Wrox book Beginning Spring Framework 2 by Thomas Van de Velde, Bruce Snyder, Christian Dupuis, Sing Li, Anne Horton, Naveen Balani; ISBN: 9780470101612 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 2nd, 2012, 01:36 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I pasted the pom.xml above and, after changing compiler-plugin version and adding eclipse plugin version, apparently this wsdl:
http://ws.xwebservices.com/XWebEmail...alidation.wsdl
generates a package with a space in the name!
instead of this:
/pixweb/target/generated-sources/com/wrox/webservice/emailvalidation/client
I get ../clien t,
That's right, a space between the n and t!
I was able to copy and rename the package to get the project to build.
but the resulting war will not execute when dropped into tomcat.
Anyone hava clue?
Last edited by anthonydipaola; April 5th, 2012 at 12:28 PM..
|
|

April 11th, 2012, 10:46 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I also tried building with the pom.xml above, but it fails as follows :
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/wrox-pix-web/target/generated-sources/com/wrox/webservice/emailvalidation/clien t/XWebEmailValidationInterface.java:[2,49] ';' expected
/wrox-pix-web/target/generated-sources/com/wrox/webservice/emailvalidation/clien t/XWebEmailValidationClient.java:[2,49] ';' expected
/wrox-pix-web/target/generated-sources/com/wrox/webservice/emailvalidation/clien t/XWebEmailValidationClient.java:[59,72] ')' expected
/wrox-pix-web/target/generated-sources/com/wrox/webservice/emailvalidation/clien t/XWebEmailValidationClient.java:[59,110] ';' expected
/wrox-pix-web/target/generated-sources/com/wrox/webservice/emailvalidation/clien t/XWebEmailValidationClient.java:[59,112] not a statement
/wrox-pix-web/target/generated-sources/com/wrox/webservice/emailvalidation/clien t/XWebEmailValidationClient.java:[59,117] ';' expected
/wrox-pix-web/target/generated-sources/com/wrox/webservice/emailvalidation/clien t/XWebEmailValidationImpl.java:[2,49] ';' expected
|
|

April 11th, 2012, 02:07 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I got the same compiler errors too.
But look at the error messages, a package directory named 'clien t', as well!
Last edited by anthonydipaola; April 11th, 2012 at 02:10 PM..
|
|

April 19th, 2012, 11:19 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I found the problem.
source/main/resources/webservice-validationclient.xml had the space in 'clien t'
<property name="serviceClass"
value="com.wrox.webservice.emailvalidation.clien t.XWebEmailValidationInterface"
/>
Delete the space and problem solved.
In desperation I tried removing all references to the web service from the project.
This was the next to last place I looked when commenting-out stuff. Damn!
|
|

July 20th, 2013, 02:52 PM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Spring framework 2
Quote:
Originally Posted by cuongvt
This is my complete pom.xml:
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>wrox</groupId>
<artifactId>pixweb</artifactId>
<packaging>war</packaging>
<version>0.0.1</version>
<description></description>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<filtering>true</filtering>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>1.0</wtpversion>
<additionalBuildcommands>
<buildcommand>org.springframework.ide.eclipse.core .springbuilder</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.cor e.springnature</projectnature>
</additionalProjectnatures>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<version>1.0-20061017.160413-3</version>
<artifactId>xfire-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>wsgen</goal>
</goals>
</execution>
</executions>
<configuration>
<package>com.wrox.webservice.emailvalidation.clien t</package>
<overwrtite>true</overwrtite>
<generateServerStubs>false</generateServerStubs>
<forceBare>false</forceBare>
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
<wsdls>
<wsdl>http://ws.xwebservices.com/XWebEmailValidation/V2/XWebEmailValidation.wsdl</wsdl>
</wsdls>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>Codehaus Snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>${taglibs-standard-version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl-version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jpa</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.2.1.ga</version>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>javax.transaction</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jta</artifactId>
<version>1.0.1B-rc4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflow</artifactId>
<version>${spring-webflow-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>${spring-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>${hsqldb-version}</version>
</dependency>
<dependency>
<groupId>org.directwebremoting</groupId>
<artifactId>dwr</artifactId>
<version>${dwr-version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang-version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>1.4.8</version>
</dependency>
<dependency>
<groupId>rome</groupId>
<artifactId>rome</artifactId>
<version>0.9</version>
</dependency>
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-aegis</artifactId>
<version>${xfire-version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-core</artifactId>
<version>${xfire-version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-spring</artifactId>
<version>${xfire-version}</version>
<exclusions>
<exclusion>
<artifactId>spring</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-java5</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-generator</artifactId>
<version>${xfire-version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>spring</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-jaxws</artifactId>
<version>${xfire-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>fm.void.jetm</groupId>
<artifactId>jetm</artifactId>
<version>${jetm-version}</version>
</dependency>
<dependency>
<groupId>fm.void.jetm</groupId>
<artifactId>jetm-optional</artifactId>
<version>${jetm-version}</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>${cglib-version}</version>
</dependency>
</dependencies>
<properties>
<activemq-version>4.1.1</activemq-version>
<spring-webflow-version>1.0.3</spring-webflow-version>
<spring-version>2.0.5</spring-version>
<junit-version>3.8.2</junit-version>
<commons-lang-version>2.1</commons-lang-version>
<dwr-version>2.0.1</dwr-version>
<jstl-version>1.0</jstl-version>
<taglibs-standard-version>1.1.1</taglibs-standard-version>
<hsqldb-version>1.8.0.7</hsqldb-version>
<servlet-api-version>2.5</servlet-api-version>
<log4j-version>1.2.14</log4j-version>
<commons-fileupload-version>1.1.1</commons-fileupload-version>
<xfire-version>1.2.4</xfire-version>
<jetm-version>1.2.1</jetm-version>
<cglib-version>2.1_3</cglib-version>
</properties>
</project>
|
If you have a code working, can you again publish the xml file.
The above file you published is still failing.
|
|

July 20th, 2013, 02:59 PM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Anthony, can you publish the pom.xml file that you are using..
|
|

March 30th, 2016, 12:25 PM
|
|
Registered User
|
|
Join Date: Mar 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 2-> java-based-autowiring
java-based-autowiring java source code has a java code error found when trying to do a maven install. AccountDaoInMemoryImpl.java code is incorrect,
private Map<Long,Account> accountsMap = new HashMap<>();
this should be
private Map<Long,Account> accountsMap = new HashMap<Long,Account>();
Also, change the HashMap<datatype here> below in this code.
Spend one or two hours trying to figure out why this would not compile and was not getting a correct error message, until making sure Maven pom.xml was configured correctly, using Eclipse build/clean and Maven clean/install.
Just frustrating, because this is a java language or coding language and misspelled and correct coding terms are very very important and find errors in this book is uncool!!!
|
|
 |