Return-Path: Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 70577 invoked by uid 500); 25 Jul 2003 12:37:39 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 70562 invoked from network); 25 Jul 2003 12:37:39 -0000 Received: from unknown (HELO srv002.hpd.co.uk) (212.158.99.130) by daedalus.apache.org with SMTP; 25 Jul 2003 12:37:39 -0000 Message-ID: <6FB083FB72EFD21181D30004AC4CA18A01C8F882@srv002> From: Charles Anthony To: 'OJB Developers List' Subject: RE: Error OQLQuery Date: Fri, 25 Jul 2003 13:36:47 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You need this file so that OJB can "parse" the OQL query string. See http://db.apache.org/ojb/deployment.html for a list of all the jar = files that need to be on the classpath. Cheers, Charles >-----Original Message----- >From: Fr=E9d=E9ric Trifiro [mailto:liste@trifiro.net] >Sent: 25 July 2003 13:35 >To: OJB Developers List >Subject: Re: Error OQLQuery > > >Hi Jim (and others !) ! > >Why should i need this file ? > >I have no problem with other persistence actions like=20 >inserting a row for=20 >example... Just this OQLQuery problem :( > >Please help :p !=20 > >Frederic > >En r=E9ponse =E0 Jim Shingler : > >> Maybe the antlr jar file is missing from you your webapp >>=20 >> Quoting Fr=E9d=E9ric Trifiro : >>=20 >> > Hi everyone,=20 >> >=20 >> > I'm new to this list and i'm glad to see we are so many to=20 >use OJB ! I >> hope=20 >> > someone will help me with my problem... >> >=20 >> > You can find below my source code and the apache trace...=20 >The source >> line >> > where=20 >> > the error occurs is "OQLQuery query =3D odmg.newOQLQuery();" in = the >> "getAll >> > (Implementation odmg, Transaction tx)" method. >> >=20 >> > Thank you for any help, Frederic. >> >=20 >> > ** >> >=20 >> > package com.eads.agit.metier.administration; >> >=20 >> > import java.util.Vector; >> > import org.odmg.Transaction; >> > import org.odmg.Implementation; >> > import org.odmg.QueryInvalidException; >> > import org.odmg.QueryException; >> > import org.odmg.DList; >> > import org.odmg.OQLQuery; >> > import org.apache.log4j.Logger; >> >=20 >> > public class TypeConteneur { >> > =09 >> > private String tcoId =3D null; >> > private String tcoLib =3D null; >> > private double tcoPctDepAn =3D 0; >> > private double tcoPctDepMax =3D 0; >> > private double tcoValS10Ans =3D 0; >> > private double tcoValS15Ans =3D 0; >> >=20 >> > public String getTcoId() { >> > return tcoId; >> > } >> >=20 >> > public void setTcoId(String tcoId) { >> > this.tcoId =3D tcoId; >> > } >> > =09 >> > public String getTcoLib() { >> > return tcoLib; >> > } >> >=20 >> > public void setTcoLib(String tcoLib) { >> > this.tcoLib =3D tcoLib; >> > }=09 >> > =09 >> > public double getTcoPctDepAn() { >> > return tcoPctDepAn; >> > } >> >=20 >> > public void setTcoPctDepAn(double tcoPctDepAn) { >> > this.tcoPctDepAn =3D tcoPctDepAn; >> > } >> > =09 >> > public double getTcoPctDepMax() { >> > return tcoPctDepMax; >> > } >> >=20 >> > public void setTcoPctDepMax(double tcoPctDepMax) { >> > this.tcoPctDepMax =3D tcoPctDepMax; >> > }=09 >> >=20 >> > public double getTcoValS10Ans() { >> > return tcoValS10Ans; >> > } >> >=20 >> > public void setTcoValS10Ans(double tcoValS10Ans) { >> > this.tcoValS10Ans =3D tcoValS10Ans; >> > }=09 >> > =09 >> > public double getTcoValS15Ans() { >> > return tcoValS15Ans; >> > } >> >=20 >> > public void setTcoValS15Ans(double tcoValS15Ans) { >> > this.tcoValS15Ans =3D tcoValS15Ans; >> > }=09 >> > =09 >> > public void store(Transaction tx) { >> > tx.lock(this, Transaction.WRITE); =09 >> > } >> > =09 >> > public static Vector getAll(Implementation odmg,=20 >Transaction tx) { >> > =09 >> > Vector v =3D new Vector(); >> > DList allTCon =3D null; >> > Logger logger =3D Logger.getLogger(TypeConteneur.class); >> > =09 >> > // fabrication de la requ=EAte >> > OQLQuery query =3D odmg.newOQLQuery(); >> > =09 >> > try { >> > query.create("select tcoId from " +=20 >> > TypeConteneur.class.getName()); >> > } catch (QueryInvalidException e) { >> > e.printStackTrace(); >> > }=09 >> > =09 >> > // ex=E9cution de la requ=EAte =09 > =09 >> > try { >> > allTCon =3D (DList) query.execute(); >> > tx.commit(); >> > } catch (QueryException e) { >> > e.printStackTrace(); >> > } >> > =09 >> > // v=E9rif r=E9sultat >> > java.util.Iterator iter =3D allTCon.iterator();=09 >> > while (iter.hasNext()) { >> > System.out.println(iter.next());=09 > =09 >> > } =09 >> > =09 >> > return v; =09 >> > } >> > =09 >> > public String toString() { >> > return (tcoId + " // " + tcoLib + " // "); >> > } >> > } >> >=20 >> > ** >> >=20 >> > Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error >> >=20 >> > >>=20 >--------------------------------------------------------------- >--------------- >> -- >> >=20 >> > type Exception report >> >=20 >> > message Internal Server Error >> >=20 >> > description The server encountered an internal error=20 >(Internal Server >> Error) >> >=20 >> > that prevented it from fulfilling this request. >> >=20 >> > exception=20 >> >=20 >> > javax.servlet.ServletException: Servlet execution threw an=20 >exception >> > at=20 >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter >> > (ApplicationFilterChain.java:269) >> > at org.apache.catalina.core.ApplicationFilterChain.doFilter >> > (ApplicationFilterChain.java:193) >> > at org.apache.catalina.core.StandardWrapperValve.invoke >> > (StandardWrapperValve.java:243) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.core.StandardContextValve.invoke >> > (StandardContextValve.java:190) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.valves.CertificatesValve.invoke >> > (CertificatesValve.java:246) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.core.StandardContext.invoke >> > (StandardContext.java:2343) >> > at org.apache.catalina.core.StandardHostValve.invoke >> > (StandardHostValve.java:180) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.valves.ErrorDispatcherValve.invoke >> > (ErrorDispatcherValve.java:170) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.valves.ErrorReportValve.invoke >> > (ErrorReportValve.java:170) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.valves.AccessLogValve.invoke >> > (AccessLogValve.java:468) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.core.StandardEngineValve.invoke >> > (StandardEngineValve.java:174) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.connector.http.HttpProcessor.process >> > (HttpProcessor.java:1012) >> > at org.apache.catalina.connector.http.HttpProcessor.run >> > (HttpProcessor.java:1107) >> > at java.lang.Thread.run(Thread.java:536) >> >=20 >> >=20 >> > root cause=20 >> >=20 >> > java.lang.NoClassDefFoundError: antlr/TokenStreamException >> > at org.apache.ojb.odmg.OJB.newOQLQuery(Unknown Source) >> > at com.eads.agit.metier.administration.TypeConteneur.getAll >> > (TypeConteneur.java:80) >> > at com.eads.agit.struts.administration.ActGestTconIn.execute >> > (ActGestTconIn.java:29) >> > at=20 >org.apache.struts.action.RequestProcessor.processActionPerform >> > (RequestProcessor.java:480) >> > at org.apache.struts.action.RequestProcessor.process >> > (RequestProcessor.java:274) >> > at org.apache.struts.action.ActionServlet.process >> > (ActionServlet.java:1420) >> > at >> = org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >> > at org.apache.catalina.core.ApplicationDispatcher.invoke >> > (ApplicationDispatcher.java:683) >> > at org.apache.catalina.core.ApplicationDispatcher.doForward >> > (ApplicationDispatcher.java:431) >> > at org.apache.catalina.core.ApplicationDispatcher.forward >> > (ApplicationDispatcher.java:355) >> > at org.apache.struts.action.RequestProcessor.doForward >> > (RequestProcessor.java:1058) >> > at=20 >org.apache.struts.action.RequestProcessor.processForwardConfig >> > (RequestProcessor.java:451) >> > at=20 >org.apache.struts.action.RequestProcessor.processActionForward >> > (RequestProcessor.java:401) >> > at org.apache.struts.action.RequestProcessor.process >> > (RequestProcessor.java:279) >> > at org.apache.struts.action.ActionServlet.process >> > (ActionServlet.java:1420) >> > at >> = org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) >> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >> > at=20 >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter >> > (ApplicationFilterChain.java:247) >> > at org.apache.catalina.core.ApplicationFilterChain.doFilter >> > (ApplicationFilterChain.java:193) >> > at org.apache.catalina.core.StandardWrapperValve.invoke >> > (StandardWrapperValve.java:243) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.core.StandardContextValve.invoke >> > (StandardContextValve.java:190) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.valves.CertificatesValve.invoke >> > (CertificatesValve.java:246) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.core.StandardContext.invoke >> > (StandardContext.java:2343) >> > at org.apache.catalina.core.StandardHostValve.invoke >> > (StandardHostValve.java:180) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.valves.ErrorDispatcherValve.invoke >> > (ErrorDispatcherValve.java:170) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.valves.ErrorReportValve.invoke >> > (ErrorReportValve.java:170) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.valves.AccessLogValve.invoke >> > (AccessLogValve.java:468) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:564) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.core.StandardEngineValve.invoke >> > (StandardEngineValve.java:174) >> > at org.apache.catalina.core.StandardPipeline.invokeNext >> > (StandardPipeline.java:566) >> > at org.apache.catalina.core.StandardPipeline.invoke >> > (StandardPipeline.java:472) >> > at >> = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) >> > at org.apache.catalina.connector.http.HttpProcessor.process >> > (HttpProcessor.java:1012) >> > at org.apache.catalina.connector.http.HttpProcessor.run >> > (HttpProcessor.java:1107) >> > at java.lang.Thread.run(Thread.java:536) >> >=20 >> >=20 >> >=20 >--------------------------------------------------------------------- >> > To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org >> > For additional commands, e-mail: ojb-dev-help@db.apache.org >> >=20 >> >=20 >>=20 >>=20 >>=20 >> = --------------------------------------------------------------------- >> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org >> For additional commands, e-mail: ojb-dev-help@db.apache.org >>=20 >>=20 > > > >--------------------------------------------- >R=E9sonance > http://www.resonance-online.com > >--------------------------------------------------------------------- >To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org >For additional commands, e-mail: ojb-dev-help@db.apache.org > This email and any attachments are strictly confidential and are = intended solely for the addressee. If you are not the intended recipient you = must not disclose, forward, copy or take any action in reliance on this = message or its attachments. If you have received this email in error please = notify the sender as soon as possible and delete it from your computer = systems. Any views or opinions presented are solely those of the author and do = not necessarily reflect those of HPD Software Limited or its affiliates. At present the integrity of email across the internet cannot be = guaranteed and messages sent via this medium are potentially at risk. All = liability is excluded to the extent permitted by law for any claims arising as a = re- sult of the use of this medium to transmit information by or to=20 HPD Software Limited or its affiliates. --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org