Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generic parameters with Tapestry 5.4 #8

Open
dmitrygusev opened this issue Mar 10, 2017 · 6 comments
Open

Generic parameters with Tapestry 5.4 #8

dmitrygusev opened this issue Mar 10, 2017 · 6 comments

Comments

@dmitrygusev
Copy link

Did anybody observe generic parameters issue with Tapestry 5.4?

https://issues.apache.org/jira/browse/TAP5-2576

Is there any known workarounds?

@dmitrygusev
Copy link
Author

The workaround that worked for us is to create a plain (non-generic) wrapper class with generic fields.

@ascandroli
Copy link
Member

Just create your resources as an interface and its implementation and use the jax-rs annotations in the interface that should be enough. The autodiscovery process should pick them up.

There is a very simple example of this in my old archetype: https://github.com/amneris/tynamo-archetype/tree/master/src/main/resources/archetype-resources/src/main/java/api

If you want more details about all the options available check the tests, for your case in particular check AutodiscoverableNotBoundButReloadableResource.java

I know is more verbose than the

@ascandroli
Copy link
Member

On a second reading I think that probably that's not your case. Can you provide a failing test for your issue or post a complete code sample of your resource so I can better understand the issue.

@dmitrygusev
Copy link
Author

Sorry, I should have cross linked this to tapestry JIRA: https://issues.apache.org/jira/browse/TAP5-2576

You can find more details there.

@dmitrygusev
Copy link
Author

My bad, I actually did that in the first comment :facepalm

I'll see if I can create a test for it

dmitrygusev added a commit to satago/tapestry-resteasy that referenced this issue Apr 1, 2017
dmitrygusev added a commit to satago/tapestry-resteasy that referenced this issue Apr 1, 2017
@dmitrygusev
Copy link
Author

There you go: #10 is a simple example to reproduce the error, and possible workaround for library users how to avoid the error.

@kaosko kaosko mentioned this issue Sep 2, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants