Hello BJ Freeman, I already have <fileset dir="../../applications/party/build/lib" includes="*.jar"/> under <target name="classpath"> in build.xml under hot-deploy folder.
Also the java class that I added is @ testtools > src > ofbiz >learning > learning > LearningEvents.java The Java class has ************************** package org.ofbiz.learning.learning; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.ofbiz.party.contact.ContactMechWorker; public class LearningEvents { public static String postalAddressAdvisory(HttpServletRequest request, HttpServletResponse response){ String partyId = request.getParameter("partyId"); Map mechMap = new HashMap(); ContactMechWorker.getContactMechAndRelated(request, partyId, mechMap); Map postalAddress = (Map)mechMap.get("postalAddress"); if (postalAddress == null) return "notMars"; String planet = (String)postalAddress.get("planet"); if (planet == null || !planet.equalsIgnoreCase("Mars")) return "notMars"; return "isMars"; } } ************************** Your help is really appreciated. Thank you. BJ Freeman wrote: > > need to add the paths into the build file under > <target name="classpath"> > > > shuchi sent the following on 5/26/2009 1:18 PM: >> I added a new java class and I think there I am getting the error. >> >> I looked at the compiler at it gives following error messages. >> >> ************************************************************* >> [javac] Compiling 1 source file to >> C:\workspace\ofbiz4.0\framework\testtools\build\classes >> [javac] >> C:\workspace\ofbiz4.0\framework\testtools\src\org\ofbiz\learning\learning\LearningEvents.java:4: >> package javax.servlet.http does not exist >> [javac] import javax.servlet.http.HttpServletRequest; >> [javac] ^ >> [javac] >> C:\workspace\ofbiz4.0\framework\testtools\src\org\ofbiz\learning\learning\LearningEvents.java:5: >> package javax.servlet.http does not exist >> [javac] import javax.servlet.http.HttpServletResponse; >> [javac] ^ >> [javac] >> C:\workspace\ofbiz4.0\framework\testtools\src\org\ofbiz\learning\learning\LearningEvents.java:6: >> package org.ofbiz.party.contact does not exist >> [javac] import org.ofbiz.party.contact.ContactMechWorker; >> [javac] ^ >> [javac] >> C:\workspace\ofbiz4.0\framework\testtools\src\org\ofbiz\learning\learning\LearningEvents.java:11: >> cannot find symbol >> [javac] symbol : class HttpServletRequest >> [javac] location: class org.ofbiz.learning.learning.LearningEvents >> [javac] public static String >> postalAddressAdvisory(HttpServletRequest >> [javac] ^ >> [javac] >> C:\workspace\ofbiz4.0\framework\testtools\src\org\ofbiz\learning\learning\LearningEvents.java:12: >> cannot find symbol >> [javac] symbol : class HttpServletResponse >> [javac] location: class org.ofbiz.learning.learning.LearningEvents >> [javac] request, HttpServletResponse response){ >> [javac] ^ >> [javac] >> C:\workspace\ofbiz4.0\framework\testtools\src\org\ofbiz\learning\learning\LearningEvents.java:15: >> cannot find symbol >> [javac] symbol : variable ContactMechWorker >> [javac] location: class org.ofbiz.learning.learning.LearningEvents >> [javac] >> ContactMechWorker.getContactMechAndRelated(request, >> partyId, >> [javac] ^ >> [javac] 6 errors >> ******************************************************************** >> >> I am not sure what this errors are pointing at. >> >> Your help is really appreciated. >> >> Thank you. > > -- > BJ Freeman > http://www.businessesnetwork.com/automation > http://bjfreeman.elance.com > http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro > Systems Integrator. > > > -- View this message in context: http://www.nabble.com/BUILD-FAILED-while-adding-new-component-tp23729208p23742493.html Sent from the OFBiz - User mailing list archive at Nabble.com.