Problem with Classpath

25 views
Skip to first unread message

Christopher Micallef

unread,
Jun 16, 2011, 7:02:07 AM6/16/11
to fornax-...@googlegroups.com
Hi all,

I have the following problem in my project. One of my dependencies uses the Guava library which is a super set of the Google Collections library.
The Google Collections library is a dependency of one of the Fornax plugins. When I run clean install on my project I get the following error:

12:23:07,290  INFO CompositeComponent:100 - Workflow: executing workflow sculptorworkflow.mwe in workflow.mwe:3
12:23:07,291  INFO CompositeComponent:100 - MweReader: loading file from classpath:/model.btdesign
[ERROR] NoSuchMethodError occurred while running workflow: com.google.common.collect.Multimaps.newArrayListMultimap()Lcom/google/common/collect/ArrayListMultimap;

Reason being that the Multimaps class sued from the class file is the one in the Guava library which does not have the method 'newArrayListMultimap'.

I cannot exclude Guava since I will get errors at runtime and I cannot exclude Google Collections since like that my project will not build.

Anyone has any suggestions on what can be done? At this point even a hack will do.

Regards
Chris

Jörg Reichert

unread,
Jun 17, 2011, 3:11:39 AM6/17/11
to Fornax-Platform
Hi Christopher,

as per pom always the hole classplath is used, it is not possible to
exclude the guava dependency when running the fornax-oaw-m2-plugin.
So you have to extract the fornax-oaw-m2-plugin in a separate pom that
can be placed in the same project and that specifies a dependency to
the former pom. The new created pom can define a classpath without the
guava library so the MWE Runner will use the google.collect 0.8
library instead.

Hope that helps.

Joerg

On 16 Jun., 13:02, Christopher Micallef <krosmical...@gmail.com>
wrote:
> Hi all,
>
> I have the following problem in my project. One of my dependencies uses the
> Guava library which is a super set of the Google Collections library.
> The Google Collections library is a dependency of one of the Fornax plugins.
> When I run clean install on my project I get the following error:
>
> 12:23:07,290  INFO CompositeComponent:100 - Workflow: executing workflow
> sculptorworkflow.mwe in workflow.mwe:3
> 12:23:07,291  INFO CompositeComponent:100 - MweReader: loading file from
> classpath:/model.btdesign
> [ERROR] NoSuchMethodError occurred while running workflow:
> com.google.common.collect.Multimaps.newArrayListMultimap()Lcom/google/commo­n/collect/ArrayListMultimap;
Reply all
Reply to author
Forward
0 new messages