BUILD FAILED while adding new component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
su2
Reply | Threaded
Open this post in threaded view
|

BUILD FAILED while adding new component

su2
Hi All,

I am a newbie to ofbiz.

I am trying to add new component (adding in hot-deploy folder). When trying to build the application in ant window I get following error message.

*************************************************************************
BUILD FAILED
C:\ofbiz\ofbiz4.0\build.xml:106: The following error occurred while executing this line:
C:\ofbiz\ofbiz4.0\framework\build.xml:133: The following error occurred while executing this line:
C:\ofbiz\ofbiz4.0\framework\testtools\build.xml:82: Compile failed; see the compiler error output for details.
**************************************************************************
line 106 @ C:\ofbiz\ofbiz4.0\build.xml:106 is: <subant inheritall="false">
of

<subant inheritall="false">
            <filelist dir="." files="framework/build.xml"/>
</subant>

line 133 @ C:\ofbiz\ofbiz4.0\framework\build.xml:13  is : <subant inheritall="false">
of
<subant inheritall="false">
            <filelist refid="framework-builds"/>
</subant>

and line 82 @ C:\ofbiz\ofbiz4.0\framework\testtools\build.xml:82 is : <javac debug="on" source="1.4" deprecation="on" destdir="${build.dir}/classes">

of

<javac debug="on" source="1.4" deprecation="on" destdir="${build.dir}/classes">
            <classpath>
                <path refid="local.class.path"/>
            </classpath>
            <src path="${src.dir}"/>
 </javac>


I am not sure what these errors are indicating and what did I do wrong.

Your help is really appreciated.

Thank you.


Reply | Threaded
Open this post in threaded view
|

Re: BUILD FAILED while adding new component

BJ Freeman
looks like your error is not related to the hot deploy.
first
ant clean
ant build
if you still have the error remove the hot deploy till you resolve all
other errors then put it back in.

though removing the hot deploy  is not really necessary for a newbie it
helps clear where to look.

to th e real problem this
 C:\ofbiz\ofbiz4.0\framework\testtools\build.xml:82: Compile failed; see
the compiler error output for details.

says to look up further in the log to see what the complier error is  on.

if you look at the main build you will see that the sequence it
framework
application
specialpurpose
then
hot depoly

your error is in the frame work



shuchi sent the following on 5/26/2009 11:59 AM:

> Hi All,
>
> I am a newbie to ofbiz.
>
> I am trying to add new component (adding in hot-deploy folder). When trying
> to build the application in ant window I get following error message.
>
> *************************************************************************
> BUILD FAILED
> C:\ofbiz\ofbiz4.0\build.xml:106: The following error occurred while
> executing this line:
> C:\ofbiz\ofbiz4.0\framework\build.xml:133: The following error occurred
> while executing this line:
> C:\ofbiz\ofbiz4.0\framework\testtools\build.xml:82: Compile failed; see the
> compiler error output for details.
> **************************************************************************
> line 106 @ C:\ofbiz\ofbiz4.0\build.xml:106 is: <subant inheritall="false">
> of
>
> <subant inheritall="false">
>             <filelist dir="." files="framework/build.xml"/>
> </subant>
>
> line 133 @ C:\ofbiz\ofbiz4.0\framework\build.xml:13  is : <subant
> inheritall="false">
> of
> <subant inheritall="false">
>             <filelist refid="framework-builds"/>
> </subant>
>
> and line 82 @ C:\ofbiz\ofbiz4.0\framework\testtools\build.xml:82 is : <javac
> debug="on" source="1.4" deprecation="on" destdir="${build.dir}/classes">
>
> of
>
> <javac debug="on" source="1.4" deprecation="on"
> destdir="${build.dir}/classes">
>             <classpath>
>                 <path refid="local.class.path"/>
>             </classpath>
>             <src path="${src.dir}"/>
>  </javac>
>
>
> I am not sure what these errors are indicating and what did I do wrong.
>
> 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.

su2
Reply | Threaded
Open this post in threaded view
|

Re: BUILD FAILED while adding new component

su2
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.
Reply | Threaded
Open this post in threaded view
|

Re: BUILD FAILED while adding new component

BJ Freeman
In reply to this post by BJ Freeman
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.

Reply | Threaded
Open this post in threaded view
|

Re: BUILD FAILED while adding new component

Anil Patel-3
In reply to this post by su2
Hi,
Knowing that you are new to Ofbiz, I suggest you should use code from  
Ofbiz trunk instead.  Refer to following document to checkout code  
from svn repository.
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Source+Repository+and+Access

We also have a nice tutorial that will help you learn basics much  
faster, below is the link to it.
http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginners+Development+Guide+Using+Practice+Application+%28Hello+World...%29


Regards
Anil Patel

On May 26, 2009, at 2:59 PM, shuchi wrote:

>
> Hi All,
>
> I am a newbie to ofbiz.
>
> I am trying to add new component (adding in hot-deploy folder). When  
> trying
> to build the application in ant window I get following error message.
>
> *************************************************************************
> BUILD FAILED
> C:\ofbiz\ofbiz4.0\build.xml:106: The following error occurred while
> executing this line:
> C:\ofbiz\ofbiz4.0\framework\build.xml:133: The following error  
> occurred
> while executing this line:
> C:\ofbiz\ofbiz4.0\framework\testtools\build.xml:82: Compile failed;  
> see the
> compiler error output for details.
> **************************************************************************
> line 106 @ C:\ofbiz\ofbiz4.0\build.xml:106 is: <subant  
> inheritall="false">
> of
>
> <subant inheritall="false">
>            <filelist dir="." files="framework/build.xml"/>
> </subant>
>
> line 133 @ C:\ofbiz\ofbiz4.0\framework\build.xml:13  is : <subant
> inheritall="false">
> of
> <subant inheritall="false">
>            <filelist refid="framework-builds"/>
> </subant>
>
> and line 82 @ C:\ofbiz\ofbiz4.0\framework\testtools\build.xml:82  
> is : <javac
> debug="on" source="1.4" deprecation="on" destdir="${build.dir}/
> classes">
>
> of
>
> <javac debug="on" source="1.4" deprecation="on"
> destdir="${build.dir}/classes">
>            <classpath>
>                <path refid="local.class.path"/>
>            </classpath>
>            <src path="${src.dir}"/>
> </javac>
>
>
> I am not sure what these errors are indicating and what did I do  
> wrong.
>
> Your help is really appreciated.
>
> Thank you.
>
>
>
> --
> View this message in context: http://www.nabble.com/BUILD-FAILED-while-adding-new-component-tp23729208p23729208.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

su2
Reply | Threaded
Open this post in threaded view
|

Re: BUILD FAILED while adding new component

su2
In reply to this post by BJ Freeman
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";
                        }
}

**************************

Note: I am learning on Ofbiz4.0

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.
Reply | Threaded
Open this post in threaded view
|

Re: BUILD FAILED while adding new component

BJ Freeman
In reply to this post by BJ Freeman
as I mentioned the first time you should remove the hot deploy till the
rest is fixed. It only causes confusion.

you problem is the build.xml in the testtools
you need to add class paths to the jars that support the the imports
that the framework/testtools/build.xml can not find.





shuchi sent the following on 5/27/2009 6:25 AM:

> 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.
>>
>>
>>
>

--
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.

Reply | Threaded
Open this post in threaded view
|

Re: BUILD FAILED while adding new component

Ashish Vijaywargiya-5
In reply to this post by su2
You should add the below entry in your build.xml file.
<fileset dir="../../framework/base/lib/j2eespecs" includes="*.jar"/>

It looks like you have done entry for party component, so you will be
fine to move further.
Still you get error then share your build.xml file.

--
Ashish

shuchi wrote:

> 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.
>  

smime.p7s (4K) Download Attachment