You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Paulo Jesus <pa...@gmail.com> on 2007/09/14 16:07:37 UTC

Derby 10.3.1.4 compiling problems

I'm trying to compile derby 10.3.1.4 and I'm continuing having this
error on build

BUILD FAILED
/paulo/svn/10.3/build.xml:335: The following error occurred while
executing this line:
/paulo/svn/10.3/java/engine/org/apache/derby/loc/build.xml:36: taskdef
A class needed by class org.apache.derbyBuild.MessageBuilder cannot be
found: org/apache/tools/ant/Task


I have code from
svn  https://svn.apache.org/repos/asf/db/derby/code/branches/10.3   575672
and also
svn  https://svn.apache.org/repos/asf/db/derby/code/trunk   575674


First run of "ant  " worked fine but second run turns this error.
Then i run "ant clean"and then again first ok, second not.
I'm able to start server but not sure if everything went well.

I can't use ./bin/.. scripts, But always derbynet.jar not found at
$LOCALCLASSPATH.
I'm able to compile derbyNet.jar and configure $CLASSPATH and
$LOCALCLASSPATH.   But to start server i need to do manually.


I didn't install osgi.jar and SR 169 jars.
Also i'm not using Java1.6.x


I'm missing something?
PJ

Re: Derby 10.3.1.4 compiling problems

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Paulo,

It doesn't appear to me that you have set ANT_HOME as described in 
trunk/BUILDING.txt. That may be part of the problem.

Hope this helps,
-Rick

Paulo Jesus wrote:
> I'm building from console.
> I use ant ver. 1.6.5. It works fine compiling derby 10.2.2.0.
> I keep ant.properties and modify  my script to set environment.
>
> My set environment script, now, looks this (junit.jar and derbyner.jar
> are here to try put server to run)
> --/--
> #! /bin/bash
> #JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
> export JAVA_HOME=/software/j2sdk1.4.2_14
>
> DERBY_HOME=/paulo/svn/10.3 ; export DERBY_HOME
> PATH=$DERBY_HOME/bin/:$PATH ; export PATH
>
> CLASSPATH=$DERBY_HOME/classes:$DERBY_HOME/tools/java/junit.jar:$DERBY_HOME/jars/sane/derbynet.jar;
> export CLASSPATH
> LOCALCLASSPATH=$CLASSPATH; export LOCALCLASSPATH
> -- / --
> and the ant.properties:
> j14lib=/software/j2sdk1.4.2_14/jre/lib
> j13lib=/software/jdk1.3.1_20/jre/lib
>
> proceed=true
> sane=false
> #debug=true
> #debuglevel="lines,vars,source"
> ----------------
>
> The problem seems to start after, or inside, the first run of "ant "...
>
>
>
>
> 2007/9/14, Kristian Waagan <Kr...@sun.com>:
>   
>> Paulo Jesus wrote:
>>     
>>> I'm trying to compile derby 10.3.1.4 and I'm continuing having this
>>> error on build
>>>
>>> BUILD FAILED
>>> /paulo/svn/10.3/build.xml:335: The following error occurred while
>>> executing this line:
>>> /paulo/svn/10.3/java/engine/org/apache/derby/loc/build.xml:36: taskdef
>>> A class needed by class org.apache.derbyBuild.MessageBuilder cannot be
>>> found: org/apache/tools/ant/Task
>>>
>>>
>>> I have code from
>>> svn  https://svn.apache.org/repos/asf/db/derby/code/branches/10.3   575672
>>> and also
>>> svn  https://svn.apache.org/repos/asf/db/derby/code/trunk   575674
>>>
>>>
>>> First run of "ant  " worked fine but second run turns this error.
>>> Then i run "ant clean"and then again first ok, second not.
>>> I'm able to start server but not sure if everything went well.
>>>
>>> I can't use ./bin/.. scripts, But always derbynet.jar not found at
>>> $LOCALCLASSPATH.
>>> I'm able to compile derbyNet.jar and configure $CLASSPATH and
>>> $LOCALCLASSPATH.   But to start server i need to do manually.
>>>
>>>
>>> I didn't install osgi.jar and SR 169 jars.
>>> Also i'm not using Java1.6.x
>>>
>>>
>>> I'm missing something?
>>>       
>> Hello Paulo,
>>
>> On first sight this looks like a build environment problem.
>> Are you building from the command line or from withing an IDE?
>>
>> Can you state which ant version you are using, and verify that your ant
>> installation is working properly?
>>
>>
>> If that's not the problem, just post again!
>>
>>
>> --
>> Kristian
>>
>>     
>>> PJ
>>>       
>>     


Re: Derby 10.3.1.4 compiling problems

Posted by Paulo Jesus <pa...@gmail.com>.
2007/9/14, Kathey Marsden <km...@sbcglobal.net>:
> Paulo Jesus wrote:
> > The problem seems to start after, or inside, the first run of "ant "...
> >
> >
> Derby does not have a dependency based build. I always do an ant clobber
> between builds.  If it builds cleanly after an "ant clobber" then that
> is good.
>
> The problem you reported with the scripts is likely because you are
> using  $DERBY_HOME/classes instead of jars. I don't know when/why
> network server was changed to require jars, but to run it these days I
> have to remove the old jars and build the jars, "ant buildjars" after
> ant all and of course change my CLASSPATH to point to the jar location.
> So short story...
>
> ant clobber
> ant all
> rm -rf jars/insane/*
> ant buildjars
>

Compiling this ways it works. Is like doing "ant clean" instead "ant clobber".
The second run of "ant "  or "ant all"   fails with the error i talked before.
This way I have trouble watching if there is errors on compiling,
because i can't run "ant "  again before doing a clean. This means
that i have many lines to analyze. Should be a better way to do this.

I have also errors generating javadoc of engine. It cat be related to
jars configuration. I will see this later.

Thanks


> change your classpath to point to the jars/insane location.
>
> Kathey
>
>
>

Re: Derby 10.3.1.4 compiling problems

Posted by Kathey Marsden <km...@sbcglobal.net>.
Paulo Jesus wrote:
> The problem seems to start after, or inside, the first run of "ant "...
>
>   
Derby does not have a dependency based build. I always do an ant clobber 
between builds.  If it builds cleanly after an "ant clobber" then that 
is good.

The problem you reported with the scripts is likely because you are 
using  $DERBY_HOME/classes instead of jars. I don't know when/why 
network server was changed to require jars, but to run it these days I 
have to remove the old jars and build the jars, "ant buildjars" after 
ant all and of course change my CLASSPATH to point to the jar location.  
So short story...

ant clobber
ant all
rm -rf jars/insane/*
ant buildjars

change your classpath to point to the jars/insane location.

Kathey



Re: Derby 10.3.1.4 compiling problems

Posted by Paulo Jesus <pa...@gmail.com>.
I'm building from console.
I use ant ver. 1.6.5. It works fine compiling derby 10.2.2.0.
I keep ant.properties and modify  my script to set environment.

My set environment script, now, looks this (junit.jar and derbyner.jar
are here to try put server to run)
--/--
#! /bin/bash
#JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export JAVA_HOME=/software/j2sdk1.4.2_14

DERBY_HOME=/paulo/svn/10.3 ; export DERBY_HOME
PATH=$DERBY_HOME/bin/:$PATH ; export PATH

CLASSPATH=$DERBY_HOME/classes:$DERBY_HOME/tools/java/junit.jar:$DERBY_HOME/jars/sane/derbynet.jar;
export CLASSPATH
LOCALCLASSPATH=$CLASSPATH; export LOCALCLASSPATH
-- / --
and the ant.properties:
j14lib=/software/j2sdk1.4.2_14/jre/lib
j13lib=/software/jdk1.3.1_20/jre/lib

proceed=true
sane=false
#debug=true
#debuglevel="lines,vars,source"
----------------

The problem seems to start after, or inside, the first run of "ant "...




2007/9/14, Kristian Waagan <Kr...@sun.com>:
> Paulo Jesus wrote:
> > I'm trying to compile derby 10.3.1.4 and I'm continuing having this
> > error on build
> >
> > BUILD FAILED
> > /paulo/svn/10.3/build.xml:335: The following error occurred while
> > executing this line:
> > /paulo/svn/10.3/java/engine/org/apache/derby/loc/build.xml:36: taskdef
> > A class needed by class org.apache.derbyBuild.MessageBuilder cannot be
> > found: org/apache/tools/ant/Task
> >
> >
> > I have code from
> > svn  https://svn.apache.org/repos/asf/db/derby/code/branches/10.3   575672
> > and also
> > svn  https://svn.apache.org/repos/asf/db/derby/code/trunk   575674
> >
> >
> > First run of "ant  " worked fine but second run turns this error.
> > Then i run "ant clean"and then again first ok, second not.
> > I'm able to start server but not sure if everything went well.
> >
> > I can't use ./bin/.. scripts, But always derbynet.jar not found at
> > $LOCALCLASSPATH.
> > I'm able to compile derbyNet.jar and configure $CLASSPATH and
> > $LOCALCLASSPATH.   But to start server i need to do manually.
> >
> >
> > I didn't install osgi.jar and SR 169 jars.
> > Also i'm not using Java1.6.x
> >
> >
> > I'm missing something?
>
> Hello Paulo,
>
> On first sight this looks like a build environment problem.
> Are you building from the command line or from withing an IDE?
>
> Can you state which ant version you are using, and verify that your ant
> installation is working properly?
>
>
> If that's not the problem, just post again!
>
>
> --
> Kristian
>
> > PJ
>
>

Re: Derby 10.3.1.4 compiling problems

Posted by Kristian Waagan <Kr...@Sun.COM>.
Paulo Jesus wrote:
> I'm trying to compile derby 10.3.1.4 and I'm continuing having this
> error on build
> 
> BUILD FAILED
> /paulo/svn/10.3/build.xml:335: The following error occurred while
> executing this line:
> /paulo/svn/10.3/java/engine/org/apache/derby/loc/build.xml:36: taskdef
> A class needed by class org.apache.derbyBuild.MessageBuilder cannot be
> found: org/apache/tools/ant/Task
> 
> 
> I have code from
> svn  https://svn.apache.org/repos/asf/db/derby/code/branches/10.3   575672
> and also
> svn  https://svn.apache.org/repos/asf/db/derby/code/trunk   575674
> 
> 
> First run of "ant  " worked fine but second run turns this error.
> Then i run "ant clean"and then again first ok, second not.
> I'm able to start server but not sure if everything went well.
> 
> I can't use ./bin/.. scripts, But always derbynet.jar not found at
> $LOCALCLASSPATH.
> I'm able to compile derbyNet.jar and configure $CLASSPATH and
> $LOCALCLASSPATH.   But to start server i need to do manually.
> 
> 
> I didn't install osgi.jar and SR 169 jars.
> Also i'm not using Java1.6.x
> 
> 
> I'm missing something?

Hello Paulo,

On first sight this looks like a build environment problem.
Are you building from the command line or from withing an IDE?

Can you state which ant version you are using, and verify that your ant 
installation is working properly?


If that's not the problem, just post again!


-- 
Kristian

> PJ