I saw you post several times and I post the same question before, but no body answer my question. Now, I tell you my solution for this problem.
I successfully run template war. And test it by jsp page. In the back end, I code query and execute the query. And then I try finder method, it get me "unknown query" error.
You see, in the template project, the author did use finder himself. I guess, at least for JBoss3.0, the server don't know the syntax of the query which is generated by xdoclet. If you still want to use xdoclet and template project as template, you can try ejb-ql instead of just query.
I give up the template project and make gangster sample project work fine. You need a new build.xml and jsp page for gangster project display on 8080 port
Ok I believe I have finally figured out the correct solution to this issue. Disregard my previous post about using the @jboss.finder-query tag. Use of that tag is restricted to CMP1 and only writes query information into jaws.xml.
I had to upgrade to xdoclet 1.2.0 beta 1 and update my build.xml and a few tags to work with the new xdoclet.
I used xdoclet's new "schema" parameter in the @ejb.bean tag to set the bean's abstract schema name properly (for example, I had a UserBean so I added the tag @ejb.bean schema="User"). That fix resolved the deploy error I was getting that was something like 'found "User" but was expecting "IN"...'.
I then changed my finder query tags back so they now look something like:
@ejb.finder signature="User findByName(java.lang.String name)" view-type="remote" method-intf="Home" result-type-mapping="Remote" query="SELECT DISTINCT OBJECT(u) FROM User u WHERE u.name = ?1"
I am now able to successfully deploy and use my finder queries. I hope that helps you resolve your problems.
oops, I just checked and realized I made a mistake when I referred to the @ejb.bean schema parameter as new to xdoclet 1.2.0. It is present in xdoclet 1.1.2, but for some reason I didn't notice it until the new version.
If you add schema="ebcounter" to your @ejb.bean tag, you might be able to stick with xdoclet 1.1.2 and still resolve your issues by moving your ejb-ql query from the @jboss.finder-query tag back to the @ejb.finder tag (like you had it before).
I haven't gone back and tested my code with the old xdoclet so I can't say with certainty that this will work, but it might be worth a shot if you are dead-set on sticking with xdoclet 1.1.2.
Super, now it works well! Thanks Clarke.