You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by lewis john mcgibbney <le...@gmail.com> on 2011/08/04 15:39:28 UTC

java.lang.RuntimeException compile failure with trunk 1153872

Hello,

Over the last couple of months have been experimenting with Gora as a
storage layer for Nutch 2.0 and to date have experienced no real problems
that I thought justified a shout on the dev list, however I'm left
scratching my head here. The list archive doesn't seem to show anyone else
struggling so I'm guessing it's my lack of knowledge of the Gora code base
which is restricting me.

I just checked out the trunk today and upon compiling the code I'm getting a
rather nasty error as follows

BUILD FAILED
/home/lewis/ASF/gora/build.xml:272: The following error occurred while
executing this line:
/home/lewis/ASF/gora/build-common.xml:350: impossible to ivy retrieve:
java.lang.RuntimeException: problem during retrieve of
org.apache.gora#gora-cassandra: java.lang.RuntimeException: Multiple
artifacts of the module org.apache.cassandra#cassandra-thrift;0.8.1 are
retrieved to the same file! Update the retrieve pattern  to fix this error.
    at
org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:206)
    at org.apache.ivy.Ivy.retrieve(Ivy.java:540)
    at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:59)
    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
    at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
    at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:302)
    at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
    at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
    at org.apache.tools.ant.Main.runBuild(Main.java:801)
    at org.apache.tools.ant.Main.startAnt(Main.java:218)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.RuntimeException: Multiple artifacts of the module
org.apache.cassandra#cassandra-thrift;0.8.1 are retrieved to the same file!
Update the retrieve pattern  to fix this error.
    at
org.apache.ivy.core.retrieve.RetrieveEngine.determineArtifactsToCopy(RetrieveEngine.java:360)
    at
org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:104)
    ... 33 more

Looking closer I can see that the <dependency org="org.apache.cassandra"
name="cassandra-thrift" rev="0.8.1"/> exists in
$GORA_HOME/gora-cassandra/ivy/ivy.xml, however what I am puzzled at is from
where else the artefact retrieval is being duplicated?

thank you for any pointers.

-- 
*Lewis*

Re: java.lang.RuntimeException compile failure with trunk 1153872

Posted by Enis Söztutar <en...@gmail.com>.
It may be due to one other project that has already written to the same
file, but with a different revision. The ivy retrive directory and
configuration is defined at build.xml as:

  <property name="ivy.local.default.root"
value="${ivy.default.ivy.user.dir}/local" />
  <property name="ivy.local.default.ivy.pattern"
value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" />
  <property name="ivy.local.default.artifact.pattern"
value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" />

  <property name="ivy.shared.default.root"
value="${ivy.default.ivy.user.dir}/shared" />
  <property name="ivy.shared.default.ivy.pattern"
value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" />
  <property name="ivy.shared.default.artifact.pattern"
value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" />


This means that Gora uses the shared default root directory which is
~/.ivy2/

Can you apply the following patch:
diff --git a/build.xml b/build.xml
index 5810db9..eaa0450 100644
--- a/build.xml
+++ b/build.xml
@@ -301,7 +301,7 @@
   </target>

   <!-- target: clean-cache
================================================ -->
-  <target name="clean-cache" depends=""
+  <target name="clean-cache" depends="ivy-init"
                        description="delete ivy cache">
     <ivy:cleancache />
   </target>

and run
$ ant clean-cache.
and try compiling again. Let us know the results.

ps. you can alternatively do
$rm -rf ~/ivy2/cache

Thanks,
Enis

On Thu, Aug 4, 2011 at 6:48 AM, lewis john mcgibbney <
lewis.mcgibbney@gmail.com> wrote:

> To add to this, line 350 of the imported build-commons.xml into
> $GORA_HOME/gora-cassandra/build.xml reads as follows
>
> 348    <!-- the call to resolve is not mandatory, retrieve makes an
> implicit
> call if we don't -->
> 349    <ivy:resolve file="${ivy.dir}/${ivy.file}" conf="compile"
> log="download-only"/>
> 350    <ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]"
> symlink="true" log="quiet" conf="compile"/>
>
> I am still puzzled about where to edit the retrieve pattern to prevent the
> dependency being fetched from more than one source.
>
> Thank you
>
> Lewis
>
> On Thu, Aug 4, 2011 at 2:39 PM, lewis john mcgibbney <
> lewis.mcgibbney@gmail.com> wrote:
>
> > Hello,
> >
> > Over the last couple of months have been experimenting with Gora as a
> > storage layer for Nutch 2.0 and to date have experienced no real problems
> > that I thought justified a shout on the dev list, however I'm left
> > scratching my head here. The list archive doesn't seem to show anyone
> else
> > struggling so I'm guessing it's my lack of knowledge of the Gora code
> base
> > which is restricting me.
> >
> > I just checked out the trunk today and upon compiling the code I'm
> getting
> > a rather nasty error as follows
> >
> > BUILD FAILED
> > /home/lewis/ASF/gora/build.xml:272: The following error occurred while
> > executing this line:
> > /home/lewis/ASF/gora/build-common.xml:350: impossible to ivy retrieve:
> > java.lang.RuntimeException: problem during retrieve of
> > org.apache.gora#gora-cassandra: java.lang.RuntimeException: Multiple
> > artifacts of the module org.apache.cassandra#cassandra-thrift;0.8.1 are
> > retrieved to the same file! Update the retrieve pattern  to fix this
> error.
> >     at
> >
> org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:206)
> >     at org.apache.ivy.Ivy.retrieve(Ivy.java:540)
> >     at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:59)
> >     at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
> >     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> >     at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
> >     at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >     at java.lang.reflect.Method.invoke(Method.java:616)
> >     at
> >
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> >     at org.apache.tools.ant.Task.perform(Task.java:348)
> >     at org.apache.tools.ant.Target.execute(Target.java:390)
> >     at org.apache.tools.ant.Target.performTasks(Target.java:411)
> >     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
> >     at
> >
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
> >     at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
> >     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
> >     at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:302)
> >     at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
> >     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> >     at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
> >     at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >     at java.lang.reflect.Method.invoke(Method.java:616)
> >     at
> >
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> >     at org.apache.tools.ant.Task.perform(Task.java:348)
> >     at org.apache.tools.ant.Target.execute(Target.java:390)
> >     at org.apache.tools.ant.Target.performTasks(Target.java:411)
> >     at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
> >     at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
> >     at
> >
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> >     at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
> >     at org.apache.tools.ant.Main.runBuild(Main.java:801)
> >     at org.apache.tools.ant.Main.startAnt(Main.java:218)
> >     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
> >     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> > Caused by: java.lang.RuntimeException: Multiple artifacts of the module
> > org.apache.cassandra#cassandra-thrift;0.8.1 are retrieved to the same
> file!
> > Update the retrieve pattern  to fix this error.
> >     at
> >
> org.apache.ivy.core.retrieve.RetrieveEngine.determineArtifactsToCopy(RetrieveEngine.java:360)
> >     at
> >
> org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:104)
> >     ... 33 more
> >
> > Looking closer I can see that the <dependency org="org.apache.cassandra"
> > name="cassandra-thrift" rev="0.8.1"/> exists in
> > $GORA_HOME/gora-cassandra/ivy/ivy.xml, however what I am puzzled at is
> from
> > where else the artefact retrieval is being duplicated?
> >
> > thank you for any pointers.
> >
> > --
> > *Lewis*
> >
> >
>
>
> --
> *Lewis*
>

Re: java.lang.RuntimeException compile failure with trunk 1153872

Posted by lewis john mcgibbney <le...@gmail.com>.
To add to this, line 350 of the imported build-commons.xml into
$GORA_HOME/gora-cassandra/build.xml reads as follows

348    <!-- the call to resolve is not mandatory, retrieve makes an implicit
call if we don't -->
349    <ivy:resolve file="${ivy.dir}/${ivy.file}" conf="compile"
log="download-only"/>
350    <ivy:retrieve pattern="${lib.dir}/[artifact]-[revision].[ext]"
symlink="true" log="quiet" conf="compile"/>

I am still puzzled about where to edit the retrieve pattern to prevent the
dependency being fetched from more than one source.

Thank you

Lewis

On Thu, Aug 4, 2011 at 2:39 PM, lewis john mcgibbney <
lewis.mcgibbney@gmail.com> wrote:

> Hello,
>
> Over the last couple of months have been experimenting with Gora as a
> storage layer for Nutch 2.0 and to date have experienced no real problems
> that I thought justified a shout on the dev list, however I'm left
> scratching my head here. The list archive doesn't seem to show anyone else
> struggling so I'm guessing it's my lack of knowledge of the Gora code base
> which is restricting me.
>
> I just checked out the trunk today and upon compiling the code I'm getting
> a rather nasty error as follows
>
> BUILD FAILED
> /home/lewis/ASF/gora/build.xml:272: The following error occurred while
> executing this line:
> /home/lewis/ASF/gora/build-common.xml:350: impossible to ivy retrieve:
> java.lang.RuntimeException: problem during retrieve of
> org.apache.gora#gora-cassandra: java.lang.RuntimeException: Multiple
> artifacts of the module org.apache.cassandra#cassandra-thrift;0.8.1 are
> retrieved to the same file! Update the retrieve pattern  to fix this error.
>     at
> org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:206)
>     at org.apache.ivy.Ivy.retrieve(Ivy.java:540)
>     at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:59)
>     at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
>     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>     at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:616)
>     at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>     at org.apache.tools.ant.Task.perform(Task.java:348)
>     at org.apache.tools.ant.Target.execute(Target.java:390)
>     at org.apache.tools.ant.Target.performTasks(Target.java:411)
>     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
>     at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
>     at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
>     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
>     at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:302)
>     at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
>     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>     at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:616)
>     at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>     at org.apache.tools.ant.Task.perform(Task.java:348)
>     at org.apache.tools.ant.Target.execute(Target.java:390)
>     at org.apache.tools.ant.Target.performTasks(Target.java:411)
>     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
>     at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
>     at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>     at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
>     at org.apache.tools.ant.Main.runBuild(Main.java:801)
>     at org.apache.tools.ant.Main.startAnt(Main.java:218)
>     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> Caused by: java.lang.RuntimeException: Multiple artifacts of the module
> org.apache.cassandra#cassandra-thrift;0.8.1 are retrieved to the same file!
> Update the retrieve pattern  to fix this error.
>     at
> org.apache.ivy.core.retrieve.RetrieveEngine.determineArtifactsToCopy(RetrieveEngine.java:360)
>     at
> org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:104)
>     ... 33 more
>
> Looking closer I can see that the <dependency org="org.apache.cassandra"
> name="cassandra-thrift" rev="0.8.1"/> exists in
> $GORA_HOME/gora-cassandra/ivy/ivy.xml, however what I am puzzled at is from
> where else the artefact retrieval is being duplicated?
>
> thank you for any pointers.
>
> --
> *Lewis*
>
>


-- 
*Lewis*

Re: java.lang.RuntimeException compile failure with trunk 1153872

Posted by lewis john mcgibbney <le...@gmail.com>.
Thank you for both suggestions.

The patch worked a treat Enis so thank you for this. It is interesting to
discover that the cache was the problem. Compile output supplied as below.

publish-local:
:: delivering :: org.apache.gora#gora-tutorial;working@lewis-01 ::
0.2-incubating :: integration :: Sat Aug 06 18:12:14 BST 2011
    delivering ivy file to
/home/lewis/ASF/gora/gora-tutorial/build/ivy-0.2-incubating.xml
:: publishing :: org.apache.gora#gora-tutorial
    published gora-tutorial to
/home/lewis/.ivy2/local/org.apache.gora/gora-tutorial/0.2-incubating/jars/gora-tutorial.jar
    published ivy to
/home/lewis/.ivy2/local/org.apache.gora/gora-tutorial/0.2-incubating/ivys/ivy.xml
     [echo] project gora-tutorial published locally with version
0.2-incubating

BUILD SUCCESSFUL
Total time: 5 minutes 0 seconds

The question I have though is that what would have caused data to be written
to the cache if it was a clean checkout from svn? I had only tried to
compile the code from clean check out, no changes were made prior to $ant
from $GORA_HOME.

Thanks again for the help on this one.


On Thu, Aug 4, 2011 at 7:18 PM, Alexis <al...@gmail.com> wrote:

> > Looking closer I can see that the <dependency org="org.apache.cassandra"
> > name="cassandra-thrift" rev="0.8.1"/> exists in
> > $GORA_HOME/gora-cassandra/ivy/ivy.xml, however what I am puzzled at is
> from
> > where else the artefact retrieval is being duplicated?
>
> Sometimes if you ask Ivy not to download the javadoc and sources, you
> get the around the error:
>
> <dependency org="org.apache.cassandra" name="cassandra-thrift"
> rev="0.8.1" conf="*->*,!javadoc,!sources"/>
>



-- 
*Lewis*

Re: java.lang.RuntimeException compile failure with trunk 1153872

Posted by Alexis <al...@gmail.com>.
> Looking closer I can see that the <dependency org="org.apache.cassandra"
> name="cassandra-thrift" rev="0.8.1"/> exists in
> $GORA_HOME/gora-cassandra/ivy/ivy.xml, however what I am puzzled at is from
> where else the artefact retrieval is being duplicated?

Sometimes if you ask Ivy not to download the javadoc and sources, you
get the around the error:

<dependency org="org.apache.cassandra" name="cassandra-thrift"
rev="0.8.1" conf="*->*,!javadoc,!sources"/>