構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Luca Preziati
Deploy portal src 6.0.5 compiler Exception
2010/09/15 5:30
答え

Luca Preziati

ランク: Regular Member

投稿: 120

参加年月日: 2009/02/09

最近の投稿

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
2010/09/15 5:05
答え

Luca Preziati

ランク: Regular Member

投稿: 120

参加年月日: 2009/02/09

最近の投稿

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
2011/02/09 10:56
答え

Nguyen Trung Kien

ランク: New Member

投稿: 9

参加年月日: 2009/06/29

最近の投稿

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
2011/02/09 14:23
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7949

参加年月日: 2010/03/23

最近の投稿

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
2011/02/10 0:41
答え

Amos Fong

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1898

参加年月日: 2008/10/07

最近の投稿

What version of java are you using?
Hitoshi Ozawa
RE: Deploy portal src 6.0.5 compiler Exception
2011/02/10 18:27
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7949

参加年月日: 2010/03/23

最近の投稿

And of course, if you have created your build.{user name}.properties files.
Roman Hoyenko
RE: Deploy portal src 6.0.5 compiler Exception
2011/03/31 15:50
答え

Roman Hoyenko

Community Moderator

ランク: Liferay Master

投稿: 868

参加年月日: 2007/10/08

最近の投稿

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
2011/03/31 15:58
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7949

参加年月日: 2010/03/23

最近の投稿

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
2011/09/02 15:54
答え

Solo Imr

ランク: Junior Member

投稿: 38

参加年月日: 2008/10/09

最近の投稿

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 )