[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-8642) RESTEasy wizard produces app that doesn't deploy
Joshua Wulf (JIRA)
jira-events at lists.jboss.org
Tue Apr 5 16:47:33 EDT 2011
[ https://issues.jboss.org/browse/JBIDE-8642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593841#comment-12593841 ]
Joshua Wulf commented on JBIDE-8642:
------------------------------------
I wanted a Seam CRUD app, and I wanted a REST interface for the database as well. So I googled through the docs looking for code to cut and paste, and lo and behold - magical wizards that will generate the code for me! :-)
My perception of it was: here's what you do when you want to have a Seam frontend to a database. Here's what you do when you want an app to provide a REST interface. It seemed logical to me that each wizard was for providing that piece of app functionality.
Speaking as a developer from another platform, I would have expected the wizard to automatically put the source in the folder that "just works". Asking me which folder to put the source in would have been very confusing. I was able to ask a GSS guy on IRC, and he helped me move the source. Otherwise I have no idea where it should go, and there is nothing in the docs for those wizards to help me.
> RESTEasy wizard produces app that doesn't deploy
> ------------------------------------------------
>
> Key: JBIDE-8642
> URL: https://issues.jboss.org/browse/JBIDE-8642
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: Webservices
> Affects Versions: 3.2.0.Final
> Environment: JBoss Developer Studio 4
> Reporter: Joshua Wulf
> Assignee: Brian Fitzpatrick
> Fix For: 3.2.x, 3.3.x
>
>
> I follow the instructions to create a basic Seam CRUD app [http://docs.redhat.com/docs/en-US/JBoss_Developer_Studio/4.0/html-single/Seam_Developer_Tools_Reference_Guide/index.html#crud_database_application], then follow the instructions to create a REST webservice [http://docs.redhat.com/docs/en-US/JBoss_Developer_Studio/4.0/html-single/JBoss_Web_Services_User_Guide/index.html#proc-jbt-generate_a_sample_restful_web_service] specifying the Seam CRUD App as the Dynamic Web Project for the RESTEasy wizard.
> 1. The resultant project will not deploy to the Dev Studio's EAP. The RESTEasy wizard creates the REST class in src/hot instead of src/main, and it doesn't deploy to the server. As a result the webapp fails on deploy with a "Class Not Found" error generated by RESTEasy.
> Manually copying the org.jboss.samples.rs.webservices package from src/hot to src/main resolves this problem, and the app deploys successfully.
> I'm not sure why it was created in src/hot, but it seems that the wizard should create it in src/main.
> 2. Once the app deploys, however, neither the webservice nor the seam app work. The RESTEasy wizard adds:
> <servlet-mapping>
> <servlet-name>Resteasy</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
> to the deployment descriptor, and the Seam wizard adds:
> <filter-mapping>
> <filter-name>Seam Filter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> I fixed this by modifying the Resteasy url-pattern to /webservice/* and setting @Path("/webservice") on the HelloWorldResource class created by the RESTEasy wizard.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list