I'm not sure if {1} is correct.
Try ?1
-----Urspr�ngliche Nachricht-----
Von: Rudi [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 26. September 2002 10:37
An: [EMAIL PROTECTED]
Betreff: [Xdoclet-user] ejb:finder, jboss:finder-query tags?
Hi,
I am having troubles using custom finders (with a LIKE construct). I have
tried to solve the issue for several days now,
but cannot seem to get a handle on it.
I have experimented with the 'ejb.finder' and 'jboss.finder-query' tags, to
produce a finder with a parameterized LIKE clause.
my tags look like the following:
* @ejb:finder signature="java.util.Collection
findByNickNamePattern(java.lang.String nickName)"
*
* @jboss:finder-query name="findByNickNamePattern"
* query="SELECT OBJECT(c) FROM aumContactTable AS c
WHERE c.nickName LIKE {1}"
when i call the function findByNickNamePattern i get the following error:
09:51:17,389 ERROR [MasterDataBean] Finder exception
javax.ejb.FinderException: Unknown query: public abstract
java.util.Collection
com.vescon.aum.server.iface.masterdata.ContactLocalHome.findByNickNamePatter
n(java.lang.String) throws javax.ejb.FinderException
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.getQueryCommand(JDBCQueryMan
ager.java:56)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntit
iesCommand.java:38)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntities(JDBCStoreManage
r.java:549)
at
org.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManag
er.java:348)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntitie
s(CachedConnectionInterceptor.java:323)
I also tried some other variants of this finder combination but the result
was always the same.
After that i read in a newsgroup that the following finder-query combination
should work:
* @ejb:finder signature="java.util.Collection
findByNickNamePattern(java.lang.String nickName)"
*
* @jboss:query signature="java.util.Collection
findByNickNamePattern(java.lang.String nickName)"
* query="SELECT OBJECT(c) FROM aumContactTable AS c WHERE
c.nickName LIKE {1}"
but the result of my tests was always the following error when deploying the
service:
09:54:42,434 INFO [EjbModule] Starting
09:54:42,754 WARN [ServiceController] Problem starting service
jboss.j2ee:service=EJB,jndiName=ejb/aum/Address
org.jboss.deployment.DeploymentException: Unknown query method : public
abstract java.util.Collection
com.vescon.aum.server.iface.masterdata.ContactHome.findByNickNamePattern(jav
a.lang.String) throws
javax.ejb.FinderException,java.rmi.RemoteException
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.createJDBCQ
ueryMetaData(JDBCQueryMetaDataFactory.java:71)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntity
MetaData.java:555)
I found out that this error occurs just when using the @jboss:query tag.
What is wrong?
Is there a other way to put an argument to the LIKE-Clause?
If I understand the specs correctly, I cannot have a LIKE-clause with a
variable on the right using standard EJB-QL, no?
thanks in advance,
rudi
PS: I am using XDoclet cvs as of last week, JBoss 3.0.2
--
Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX w�hlen -
und tolle Preise absahnen! http://www.onlinestar.de
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
This e-mail and any attachment is for authorised use by the intended recipient(s)
only. It may contain proprietary material, confidential information and/or be subject
to legal privilege. It should not be copied, disclosed to, retained or used by, any
other party. If you are not an intended recipient then please promptly delete this
e-mail and any attachment and all copies and inform the sender. Thank you.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user