Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 51925 invoked from network); 26 Oct 2006 07:28:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 07:28:04 -0000 Received: (qmail 79464 invoked by uid 500); 24 Oct 2006 10:48:15 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 79446 invoked by uid 500); 24 Oct 2006 10:48:15 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 79435 invoked by uid 99); 24 Oct 2006 10:48:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 03:48:15 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.12.11.96] (HELO smtp007.mail.ukl.yahoo.com) (217.12.11.96) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Oct 2006 03:48:03 -0700 Received: (qmail 74062 invoked from network); 24 Oct 2006 10:47:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:X-Enigmail-Version:Content-Type:Content-Transfer-Encoding; b=SPAkCK906a15RE9wMHcJlZCZw6X2L5it6CyDb2ATE7WwCdCy3/X4cLEEfqitw1i3BzmVpOU6jgVL6a2BgIHCiYrIuY0Ra105XPW44hXxBh/i49AA+BSkKc3fwvb7akh0WQTALO5a34GEiQpMXpxbGzAD5yfHIX+6zoihqL7x8W8= ; Received: from unknown (HELO ?83.221.231.2?) (kaeto23@83.221.231.2 with plain) by smtp007.mail.ukl.yahoo.com with SMTP; 24 Oct 2006 10:47:41 -0000 Message-ID: <453DEF47.7030500@yahoo.de> Date: Tue, 24 Oct 2006 12:47:35 +0200 From: Kaeto23 User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: ejbSelect tutorial? References: <4538BEA3.5020905@yahoo.de> <7B8FD445-F82F-461D-AFA4-057F0F42DA29@optusnet.com.au> <453DC551.9060303@yahoo.de> <68B09ADB-71A2-46A3-A35F-9787171A37C9@yahoo.com> In-Reply-To: <68B09ADB-71A2-46A3-A35F-9787171A37C9@yahoo.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Hello, David if you're right (of cource, you are :P) then somebody at http://tranql.codehaus.org/Download hasn't considered an update of that page "for quite a while". Fortunately, the pom script from the svn repo contained a url that I tried: http://snapshots.repository.codehaus.org/org/tranql/tranql/1.4-SNAPSHOT/ The file date of the 1.4 snapshot was Oct, the 22., so I grabbed that file and included it into geronimo. Some things about the TranQL trunk: seems that some files are not yet ready to compile. At least my compiler tells me that you forgot to implement some abstract methods -> compile failed. See DatasourceDelegate from the tranql/sql package (one of many files). Best regards Dirk David Jencks schrieb: > Tranql has been on svn for quite a while. > > try > svn co https://svn.codehaus.org/tranql/tranql > > You might need one more directory (https://svn.codehaus.org/tranql) if > building complains about missing tranql-parent. > > The build is on maven 2 now also. > > I thought these were published, they'd probably be in the codehaus m2 repo. > > thanks > david jencks > > On Oct 24, 2006, at 12:48 AM, Kaeto23 wrote: > > Hello, Gianny > > can you point me to where to grab the new jar? I tried the download at > codehaus.org but the file date for the 1.4 snapshot is July 2006?? And > funnily I can't access the cvs (Could not connect to > :pserver:anonymous@cvs.tranql.codehaus.org:/home/projects/tranql/scm: > I/O exception occurred: Connection refused: /home/projects/tranql/scm: > no such repository > ). > > Regards > > Dirk > > Gianny Damour schrieb: >>>> Hi, >>>> >>>> Thanks for reporting these problems. They are now fixed in HEAD of >>>> TranQL. Could you please download the latest TranQL-1.4-SNAPSHOT >>>> artifact and confirm that these problems are now fixed? You can simply >>>> drop this artifact in your repository and Geronimo will pick it up as it >>>> is the latest available version (thanks David J. for the hint). >>>> >>>> The Apache JIRA infrastructure is down at the moment. I will open two >>>> issues to track them when JIRA will become available. >>>> >>>> Thanks for your patience, >>>> Gianny >>>> >>>> On 20/10/2006, at 10:18 PM, Kaeto23 wrote: >>>> >>>>> Hello, >>>>> >>>>> OK, I tried your way now and at least Geronimo keeps talking to me. The >>>>> stacktrace now reads as follows: >>>>> >>>>> Caused by: org.tranql.ql.QueryException: Select [Select >>>>> method=[ejbSelectForumPostsNum]; EJB-QL=[select distinct count(p.id) >>>>> from Post as p where p.thread.forum.id=?1]] does not return a EJB and >>>>> defines the prefetch group [Default]. >>>>> at >>>>> org.tranql.builder.SQLQueryBuilder.buildSelects(SQLQueryBuilder.java:224) >>>>> >>>>> at >>>>> org.openejb.deployment.CMPContainerBuilder.buildIt(CMPContainerBuilder.java:311) >>>>> >>>>> >>>>> at >>>>> org.openejb.deployment.AbstractContainerBuilder.createConfiguration(AbstractContainerBuilder.java:354) >>>>> >>>>> >>>>> at >>>>> org.openejb.deployment.CMPEntityBuilder.createBean(CMPEntityBuilder.java:213) >>>>> >>>>> >>>>> ... 32 more >>>>> >>>>> >>>>> It seems Geronimo wants a EJB in return. Counting is still a problem ;) >>>>> >>>>> I just consider to switch to JOnAS or JBoss ;) >>>>> >>>>> Milan: how did you count the EJBs? Do you also use the "Default" >>>>> prefetch group (only the CMP fields are loaded instead of CMP+CMR)? >>>>> >>>>> Best regards >>>>> >>>>> Dirk >>>>> >>>>> >>>>> Unger, Milan schrieb: >>>>>> Hello, >>>>>> >>>>>> I faced similar problem, the trick to use following EJB QL: >>>>>> >>>>>> select distinct count(p.key) from Post as p where >>>>>> p.thread.forum.id=?1 >>>>>> >>>>>> notice count(p.key) - where key should be a property of CMP bean. >>>>>> I'm not sure if such syntax is required by EJB spec or simply a bug in >>>>>> geronimo/open-ejb. >>>>>> >>>>>> Regards, Milan. >>>>>> >>>>>> -----Original Message----- >>>>>> From: Kaeto23 [mailto:kaeto23@yahoo.de] >>>>>> Sent: Thursday, October 19, 2006 6:55 PM >>>>>> To: Geronimo ML >>>>>> Subject: ejbSelect tutorial? >>>>>> >>>>>> Hello, >>>>>> >>>>>> today I started to work on a CMP that also provides a ejbSelect for >>>>>> counting some contents from a database. Basically, a CMP named Post >>>>>> which should count how much entries exist in the database. >>>>>> >>>>>> Nothing so hard ;) >>>>>> >>>>>> Anyway, Geronimo has some trouble to use the EJB so I'd like to know >>>>>> WHAT is the problem :/ >>>>>> >>>>>> Here the code snippet that, when not commented out, makes the trouble: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> @XD5EjbSelectMethode(descr = "returns the number of entries", ejbQL = >>>>>> "select distinct count(p) from Post as p where p.thread.forum.id=?1") >>>>>> public abstract long ejbSelectForumPostsNum(long forumId) throws >>>>>> FinderException; >>>>>> >>>>>> >>>>>> >>>>>> Now XD5 creates the following deployment descriptor entries: >>>>>> >>>>>> ejb-jar.xml: >>>>>> ... >>>>>> >>>>>> returns the number of entries >>>>>> >>>>>> ejbSelectForumPostsNum >>>>>> >>>>>> long >>>>>> >>>>>> >>>>>> select distinct count(p) from Post as p where >>>>>> p.thread.forum.id=?1 >>>>>> >>>>>> ... >>>>>> >>>>>> openejb-jar.xml >>>>>> ... >>>>>> >>>>>> >>>>>> ejbSelectForumPostsNum >>>>>> >>>>>> long >>>>>> >>>>>> >>>>>> Default >>>>>> >>>>>> ... >>>>>> >>>>>> If these lines are present, Geronimo will crash with this exception: >>>>>> >>>>>> Caused by: java.lang.ClassCastException: org.tranql.ql.EntityReference >>>>>> at >>>>>> org.tranql.ejbqlcompiler.PathTransformer$Context.(PathTransformer. >>>>>> >>>>>> java:401) >>>>>> at >>>>>> org.tranql.ejbqlcompiler.PathTransformer$Context.(PathTransformer. >>>>>> >>>>>> java:380) >>>>>> at >>>>>> org.tranql.ejbqlcompiler.PathTransformer.visit(PathTransformer.java:73) >>>>>> >>>>>> at org.tranql.ql.Query.visit(Query.java:59) >>>>>> at >>>>>> org.tranql.ejbqlcompiler.InterRepresentationTransformer.transform(InterR >>>>>> >>>>>> epresentationTransformer.java:41) >>>>>> at >>>>>> org.tranql.ejbqlcompiler.DerbyEJBQLCompilerFactory$DerbyEJBQLCompiler.tr >>>>>> >>>>>> ansform(DerbyEJBQLCompilerFactory.java:69) >>>>>> at >>>>>> org.tranql.sql.EJBQLToPhysicalQuery.expandToSQLQuery(EJBQLToPhysicalQuer >>>>>> >>>>>> y.java:243) >>>>>> at >>>>>> org.tranql.sql.EJBQLToPhysicalQuery.buildSelect(EJBQLToPhysicalQuery.jav >>>>>> >>>>>> a:171) >>>>>> at >>>>>> org.tranql.sql.EJBQLToPhysicalQuery.buildSelects(EJBQLToPhysicalQuery.ja >>>>>> >>>>>> va:109) >>>>>> at >>>>>> org.tranql.builder.SQLQueryBuilder.buildSelects(SQLQueryBuilder.java:204 >>>>>> >>>>>> ) >>>>>> at >>>>>> org.openejb.deployment.CMPContainerBuilder.buildIt(CMPContainerBuilder.j >>>>>> >>>>>> ava:311) >>>>>> at >>>>>> org.openejb.deployment.AbstractContainerBuilder.createConfiguration(Abst >>>>>> >>>>>> ractContainerBuilder.java:354) >>>>>> at >>>>>> org.openejb.deployment.CMPEntityBuilder.createBean(CMPEntityBuilder.java >>>>>> >>>>>> :213) >>>>>> >>>>>> >>>>>> So, basically, do you have some examples or tutorials that show the >>>>>> usage of ejbSelects with Geronimo 1.1.1? Let me know :) >>>>>> >>>>>> Best regards >>>>>> >>>>>> Dirk >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ___________________________________________________________ >>>>>> Der frhe Vogel fngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: >>>>>> http://mail.yahoo.de >>>>>> >>>>> >>>>> --Kaeto23 >>>>> >>>>> HTTP: http://kaeto23.dnsalias.com (german!) >>>>> Jabber: jabber://kaeto23@jabber.ds2/DS2 >>>>> >>>>> Reclaim Your Inbox! >>>>> http://www.mozilla.org/products/thunderbird/ >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> ___________________________________________________________ >>>>> Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! >>>>> Mail: http://mail.yahoo.de >>>> >>>> > > -- > Kaeto23 > > HTTP: http://kaeto23.dnsalias.com (german!) > Jabber: jabber://kaeto23@jabber.ds2/DS2 > > Reclaim Your Inbox! > http://www.mozilla.org/products/thunderbird/ >> >> ___________________________________________________________ Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de - -- Kaeto23 HTTP: http://kaeto23.dnsalias.com (german!) Jabber: jabber://kaeto23@jabber.ds2/DS2 Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFPe9GbiSTaBU+G6oRA1t8AJ9lS5CTCgIevoB4qQN6yTCVDkRnpACeMmDR OVwSbYKf/QVKQF2G7zZBRx8= =xyQ5 -----END PGP SIGNATURE----- ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de