Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Luca Preziati
Deploy portal src 6.0.5 compiler Exception
15 de Setembro de 2010 05:30
Resposta

Luca Preziati

Ranking: Regular Member

Mensagens: 120

Data de entrada: 9 de Fevereiro de 2009

Mensagens recentes

I get this compiler exception:

55: reference to addAll is ambiguous, both method addAll(java.util.Collection<? extends E>) in java.util.Collection<capture#116 of ? super E> and method addAll(java.util.Collection<? extends E>) in java.util.List<capture#116 of ? super E> match copy.addAll(master);

How solve?
Luca Preziati
RE: Deploy portal src 6.0.5
15 de Setembro de 2010 05:05
Resposta

Luca Preziati

Ranking: Regular Member

Mensagens: 120

Data de entrada: 9 de Fevereiro de 2009

Mensagens recentes

I have solved casting the list and the method from:

public static <E> void copy(List<E> master, List<? super E> copy) {
if ((master == null) || (copy == null)) {
return;
}

copy.clear();

copy.addAll(master);
}


become:

public static <E> void copy(List<E> master, List<? super E> copy) {
if ((master == null) || (copy == null)) {
return;
}

copy.clear();

((List<E>)copy).addAll(master);
}
Nguyen Trung Kien
RE: Deploy portal src 6.0.5
9 de Fevereiro de 2011 10:56
Resposta

Nguyen Trung Kien

Ranking: New Member

Mensagens: 9

Data de entrada: 29 de Junho de 2009

Mensagens recentes

Thank Luca, I get this error when deploy liferay portal 6.05...
It is bug,isn't it?
Liferay will fix it in next edition?
Hitoshi Ozawa
RE: Deploy portal src 6.0.5 compiler Exception
9 de Fevereiro de 2011 14:23
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7990

Data de entrada: 23 de Março de 2010

Mensagens recentes

I've build and deployed Liferay 6.0.5 source without any problem. Where have to obtained your source?
Amos Fong
RE: Deploy portal src 6.0.5 compiler Exception
10 de Fevereiro de 2011 00:41
Resposta

Amos Fong

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1844

Data de entrada: 7 de Outubro de 2008

Mensagens recentes

What version of java are you using?
Hitoshi Ozawa
RE: Deploy portal src 6.0.5 compiler Exception
10 de Fevereiro de 2011 18:27
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7990

Data de entrada: 23 de Março de 2010

Mensagens recentes

And of course, if you have created your build.{user name}.properties files.
Roman Hoyenko
RE: Deploy portal src 6.0.5 compiler Exception
31 de Março de 2011 15:50
Resposta

Roman Hoyenko

Ranking: Liferay Master

Mensagens: 868

Data de entrada: 8 de Outubro de 2007

Mensagens recentes

I have the same problem with 6.0.6. I am using java 1.6

I changed build.properties to have

ant.build.javac.source=1.6
ant.build.javac.target=1.6

that's the only change.

The problem is in
liferay-portal-src-6.0.6\portal-service\src\com\liferay\portal\kernel\util\ListUtil.java

we import

import java.util.List;
import java.util.Collection;

and they both have addAll method, so when we call

copy.addAll(master);

it doesn't know which method to call.
Hitoshi Ozawa
RE: Deploy portal src 6.0.5 compiler Exception
31 de Março de 2011 15:58
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7990

Data de entrada: 23 de Março de 2010

Mensagens recentes

ant.build.javac.source=1.5
ant.build.javac.target=1.5


I'm using JDK 1.6 but have set the ant.build.javac=1.5
Solo Imr
RE: Deploy portal src 6.0.5 compiler Exception
2 de Setembro de 2011 15:54
Resposta

Solo Imr

Ranking: Junior Member

Mensagens: 31

Data de entrada: 9 de Outubro de 2008

Mensagens recentes

I have the same problen with 6.0.6 ( liferay-portal-src-6.0.6-20110225.zip )
I have the same configuration that Hitoshi Ozawa ( I'm using JDK 1.6 but have set the ant.build.javac=1.5 )