Wrox Programmer Forums
|
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
 
Old March 13th, 2008, 04:31 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, everybody

After I added the football.jpg file in the resource directory, the problem still persists.
please check the following error information.
Code:
Failed tests:
  testUploadPicture(com.wrox.beginspring.pix.dao.PictureFileRepositoryTest)

Tests in error:
  testRotateImageLeft(com.wrox.beginspring.pix.dao.PictureFileRepositoryTest)

Tests run: 18, Failures: 1, Errors: 1, Skipped: 0
I have no clue to solve this problem.

 
Old March 21st, 2008, 02:14 PM
Registered User
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks aneesha

 
Old April 9th, 2008, 11:41 AM
Registered User
 
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Maksim Solovjov Send a message via MSN to Maksim Solovjov
Default

LanceWang,
mvn package -Dmaven.test.skip=true

 
Old August 13th, 2008, 03:59 AM
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have tried this and although the results were far better than before it is still trying to download files from repositories that do not exist. IE

Downloading: http://repository.codehaus.org/wsdl4...dl4j-1.5.2.jar
Downloading: http://repo.mergere.com/maven2/wsdl4...dl4j-1.5.2.jar
Downloading: http://dist.codehaus.org//wsdl4j/jars/wsdl4j-1.5.2.jar
Downloading: http://people.apache.org/maven-snaps...dl4j-1.5.2.jar
Downloading: http://repository.codehaus.org/org/a...hema-1.0.3.jar
Downloading: http://repo.mergere.com/maven2/org/a...hema-1.0.3.jar
Downloading: http://dist.codehaus.org//org.apache...hema-1.0.3.jar
Downloading: http://people.apache.org/maven-snaps...hema-1.0.3.jar
Downloading: http://repository.codehaus.org/commo...ging-1.0.4.jar
Downloading: http://repo.mergere.com/maven2/commo...ging-1.0.4.jar

etc

I then get asked to install them myself, is there a way to get this code working and deployed to tomcat?

I get this message at the end

6 required artifacts are missing.

for artifact:
  org.codehaus.mojo:xfire-maven-plugin:maven-plugin:1.0-20061017.160413-3

from the specified remote repositories:
  codehaus.org (http://repository.codehaus.org),
  central (http://repo1.maven.org/maven2),
  snapshots (http://snapshots.repository.codehaus.org),
  Codehaus Snapshots (http://snapshots.repository.codehaus.org/)

Any help would be appreciatted

Many thanks

Richard
 
Old August 15th, 2008, 10:12 PM
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I ended up just installing each of the packages 1 by one as suggested and it worked fine!

 
Old August 26th, 2008, 04:24 AM
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I'm trying to execute mvn package; I get the error below

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: unknown
POM Location: o:\workSpace\workSpacePersonal\wrox-pix-web\pom.xml

Reason: Parse error reading POM. Reason: Unrecognised tag: 'pluginRepositories' (position: START_TAG seen ...</plugins>\n <pluginRepositories>... @82:25)


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading POM. Reason: Unrecognised tag: 'pluginRepositories' (position: START_TAG seen ...</plugins>\n <plugi
epositories>... @82:25)
        at org.apache.maven.DefaultMaven.getProjects(DefaultM aven.java:365)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:278)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:2 56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end <<<<<<<<<<<<<<<<<<<<

this is my pom.xml

<<<<<<<<<<<<<<<<<< start pom<<<<<<<<<<<<<<<<<<<<<<<

<?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>
    <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>
  </build>
  <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>

<<<<<<<<<<<<<<<<<<<end pom <<<<<<<<<<<<<<<<<<<<<<<<

Quote:
quote:Originally posted by aneesha
 Hey

My slightly modified version of the pom.xml file seems to work.

I added a version no to the 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.c lient</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>

and an alternate plugin repository (placed below the </build> tag): <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>

I can upload the complete file somewhere if requested.

Thanks

Aneesha
 
Old November 10th, 2008, 06:43 PM
Registered User
 
Join Date: Nov 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For: ogu6973 Aneesha told that tag 'pluginRepositories' should be after </build> tag (not before).
However, problem still continue for me:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.codehaus.mojo:xf
ire-maven-plugin:1.0-SNAPSHOT:wsgen': Unable to find the mojo 'org.codehaus.mojo
:xfire-maven-plugin:1.0-SNAPSHOT:wsgen' in the plugin 'org.codehaus.mojo:xfire-m
aven-plugin'
org/codehaus/xfire/gen/WsGenTask (Unsupported major.minor version 49.0)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Mon Nov 10 23:26:59 CET 2008
[INFO] Final Memory: 9M/19M
[INFO] ------------------------------------------------------------------------

 
Old January 15th, 2009, 05:06 PM
Registered User
 
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm also experiencing a PARSE ERROR once I edited my pom.xml with the changes suggested by aneesha. I'm working on WindowsXP and when I open the pom.xml from the download in my text editor, I get a warning that the file is not in DOS format. However saving the file in DOS format doesn't or Unix format doesn't seem to solve the parse error. Anyone have insight into how I can get this working?
 
Old March 24th, 2009, 12:49 PM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Looks like Maven is downloading newer version of the artifacts then specified in the POM. I downloaded the versions specified in the error from http://repo2.maven.org/maven2/ and it all seems to work. I'm new to maven so didn't want to start changing version numbers.

Ta,
Iso

Quote:
Originally Posted by mackstar View Post
I have tried this and although the results were far better than before it is still trying to download files from repositories that do not exist. IE

Downloading: http://repository.codehaus.org/wsdl4...dl4j-1.5.2.jar
Downloading: http://repo.mergere.com/maven2/wsdl4...dl4j-1.5.2.jar
Downloading: http://dist.codehaus.org//wsdl4j/jars/wsdl4j-1.5.2.jar
Downloading: http://people.apache.org/maven-snaps...dl4j-1.5.2.jar
Downloading: http://repository.codehaus.org/org/a...hema-1.0.3.jar
Downloading: http://repo.mergere.com/maven2/org/a...hema-1.0.3.jar
Downloading: http://dist.codehaus.org//org.apache...hema-1.0.3.jar
Downloading: http://people.apache.org/maven-snaps...hema-1.0.3.jar
Downloading: http://repository.codehaus.org/commo...ging-1.0.4.jar
Downloading: http://repo.mergere.com/maven2/commo...ging-1.0.4.jar

etc

I then get asked to install them myself, is there a way to get this code working and deployed to tomcat?

I get this message at the end

6 required artifacts are missing.

for artifact:
org.codehaus.mojo:xfire-maven-plugin:maven-plugin:1.0-20061017.160413-3

from the specified remote repositories:
codehaus.org (http://repository.codehaus.org),
central (http://repo1.maven.org/maven2),
snapshots (http://snapshots.repository.codehaus.org),
Codehaus Snapshots (http://snapshots.repository.codehaus.org/)

Any help would be appreciatted

Many thanks

Richard
 
Old April 3rd, 2009, 03:05 PM
Registered User
 
Join Date: Apr 2009
Posts: 3
Thanks: 1
Thanked 1 Time in 1 Post
Default A little bit clearer

For the sake of clarity, here are the lines you should add to your pom.xml file:

1. After line 60 (/groupId) add
Code:
<version>1.0-20061017.160413-3</version>
2. After line 82 (/build) add
Code:
<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>
I'm not happy about the decision to put things on a web repository - true, it is used in real development environment, but then I was stuck on download http://repo.mergere.com/maven2/wsdl4...dl4j-1.5.2.jar ... :( the web is NOT always the computer. So, after all, six libraries are missing. 5 of them are available at http://repo2.maven.org/maven2/, I had to look for another one at the Apache foundation website. I've put them all into one archive; if you wish, I can send it to you, just drop me a mail here p.imbemba [at] gmail.com or tell me where to upload it.
However, after installing the missing libraries manually, if you run
Code:
mvn package
you will receive test failures. To skip unit testing when building, use
Code:
mvn package  -Dmaven.test.skip=true
Be careful at the capital D, the book states d, which is wrong! This should result into a successful build.

To be honest, I am disappointed that this book's errata doesn't have a workaround for the maven plugin problem. We're talking about beginner level here and editing pom.xml files and installing maven plugins are rock barriers! I am used to much more quality as to Wrox books I read couple of years back!

Last edited by pi4630; April 3rd, 2009 at 04:31 PM.. Reason: Solved problem





Similar Threads
Thread Thread Starter Forum Replies Last Post
VB2005 Project Build Error ashg657 Visual Basic 2005 Basics 1 August 6th, 2006 06:57 PM
C# - Chapter 3 Build Error TJ BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 July 29th, 2006 03:43 PM
Build Error, not IIS application VictorVictor ASP.NET 2.0 Basics 0 January 11th, 2006 04:43 PM
Build Error - Plz Help - Thanks ank2go ASP.NET 1.0 and 1.1 Basics 1 February 23rd, 2004 10:09 PM
error on build stewbaby C++ Programming 1 October 30th, 2003 06:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.