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 November 16th, 2008, 04:02 PM
Registered User
 
Join Date: Nov 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default exec:java classpath problem

I'm trying to run the SpringFirst sample project on page 10. Doesn't seem like exec:java is using the project's target/classes directory as part of the classpath.
Code:
C:\begspringcode_070808\src\chapter1\springfirst>mvn exec:java -Dexec.mainClass=com.wrox.bedspring.CalculateSpring -Dexec.args="123
 456"

The -e switch shows the following error:
Code:
Caused by: java.lang.ClassNotFoundException: com.wrox.bedspring.CalculateSpring
I tried setting -Dexec.includeProjectDependencies=true, -Dexec.classpathScope=compile and -Dexec.classpathScope=runtime, but the same error always shows up.
 
Old December 1st, 2008, 01:32 AM
Registered User
 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by mslinn
 I'm trying to run the SpringFirst sample project on page 10. Doesn't seem like exec:java is using the project's target/classes directory as part of the classpath.
Code:
C:\begspringcode_070808\src\chapter1\springfirst>mvn exec:java -Dexec.mainClass=com.wrox.bedspring.CalculateSpring -Dexec.args="123
 456"

The -e switch shows the following error:
Code:
Caused by: java.lang.ClassNotFoundException: com.wrox.bedspring.CalculateSpring
I tried setting -Dexec.includeProjectDependencies=true, -Dexec.classpathScope=compile and -Dexec.classpathScope=runtime, but the same error always shows up.
Is JAVA_HOME in your classpath ? Maybe that's the problem. Here is how I setup mine.

export M2_HOME=/usr/local/maven
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=/usr/java/jdk1.6.0_02

 
Old December 1st, 2008, 08:05 AM
Registered User
 
Join Date: Nov 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, JAVA_HOME is set. The error complains about com.wrox.bedspring.CalculateSpring not being available. The Java runtime is available, or a different error would have shown up.





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in setting the classpath. Sibananda Tripathy J2EE 1 May 2nd, 2007 01:08 AM
Java AXBridge and Classpath sonicDace J2EE 1 November 9th, 2004 10:18 AM
ClassNotFoundException - CLASSPATH problem? pmckeever JSP Basics 0 December 4th, 2003 10:02 AM
EXEC problem. pankaj_daga SQL Server 2000 8 October 4th, 2003 05:39 PM
classpath problem amcp2002 JSP Basics 13 July 26th, 2003 12:50 AM





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