-
1. Re: Trouble compiling class with generics in 2.3.0.CR1
jfuerth Mar 28, 2013 4:16 PM (in response to mdhirsch30345)1 of 1 people found this helpfulThanks for this report, Michael.
Unfortunately, this does appear to be a regression in Errai IOC. Thanks for catching it before 2.3.0.Final -- we'll add a similar class to our test suite and try to get a fix out ASAP (it will appear first on 2.3.0-SNAPSHOT).
I've created ERRAI-529 in JIRA to track this issue.
-Jonathan
-
2. Re: Trouble compiling class with generics in 2.3.0.CR1
mdhirsch30345 Mar 29, 2013 12:25 PM (in response to jfuerth)Thanks for filing the JIRA issue, Jonathan. It's nice to know it is in the queue.
Michael
-
3. Re: Trouble compiling class with generics in 2.3.0.CR1
csa Apr 3, 2013 4:12 PM (in response to mdhirsch30345)Hi Micheal,
This should be fixed now in the latest 2.3.0-SNAPSHOTs. It would be great if you could give it a try.
Thanks,
Christian
-
4. Re: Trouble compiling class with generics in 2.3.0.CR1
mdhirsch30345 Apr 4, 2013 2:14 PM (in response to csa)Ooh! Shiny! Can't wait to try it.
I looked around, but can't find a 2.3.0-SNAPSHOT in downloadable form. If I were using maven I could just change my pointer, but we are still just using ant.
Is there a zip file that I can use? Or tar.gz? I could have sworn that I'd found one before, but I can't now. Or maybe I am dreaming.
Thanks,
Michael
-
5. Re: Trouble compiling class with generics in 2.3.0.CR1
csa Apr 4, 2013 3:03 PM (in response to mdhirsch30345)Hi,
I attached a distribution zip for the latest 2.3.0-SNAPSHOTs to this message. We have that zip available for the latest stable build but our CI build is already focused on the 3.0 branch which is why you can't find it for 2.3.0.
Thanks,
Christian
-
errai-2.3.0-SNAPSHOT.zip 5.5 MB
-
-
6. Re: Trouble compiling class with generics in 2.3.0.CR1
mdhirsch30345 Apr 22, 2013 11:32 AM (in response to csa)Hi Christian,
I'm sorry for taking so long, but we had a big release to get out the door and I've had no time the last few weekes.
Any way, it is out now, so I compiled against the snapshot and the compile issue is gone. My app also works well and the selenium tests are succeeding, so I have no more issues to report.
Thanks for the quick fix.
Michael
-
7. Re: Trouble compiling class with generics in 2.3.0.CR1
nva Apr 26, 2013 11:38 AM (in response to mdhirsch30345)I'm still getting the compile error on generics with 2.3.0.Final. My last known working version with generics in portable classes is 2.1.1.Final.
[INFO] [ERROR] Errors in '/tmp/com.nvcode-dtt/target/.generated/org/jboss/errai/marshalling/client/api/MarshallerFactoryImpl.java'
[INFO] [ERROR] Line 4104: T cannot be resolved to a typeCheers,
V.
-
8. Re: Trouble compiling class with generics in 2.3.0.CR1
jfuerth Apr 26, 2013 1:12 PM (in response to nva)Hi Valentin,
Looks like we missed a case.
Can you provide the code from the @Portable type that causes this problem? We'll try to get this fixed in the 3.0 branch.
-Jonathan
-
9. Re: Trouble compiling class with generics in 2.3.0.CR1
nva Apr 29, 2013 7:32 AM (in response to jfuerth)Hi Jonathan,
sample code:
@Portable
public class TestDTO<T> {
private Long n;
private List<T> data;
public TestDTO(@MapsTo("n") Long nrItems,
@MapsTo("data") List<T> data) {this.n = nrItems;
this.data = data;
}public Long getNrItems() {
return n;
}public List<T> getData() {
return data;
}
}Cheers,
V.
-
10. Re: Trouble compiling class with generics in 2.3.0.CR1
jfuerth Apr 29, 2013 12:23 PM (in response to nva)Hi Valentin,
I tried adding this class to our test suite on the master branch (working towards Errai 3.0), and it works. There is already a very similar case which has been around for over a year (and was definitely included in the test suite we ran as part of the Errai 2.3.0 releases):
As you can see, this type has a parameter <T> which is referenced in its property "list" of type List<T>.
Are you sure the type parameter is causing the failure? Can you post the generated MarshallerFactoryImpl.java which exhibits this problem? It should be left in the .errai directory after the failed build.
-Jonathan
-
11. Re: Trouble compiling class with generics in 2.3.0.CR1
nva May 22, 2013 6:18 AM (in response to jfuerth)Hi Jonathan,
sorry for the late respone. The case looks just like my code. Running a higher version of Errai 2 fails with this message: 'T cannot be resolved to a type' and there is only one portable class that contains generics in our implementation.
I'm having a problem compiling with Errai 2.3.0.Final at the moment, it looks like there's an unmet GWT 2.5 dependency. Under Errai 2.2.0.Final I get this error:
[INFO] 82. ERROR in /tmp/valentin/errai/e360f0d7cacf4d2bc0ae22a2a61972cf63dadce1/errai.marshalling/gen/org/jboss/errai/marshalling/server/impl/ServerMarshallingFactoryImpl.java (at line 4790)
[INFO] final List<T> c1 = java_util_List.demarshall(obj.get("data"), a1);
[INFO] ^
[INFO] T cannot be resolved to a typeCorresponding MarshallerFactoryImpl: http://pastebin.com/M5ajCZ1N
Corresponding ServerMarshallerFactoryImpl: http://pastebin.com/MWYzsJfw
I need look into the Errai 2.3.0 compilation problem. I'm sure it worked before. We're still on GWT 2.4, unfortunately (other dependencies prevented the move so far).
Errai 2.1.1.Final compiles and works perfectly.
Many thanks!
Cheers,
V.
-
12. Re: Trouble compiling class with generics in 2.3.0.CR1
nva May 23, 2013 6:48 AM (in response to nva)Resolved the GWT 2.5 dependencies, am using GWT 2.5.1 and Errai 2.3.0.Final. The compiler stops with the generics error:
[INFO] 82. ERROR in /tmp/valentin/errai/25efe9683d3f8af0af2940a4376bcf89ad8/errai.marshalling/gen/org/jboss/errai/marshalling/server/impl/ServerMarshallingFactoryImpl.java (at line 4237)
[INFO] final List<T> c1 = java_util_List.demarshall(obj.get("data"), a1);
[INFO] ^
[INFO] T cannot be resolved to a type(Same portable class as in my earlier post.)
Corresponding ServerMarshallerFactoryImpl: http://pastebin.com/hkve64AP
Please let me know what else you need, I'm very keen on getting to the bottom of this problem.
Cheers,
V.
-
13. Re: Trouble compiling class with generics in 2.3.0.CR1
csa May 23, 2013 2:11 PM (in response to nva)Hi Valentin,
We fixed this problem now and published new 2.3.1-SNAPSHOTs. Can you try with the latest snapshots? We plan to release 2.3.1.Final tomorrow afternoon.
Thanks,
Christian
-
14. Re: Trouble compiling class with generics in 2.3.0.CR1
nva May 24, 2013 4:20 AM (in response to csa)Hello Christian,
thanks! It looks like it's working, the marshallers have been generated without any problems. I still have other, GWT 2.5 and GWTP related compiler errors and couldn't build my project yet. However, it's definitely gone much further on 2.3.1-SNAPSHOT than on 2.3.0.Final yesterday. Will report back as soon as I have a fully working build. I think the time zones work to our advantage.
Cheers,
V.