Hi,

To my mind this sounds like a ANT problem rather than something to do with
Jenkins (although it could be manifesting through Jenkins). Have you tried
calling the ANT script directly from the command line?

Another question - is the problem running ANT it's self, or is the problem
when ANT tried to compile/run/test your code? What I mean is not only does
ANT run inside a VM, but it also creates VMs to do it's work. Is it the
ANT's VM that has the classpath problem or is it the child VM's that have
the problem?




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