One thing I noticed with the 3.0.x series of JBoss is that if you create a finder method that references the primary key, it balks - loudly. "unknown element found ?1" or somesuch.. hence, you can't do any finders that use the PK. Not sure if the 3.2.x series changed the messages or not.
-----Original Message----- From: Bryce Fischer [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 8:36 AM To: [EMAIL PROTECTED] Subject: [Xdoclet-user] (no subject)
I've got a CMP class that I'm trying to generate a finder method for. I've included the following XDoclet class level tag:
* @ejb.finder signature = "java.util.Collection findByUsername(String username)" * query = "select OBJECT(c) from SysUserItem c where c.username = ?1"
And it seems to generate correct entries in the home interfaces as well as the deployment descriptors. Here's the entry in the ejb-jar.xml file:
<query> <query-method> <method-name>findByUsername</method-name> <method-params> <method-param>String</method-param> </method-params> </query-method> <ejb-ql><![CDATA[select OBJECT(c) from SysUserItem c where c.username = ?1]]></ejb-ql> </query>
JBoss (3.2.1 w/ Tomcat) gives the following error when I attempt to deploy:
Bean : SysUserItem Method : public abstract Collection findByUsername(String) throws FinderException, RemoteException Section: 10.5.6 Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.
11:31:21,921 ERROR [MainDeployer] could not create deployment: file:/C:/obox/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/deploy/server /def ault/deploy/bis-app-1.0.ear/37.bis-app-1.0.ear-contents/ejb-db-1.0.jar org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages. at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:487)
Vincent Bryce Fischer
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user