Hi,

I'm suspect your problem might be a generic ANT issue rather than something
specifically associated with Jenkins. Are you are to run this script from
the command line on your Jenkins server.

The other question is where you get the error - is it in launching ANT, or
is it ANT trying to compile/test/run you application. The reason I ask is
that when ANT runs (which is an application in a VM) it can create child
VMs with different class paths to perform your tasks. I'm wondering which
VM has the class path error.

On Wed, May 16, 2012 at 7:05 AM, Prakash A <prakash.ayyarde...@gmail.com>wrote:

> Hi,
>
> Thanks for your response. But i did set the classpath as you suggested,
> still getting the same error. Following is the output in the console.
>
> *[workspace] $ /usr/ant/apache-ant-1.8.3/bin/ant 
> -DCLASSPATH=/usr/java/jdk1.6.0_24/jre/lib/rt.jar print
> Error occurred during initialization of VM
> java/lang/NoClassDefFoundError: java/lang/Object
> Build step 'Invoke Ant' marked build as failure*
>
> Please let me know, how to resolve the issue.
>
> Thanks,
> Prakash.A
>
>
>
> On Tuesday, 15 May 2012 17:38:39 UTC+5:30, John Smith wrote:
>>
>> I suspect the problem isn't your PATH, but your CLASSPATH. You'll need to
>> make sure this includes:
>>
>>   ${JAVA_HOME}/jre/lib/rt.jar
>>
>> (Assuming that you've already set JAVA_HOME).
>>
>> On Tue, May 15, 2012 at 11:06 AM, Prakash A <prakash.viso...@gmail.com>wrote:
>>
>>> Hello All,
>>>
>>> I'm very new Jenkins (even to CI tools). I have a problem in running
>>> ANT target from Jenkins. Let me clarify the question.
>>>
>>> I've my jenkins installed in CentOS using native method (YUM repo).
>>> I've also installed JDK, Ant. I did configured the path of those
>>> things in Jenkins -> Manage Jenkins -> Configure System.
>>>
>>> Then created a new Job to build product. In the job, subversion access
>>> information as well as ant target to be run in the build step were
>>> configured.
>>>
>>> When running the job, im able to connect to SVN and download the
>>> files. When trying to run the ant target, i got the following error
>>> and build the failed.
>>>
>>> [workspace] $ /usr/ant/apache-ant-1.8.3/bin/**ant web
>>> Error occurred during initialization of VM
>>> java/lang/**NoClassDefFoundError: java/lang/Object
>>> Build step 'Invoke Ant' marked build as failure
>>> Finished: FAILURE
>>>
>>> Based on my understanding, the error is that the appropriate JDK bin
>>> path was not configured properly in PATH environment variable. Is my
>>> assumption rite??
>>>
>>> I also tried to set the PATH variable in two places. 1. Jenkins ->
>>> Manage Jenkins -> Configure System -> Global Properties by having
>>> 'PATH' in the name and '/usr/java/home/bin' (Yes, Sun JDK was
>>> installed in that path) as the value. 2. Jenkins -> Job1 ->
>>> configuration -> Invoke Ant -> Advanced -> Properties as 'PATH=/usr/
>>> java/home/bin'.
>>>
>>> Im lost here. Please let me know, how i can change the PATH variable.
>>>
>>> Thanks,
>>> Prakash.A
>>
>>
>>

Reply via email to