Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1095643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:09:29+00:00 2026-05-17T00:09:29+00:00

I have been using this exact Build.xml file. I had problems in the beginning

  • 0

I have been using this exact Build.xml file. I had problems in the beginning using the junit task with it, but I figured out those problems a couple months ago.

Recently I got the all to common error message when I ran my build file with the test task.

test:
[junit] Testsuite: com.mmz.mvc.test.AgentDAOTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Null Test:  Caused an ERROR
[junit] com.mmz.mvc.test.AgentDAOTest
[junit] java.lang.ClassNotFoundException: com.mmz.mvc.test.AgentDAOTest
[junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[junit]     at java.lang.Class.forName0(Native Method)
[junit]     at java.lang.Class.forName(Class.java:247)
[junit]     at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[junit]     at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[junit]     at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

BUILD FAILED
C:\Users\myName\Documents\Java\mmz\WEB-INF\build.xml:45: 
Testcom.mmz.mvc.test.AgentDAOTest failed

I know this problem is related to my classpath, but I am not sure why this would all of a sudden break when it has been working for so long.

My build follow looks like the following.

<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="build.dir" value="classes"/>
<property name="web.dir" value="war"/>

 <path id="build.classpath">
  <fileset dir="lib">
      <include name="*.jar"/>
  </fileset>
  <fileset dir="${appserver.lib}">
      <include name="servlet*.jar"/>
  </fileset>
  <pathelement path="${build.dir}"/>
  <pathelement path="${test.dir}"/>
 </path>

 <path id="classpath.base"/>
 <path id="classpath.test">
 <pathelement location="c:/ant/lib/junit.jar" />
 <pathelement location="${build.dir}"/>
 <pathelement location="${src.dir}"/>
 <pathelement location="${test.dir}" />
 <pathelement location="classes"/>
 <path refid="classpath.base" />
 </path>

 <target name="build">
    <mkdir dir="${build.dir}"/>
     <mkdir dir="${test.dir}"/>
     <javac destdir="${build.dir}" source="1.5" target="1.5" debug="true"    deprecation="false" optimize="false" failonerror="true">
      <src path="${src.dir}"/>
       <classpath refid="build.classpath"/>
     </javac>
  <javac destdir="${build.dir}" source="1.5" target="1.5" debug="true" deprecation="false" optimize="false" failonerror="true">
      <src path="${test.dir}"/>
      <classpath refid="build.classpath"/>
  </javac>
  </target>

    <target name="test">
    <junit haltonfailure="true">
      <classpath refid="classpath.test" />
      <classpath refid="build.classpath"/>
      <formatter type="brief" usefile="false" />
      <test name="com.mmz.mvc.test.AgentDAOTest"/>
      <test name="com.mmz.mvc.test.AgentProfileDAOTest"/>
      <test name="com.mmz.mvc.test.BuyerDAOTest"/>
      <test name="com.mmz.mvc.test.BuyerSellerDAOTest"/>
      <test name="com.mmz.mvc.test.BaseDAOTest"/>
      <test name="com.mmz.mvc.test.MemberDAOTest"/>
      <test name="com.mmz.mvc.test.SellerDAOTest"/>
    </junit>

I am not very good with build files and I am not very good at understanding the how to setup classpaths and everything so If somebody could help I would appreciate it.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:09:29+00:00Added an answer on May 17, 2026 at 12:09 am

    Looks like a missing jar file, containing the class “com.mmz.mvc.test.AgentDAOTest”. Reading your build file suggests the jar used to be located in your “lib” directory.

    I’m assuming, of course, that this class is not a missing Java source file located under you “src” or “${test.dir}” directories…..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using this code, but have been running into some memory issues:
I have been using this link to learn about multiprocessing, but I'm stuck on
I have been using this as a reference, but not able to accomplish exactly
I have been using this so far system 'strings binary-file.dmp | grep search_string' Is
I have been using this code to implement a Popup JDialog of sorts, like
I have been using this code with great success to pull out the first
I have been using this copy method for quite a while, in lots of
I have been using this excellent decorator for memoization, which I found on the
I have been using an API to do some work. This is how I
I have been using Twitter's Bootstrap Tooltip plugin . This works perfectly fine except

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.