Home » Archived » COSMOS » Failed trying to regenerate the samples - some handholding required...
| | | | |
Re: Failed trying to regenerate the samples - some handholding required... [message #9270 is a reply to message #8572] |
Mon, 06 August 2007 23:19   |
Eclipse User |
|
|
|
Originally posted by: david_whiteman.us.ibm.com
Michael Moser wrote:
> 2.) apparently, some part of the build-file assumes the DB to be created
> in a subdirectory of the project, that contains the build.xml file, not
> where the "lib.dir" property points to (which, in my case, is in a
> subdirectory of the tomcat-webapp).
Try setting the value of derby.system.home on the command line of the
Ant launch script to the location of your derby database directory. For
example:
-Dderby.system.home=C:\apache-tomcat-5.5.23\webapps\database
|
|
|
Re: Failed trying to regenerate the samples - some handholding required... [message #9338 is a reply to message #9270] |
Wed, 08 August 2007 13:32   |
Michael Moser Messages: 914 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C7D9D1.4DB2BC60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
"David Whiteman" <david_whiteman@us.ibm.com> wrote in message =
news:f98aa9$uiq$1@build.eclipse.org...
>...
> Try setting the value of derby.system.home on the command line of the=20
> Ant launch script to the location of your derby database directory. =
For=20
> example:
>=20
> -Dderby.system.home=3DC:\apache-tomcat-5.5.23\webapps\databa se
I was actually trying to run these scripts from within eclipse (i.e. =
right-clicking on them in the Package explorer and then Run as... =3D> =
ANT build), not on the command line.
So I first tried the corresponding equivalent of the above definition =
and added "derby.system.home" as an additional ANT property (using =
Windows =3D> Preferences =3D> Ant =3D> Runtime =3D> Properties tab). =
Alas, that didn't change anything.
However, analyzing the script a bit further I figured out, that the =
failing operation is actually the very last anyway. I.e. after the =
creation of the DB its content is for some reason zip-ed up as a jar =
which is placed into the project's home directory. I don't quite =
understand what that's good for (backup of the virgin DB?) but if I =
understand this correct, then this line shouldn't change anything anyway =
with respect to the later running tomcat, serving data from that DB, =
should it?
What I thus did was prefixing the basedir-value with the above property, =
i.e.:
<target name=3D"jarup">=20
<zip destfile=3D"cosmosdb.jar"
basedir=3D"${derby.system.home}/cosmosdb"/>
<echo message=3D"Finished building cosmosdb"/>
</target>
And after that change I indeed got:
Buildfile: =
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\build.xml
buildschema:
jarup:
[zip] Building zip: =
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\cosmosdb.jar
[echo] Finished building cosmosdb
cosmosdb:
BUILD SUCCESSFUL
Total time: 4 seconds
So, can you confirm that I didn't modify the semantic here, i.e. that =
this script still does what the original script has been intended to do?
Why is the freshly created DB zipped up and copied over to the project's =
directory? Who or what tool is supposed to use it there?
Regards,
Michael
------=_NextPart_000_0009_01C7D9D1.4DB2BC60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16481" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><BR><FONT face=3DArial size=3D2>"David Whiteman"=20
<david_whiteman@us.ibm.com> wrote in message=20
news:f98aa9$uiq$1@build.eclipse.org...<BR>>...<BR>> Try setting =
the value=20
of derby.system.home on the command line of the <BR>> Ant launch =
script to=20
the location of your derby database directory. For <BR>>=20
example:<BR>> <BR>>=20
-Dderby.system.home=3DC:\apache-tomcat-5.5.23\webapps\databa se <BR><BR>I =
was=20
actually trying to run these scripts from within eclipse (i.e. =
right-clicking on=20
them in the Package explorer and then Run as... =3D> ANT build), not =
on the=20
command line.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So I first tried the corresponding =
equivalent of=20
the above definition and </FONT><FONT face=3DArial size=3D2>added=20
"derby.system.home" as an additional ANT property (using Windows =3D> =
Preferences =3D> Ant =3D> Runtime =3D> Properties tab). Alas, =
that didn't=20
change anything.<BR><BR>However, analyzing the script a bit further I =
figured=20
out, that the failing operation is actually the very last anyway. I.e. =
after the=20
creation of the DB its content is for some reason zip-ed up as a jar =
which is=20
placed into the project's home directory. </FONT><FONT face=3DArial =
size=3D2>I=20
don't quite understand what that's good for (backup of the virgin DB?) =
but if I=20
understand this correct, then this line shouldn't change =
anything=20
anyway with respect to the later running tomcat, serving data from that =
DB,=20
should it?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>What I thus did was prefixing the=20
basedir-value with the above property, i.e.:<BR><BR><target =
name=3D"jarup">=20
<BR><zip destfile=3D"cosmosdb.jar"<BR>basedir=3D"<FONT=20
color=3D#ff0000>${derby.system.home}/</FONT>cosmosdb"/> <BR><echo=20
message=3D"Finished building =
cosmosdb"/><BR></target></FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT><BR><FONT face=3DArial =
size=3D2>And after that=20
change I indeed got:<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Buildfile:=20
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\build.xml<BR>buildschema:<BR >jarup:<BR>[zip]=
=20
Building zip:=20
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\cosmosdb.jar<BR>[echo]=20
Finished building cosmosdb<BR>cosmosdb:<BR>BUILD SUCCESSFUL<BR>Total =
time: 4=20
seconds<BR><BR>So, can you confirm that I didn't modify the =
semantic here,=20
i.e. that </FONT><FONT face=3DArial size=3D2>this script still =
does what the=20
original script has been intended to do?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why is the freshly created DB zipped up =
and copied=20
over to the project's directory? Who or what tool is supposed to use it=20
there?</FONT></DIV><FONT face=3DArial size=3D2>
<DIV><BR>Regards,<BR>Michael</DIV>
<DIV></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0009_01C7D9D1.4DB2BC60--
|
|
|
Re: Failed trying to regenerate the samples - some handholding required... [message #9361 is a reply to message #9338] |
Wed, 08 August 2007 15:43   |
Eclipse User |
|
|
|
Originally posted by: david_whiteman.us.ibm.com
Michael Moser wrote:
>
> "David Whiteman" <david_whiteman@us.ibm.com> wrote in message
> news:f98aa9$uiq$1@build.eclipse.org...
> >...
> > Try setting the value of derby.system.home on the command line of the
> > Ant launch script to the location of your derby database directory. For
> > example:
> >
> > -Dderby.system.home=C:\apache-tomcat-5.5.23\webapps\database
>
> I was actually trying to run these scripts from within eclipse (i.e.
> right-clicking on them in the Package explorer and then Run as... => ANT
> build), not on the command line.
> So I first tried the corresponding equivalent of the above definition
> and added "derby.system.home" as an additional ANT property (using
> Windows => Preferences => Ant => Runtime => Properties tab). Alas, that
> didn't change anything.
I run them within Eclipse too, but when you run an Ant script there, it
shows up as a launch configuration. So I edit the launch configuration
on the Run... menu to set any command line arguments. I'm not convinced
setting it as an Ant property is the same as setting a command line
argument.
> However, analyzing the script a bit further I figured out, that the
> failing operation is actually the very last anyway. I.e. after the
> creation of the DB its content is for some reason zip-ed up as a jar
> which is placed into the project's home directory. I don't quite
> understand what that's good for (backup of the virgin DB?) but if I
> understand this correct, then this line shouldn't change anything anyway
> with respect to the later running tomcat, serving data from that DB,
> should it?
>
> What I thus did was prefixing the basedir-value with the above property,
> i.e.:
>
> <target name="jarup">
> <zip destfile="cosmosdb.jar"
> basedir="${derby.system.home}/cosmosdb"/>
> <echo message="Finished building cosmosdb"/>
> </target>
>
> And after that change I indeed got:
> Buildfile:
> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\build.xml
> buildschema:
> jarup:
> [zip] Building zip:
> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\cosmosdb.jar
> [echo] Finished building cosmosdb
> cosmosdb:
> BUILD SUCCESSFUL
> Total time: 4 seconds
>
> So, can you confirm that I didn't modify the semantic here, i.e. that
> this script still does what the original script has been intended to do?
> Why is the freshly created DB zipped up and copied over to the project's
> directory? Who or what tool is supposed to use it there?
I'll have to defer to one of the data collection experts on these
questions...
David
|
|
|
Re: Failed trying to regenerate the samples - some handholding required... [message #9384 is a reply to message #9361] |
Wed, 08 August 2007 18:22   |
Hubert Leung Messages: 13 Registered: July 2009 |
Junior Member |
|
|
In response to the question about jarring up the database directory, I have
always been using the derby database without making the database a jar file.
Since I wasn't the creator of this script, I'm not sure what is the purpose
of this step. There may be a derby feature that allows the database
directory to be jarred up. But it is safe to ignore that error, or remove
the step for jarring up the database directory. I will open a bug to
address this problem.
Thanks,
Hubert
"David Whiteman" <david_whiteman@us.ibm.com> wrote in message
news:f9coan$3ob$1@build.eclipse.org...
> Michael Moser wrote:
>>
>> "David Whiteman" <david_whiteman@us.ibm.com> wrote in message
>> news:f98aa9$uiq$1@build.eclipse.org...
>> >...
>> > Try setting the value of derby.system.home on the command line of the
>> > Ant launch script to the location of your derby database directory.
>> For
>> > example:
>> >
>> > -Dderby.system.home=C:\apache-tomcat-5.5.23\webapps\database
>>
>> I was actually trying to run these scripts from within eclipse (i.e.
>> right-clicking on them in the Package explorer and then Run as... => ANT
>> build), not on the command line.
>> So I first tried the corresponding equivalent of the above definition and
>> added "derby.system.home" as an additional ANT property (using Windows =>
>> Preferences => Ant => Runtime => Properties tab). Alas, that didn't
>> change anything.
>
> I run them within Eclipse too, but when you run an Ant script there, it
> shows up as a launch configuration. So I edit the launch configuration on
> the Run... menu to set any command line arguments. I'm not convinced
> setting it as an Ant property is the same as setting a command line
> argument.
>
>> However, analyzing the script a bit further I figured out, that the
>> failing operation is actually the very last anyway. I.e. after the
>> creation of the DB its content is for some reason zip-ed up as a jar
>> which is placed into the project's home directory. I don't quite
>> understand what that's good for (backup of the virgin DB?) but if I
>> understand this correct, then this line shouldn't change anything anyway
>> with respect to the later running tomcat, serving data from that DB,
>> should it?
>> What I thus did was prefixing the basedir-value with the above property,
>> i.e.:
>>
>> <target name="jarup">
>> <zip destfile="cosmosdb.jar"
>> basedir="${derby.system.home}/cosmosdb"/>
>> <echo message="Finished building cosmosdb"/>
>> </target>
>>
>> And after that change I indeed got:
>> Buildfile:
>> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\build.xml
>> buildschema:
>> jarup:
>> [zip] Building zip:
>> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\cosmosdb.jar
>> [echo] Finished building cosmosdb
>> cosmosdb:
>> BUILD SUCCESSFUL
>> Total time: 4 seconds
>>
>> So, can you confirm that I didn't modify the semantic here, i.e. that
>> this script still does what the original script has been intended to do?
>> Why is the freshly created DB zipped up and copied over to the project's
>> directory? Who or what tool is supposed to use it there?
>
> I'll have to defer to one of the data collection experts on these
> questions...
>
> David
|
|
| |
Re: Failed trying to regenerate the samples - some handholding required... [message #9434 is a reply to message #9408] |
Fri, 10 August 2007 20:06  |
Eclipse User |
|
|
|
Originally posted by: david_whiteman.us.ibm.com
Michael Moser wrote:
> Where exactly do you enter these?
>
> To test your suggestion I removed my prior modification in the
> build.xml and then entered
> "-Dderby.system.home=C:\Tomcat_5.5\webapps\database" (which is the path
> on my system)
>
> first, on the ant launch config's Main tab (under Arguments) - that did
> not work - and
> then I tried on the JRE tab (under VM arguments) - that did not work
> either - and
> lastly I tried on the Environment tab and added the above as an
> environment variable. No success either.
>
> So where whould this be entered???
>
> Michael
Since it's an Ant script referring to a variable, I would expect you
could enter it in the Arguments field on the Main tab. I created a
simple Ant script where I echo'd a variable "foo" and in the launch
config passed its value in the Arguments field as "-dfoo=bar" and the
value printed was "bar". So I was expecting something similar to work
for you, since the Ant script you're running uses ${derby.system.home}.
I know that I needed to do that when I created the OSG debug environment
launch configuration described in the End-to-End scenario
documentation on the wiki.
David
|
|
| | | | | |
Re: Failed trying to regenerate the samples - some handholding required... [message #570326 is a reply to message #9270] |
Wed, 08 August 2007 13:32  |
Michael Moser Messages: 914 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C7D9D1.4DB2BC60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
"David Whiteman" <david_whiteman@us.ibm.com> wrote in message =
news:f98aa9$uiq$1@build.eclipse.org...
>...
> Try setting the value of derby.system.home on the command line of the=20
> Ant launch script to the location of your derby database directory. =
For=20
> example:
>=20
> -Dderby.system.home=3DC:\apache-tomcat-5.5.23\webapps\databa se
I was actually trying to run these scripts from within eclipse (i.e. =
right-clicking on them in the Package explorer and then Run as... =3D> =
ANT build), not on the command line.
So I first tried the corresponding equivalent of the above definition =
and added "derby.system.home" as an additional ANT property (using =
Windows =3D> Preferences =3D> Ant =3D> Runtime =3D> Properties tab). =
Alas, that didn't change anything.
However, analyzing the script a bit further I figured out, that the =
failing operation is actually the very last anyway. I.e. after the =
creation of the DB its content is for some reason zip-ed up as a jar =
which is placed into the project's home directory. I don't quite =
understand what that's good for (backup of the virgin DB?) but if I =
understand this correct, then this line shouldn't change anything anyway =
with respect to the later running tomcat, serving data from that DB, =
should it?
What I thus did was prefixing the basedir-value with the above property, =
i.e.:
<target name=3D"jarup">=20
<zip destfile=3D"cosmosdb.jar"
basedir=3D"${derby.system.home}/cosmosdb"/>
<echo message=3D"Finished building cosmosdb"/>
</target>
And after that change I indeed got:
Buildfile: =
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\build.xml
buildschema:
jarup:
[zip] Building zip: =
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\cosmosdb.jar
[echo] Finished building cosmosdb
cosmosdb:
BUILD SUCCESSFUL
Total time: 4 seconds
So, can you confirm that I didn't modify the semantic here, i.e. that =
this script still does what the original script has been intended to do?
Why is the freshly created DB zipped up and copied over to the project's =
directory? Who or what tool is supposed to use it there?
Regards,
Michael
------=_NextPart_000_0009_01C7D9D1.4DB2BC60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16481" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><BR><FONT face=3DArial size=3D2>"David Whiteman"=20
<david_whiteman@us.ibm.com> wrote in message=20
news:f98aa9$uiq$1@build.eclipse.org...<BR>>...<BR>> Try setting =
the value=20
of derby.system.home on the command line of the <BR>> Ant launch =
script to=20
the location of your derby database directory. For <BR>>=20
example:<BR>> <BR>>=20
-Dderby.system.home=3DC:\apache-tomcat-5.5.23\webapps\databa se <BR><BR>I =
was=20
actually trying to run these scripts from within eclipse (i.e. =
right-clicking on=20
them in the Package explorer and then Run as... =3D> ANT build), not =
on the=20
command line.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So I first tried the corresponding =
equivalent of=20
the above definition and </FONT><FONT face=3DArial size=3D2>added=20
"derby.system.home" as an additional ANT property (using Windows =3D> =
Preferences =3D> Ant =3D> Runtime =3D> Properties tab). Alas, =
that didn't=20
change anything.<BR><BR>However, analyzing the script a bit further I =
figured=20
out, that the failing operation is actually the very last anyway. I.e. =
after the=20
creation of the DB its content is for some reason zip-ed up as a jar =
which is=20
placed into the project's home directory. </FONT><FONT face=3DArial =
size=3D2>I=20
don't quite understand what that's good for (backup of the virgin DB?) =
but if I=20
understand this correct, then this line shouldn't change =
anything=20
anyway with respect to the later running tomcat, serving data from that =
DB,=20
should it?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>What I thus did was prefixing the=20
basedir-value with the above property, i.e.:<BR><BR><target =
name=3D"jarup">=20
<BR><zip destfile=3D"cosmosdb.jar"<BR>basedir=3D"<FONT=20
color=3D#ff0000>${derby.system.home}/</FONT>cosmosdb"/> <BR><echo=20
message=3D"Finished building =
cosmosdb"/><BR></target></FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT><BR><FONT face=3DArial =
size=3D2>And after that=20
change I indeed got:<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Buildfile:=20
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\build.xml<BR>buildschema:<BR >jarup:<BR>[zip]=
=20
Building zip:=20
C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.loca=
l.registry\persistence_setup\cosmosdb.jar<BR>[echo]=20
Finished building cosmosdb<BR>cosmosdb:<BR>BUILD SUCCESSFUL<BR>Total =
time: 4=20
seconds<BR><BR>So, can you confirm that I didn't modify the =
semantic here,=20
i.e. that </FONT><FONT face=3DArial size=3D2>this script still =
does what the=20
original script has been intended to do?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why is the freshly created DB zipped up =
and copied=20
over to the project's directory? Who or what tool is supposed to use it=20
there?</FONT></DIV><FONT face=3DArial size=3D2>
<DIV><BR>Regards,<BR>Michael</DIV>
<DIV></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0009_01C7D9D1.4DB2BC60--
|
|
|
Re: Failed trying to regenerate the samples - some handholding required... [message #570396 is a reply to message #9338] |
Wed, 08 August 2007 15:43  |
David Whiteman Messages: 166 Registered: July 2009 |
Senior Member |
|
|
Michael Moser wrote:
>
> "David Whiteman" <david_whiteman@us.ibm.com> wrote in message
> news:f98aa9$uiq$1@build.eclipse.org...
> >...
> > Try setting the value of derby.system.home on the command line of the
> > Ant launch script to the location of your derby database directory. For
> > example:
> >
> > -Dderby.system.home=C:\apache-tomcat-5.5.23\webapps\database
>
> I was actually trying to run these scripts from within eclipse (i.e.
> right-clicking on them in the Package explorer and then Run as... => ANT
> build), not on the command line.
> So I first tried the corresponding equivalent of the above definition
> and added "derby.system.home" as an additional ANT property (using
> Windows => Preferences => Ant => Runtime => Properties tab). Alas, that
> didn't change anything.
I run them within Eclipse too, but when you run an Ant script there, it
shows up as a launch configuration. So I edit the launch configuration
on the Run... menu to set any command line arguments. I'm not convinced
setting it as an Ant property is the same as setting a command line
argument.
> However, analyzing the script a bit further I figured out, that the
> failing operation is actually the very last anyway. I.e. after the
> creation of the DB its content is for some reason zip-ed up as a jar
> which is placed into the project's home directory. I don't quite
> understand what that's good for (backup of the virgin DB?) but if I
> understand this correct, then this line shouldn't change anything anyway
> with respect to the later running tomcat, serving data from that DB,
> should it?
>
> What I thus did was prefixing the basedir-value with the above property,
> i.e.:
>
> <target name="jarup">
> <zip destfile="cosmosdb.jar"
> basedir="${derby.system.home}/cosmosdb"/>
> <echo message="Finished building cosmosdb"/>
> </target>
>
> And after that change I indeed got:
> Buildfile:
> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\build.xml
> buildschema:
> jarup:
> [zip] Building zip:
> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\cosmosdb.jar
> [echo] Finished building cosmosdb
> cosmosdb:
> BUILD SUCCESSFUL
> Total time: 4 seconds
>
> So, can you confirm that I didn't modify the semantic here, i.e. that
> this script still does what the original script has been intended to do?
> Why is the freshly created DB zipped up and copied over to the project's
> directory? Who or what tool is supposed to use it there?
I'll have to defer to one of the data collection experts on these
questions...
David
|
|
|
Re: Failed trying to regenerate the samples - some handholding required... [message #570416 is a reply to message #9361] |
Wed, 08 August 2007 18:22  |
Hubert Leung Messages: 13 Registered: July 2009 |
Junior Member |
|
|
In response to the question about jarring up the database directory, I have
always been using the derby database without making the database a jar file.
Since I wasn't the creator of this script, I'm not sure what is the purpose
of this step. There may be a derby feature that allows the database
directory to be jarred up. But it is safe to ignore that error, or remove
the step for jarring up the database directory. I will open a bug to
address this problem.
Thanks,
Hubert
"David Whiteman" <david_whiteman@us.ibm.com> wrote in message
news:f9coan$3ob$1@build.eclipse.org...
> Michael Moser wrote:
>>
>> "David Whiteman" <david_whiteman@us.ibm.com> wrote in message
>> news:f98aa9$uiq$1@build.eclipse.org...
>> >...
>> > Try setting the value of derby.system.home on the command line of the
>> > Ant launch script to the location of your derby database directory.
>> For
>> > example:
>> >
>> > -Dderby.system.home=C:\apache-tomcat-5.5.23\webapps\database
>>
>> I was actually trying to run these scripts from within eclipse (i.e.
>> right-clicking on them in the Package explorer and then Run as... => ANT
>> build), not on the command line.
>> So I first tried the corresponding equivalent of the above definition and
>> added "derby.system.home" as an additional ANT property (using Windows =>
>> Preferences => Ant => Runtime => Properties tab). Alas, that didn't
>> change anything.
>
> I run them within Eclipse too, but when you run an Ant script there, it
> shows up as a launch configuration. So I edit the launch configuration on
> the Run... menu to set any command line arguments. I'm not convinced
> setting it as an Ant property is the same as setting a command line
> argument.
>
>> However, analyzing the script a bit further I figured out, that the
>> failing operation is actually the very last anyway. I.e. after the
>> creation of the DB its content is for some reason zip-ed up as a jar
>> which is placed into the project's home directory. I don't quite
>> understand what that's good for (backup of the virgin DB?) but if I
>> understand this correct, then this line shouldn't change anything anyway
>> with respect to the later running tomcat, serving data from that DB,
>> should it?
>> What I thus did was prefixing the basedir-value with the above property,
>> i.e.:
>>
>> <target name="jarup">
>> <zip destfile="cosmosdb.jar"
>> basedir="${derby.system.home}/cosmosdb"/>
>> <echo message="Finished building cosmosdb"/>
>> </target>
>>
>> And after that change I indeed got:
>> Buildfile:
>> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\build.xml
>> buildschema:
>> jarup:
>> [zip] Building zip:
>> C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.c osmos.dc.local.registry\persistence_setup\cosmosdb.jar
>> [echo] Finished building cosmosdb
>> cosmosdb:
>> BUILD SUCCESSFUL
>> Total time: 4 seconds
>>
>> So, can you confirm that I didn't modify the semantic here, i.e. that
>> this script still does what the original script has been intended to do?
>> Why is the freshly created DB zipped up and copied over to the project's
>> directory? Who or what tool is supposed to use it there?
>
> I'll have to defer to one of the data collection experts on these
> questions...
>
> David
|
|
| | |
Goto Forum:
Current Time: Thu Dec 07 13:29:25 GMT 2023
Powered by FUDForum. Page generated in 0.03893 seconds
|