db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Shingler <sh...@iwaynet.net>
Subject Re: Error OQLQuery
Date Fri, 25 Jul 2003 12:01:23 GMT
Maybe the antlr jar file is missing from you your webapp

Quoting Frédéric Trifiro <liste@trifiro.net>:

> Hi everyone, 
> 
> I'm new to this list and i'm glad to see we are so many to use OJB ! I hope 
> someone will help me with my problem...
> 
> You can find below my source code and the apache trace... The source line
> where 
> the error occurs is "OQLQuery query = odmg.newOQLQuery();" in the "getAll
> (Implementation odmg, Transaction tx)" method.
> 
> Thank you for any help, Frederic.
> 
> **
> 
> package com.eads.agit.metier.administration;
> 
> 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;
> 
> public class TypeConteneur {
> 	
> 	private String tcoId = null;
> 	private String tcoLib = null;
> 	private double tcoPctDepAn = 0;
> 	private double tcoPctDepMax = 0;
> 	private double tcoValS10Ans = 0;
> 	private double tcoValS15Ans = 0;
> 
> 	public String getTcoId() {
> 		return tcoId;
> 	}
> 
> 	public void setTcoId(String tcoId) {
> 		this.tcoId = tcoId;
> 	}
> 	
> 	public String getTcoLib() {
> 		return tcoLib;
> 	}
> 
> 	public void setTcoLib(String tcoLib) {
> 		this.tcoLib = tcoLib;
> 	}	
> 	
> 	public double getTcoPctDepAn() {
> 		return tcoPctDepAn;
> 	}
> 
> 	public void setTcoPctDepAn(double tcoPctDepAn) {
> 		this.tcoPctDepAn = tcoPctDepAn;
> 	}
> 	
> 	public double getTcoPctDepMax() {
> 		return tcoPctDepMax;
> 	}
> 
> 	public void setTcoPctDepMax(double tcoPctDepMax) {
> 		this.tcoPctDepMax = tcoPctDepMax;
> 	}	
> 
> 	public double getTcoValS10Ans() {
> 		return tcoValS10Ans;
> 	}
> 
> 	public void setTcoValS10Ans(double tcoValS10Ans) {
> 		this.tcoValS10Ans = tcoValS10Ans;
> 	}	
> 	
> 	public double getTcoValS15Ans() {
> 		return tcoValS15Ans;
> 	}
> 
> 	public void setTcoValS15Ans(double tcoValS15Ans) {
> 		this.tcoValS15Ans = tcoValS15Ans;
> 	}	
> 	
> 	public void store(Transaction tx) {
> 			tx.lock(this, Transaction.WRITE);		
> 		}
> 		
> 	public static Vector getAll(Implementation odmg, Transaction tx) {
> 		
> 		Vector v = new Vector();
> 		DList allTCon = null;
> 		Logger logger = Logger.getLogger(TypeConteneur.class);
> 		
> 		// fabrication de la requête
> 		OQLQuery query = odmg.newOQLQuery();
> 		
> 		try {
> 			query.create("select tcoId from " + 
> TypeConteneur.class.getName());
> 		} catch (QueryInvalidException e) {
> 			e.printStackTrace();
> 		}	
> 					
> 		// exécution de la requête					
> 		try {
> 			allTCon = (DList) query.execute();
> 			tx.commit();
> 		} catch (QueryException e) {
> 			e.printStackTrace();
> 		}
> 			
> 		// vérif résultat
> 		java.util.Iterator iter = allTCon.iterator();	
> 		while (iter.hasNext()) {
> 			System.out.println(iter.next());			
> 		}			
> 			
> 		return v;		
> 	}
> 	
> 	public String toString() {
> 		return (tcoId + " // " + tcoLib + " // ");
> 	}
> }
> 
> **
> 
> Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
> 
> ------------------------------------------------------------------------------
--
> 
> type Exception report
> 
> message Internal Server Error
> 
> description The server encountered an internal error (Internal Server Error)
> 
> that prevented it from fulfilling this request.
> 
> exception 
> 
> javax.servlet.ServletException: Servlet execution threw an exception
> 	at 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)
> 
> 
> root cause 
> 
> 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 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 org.apache.struts.action.RequestProcessor.processForwardConfig
> (RequestProcessor.java:451)
> 	at 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 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)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message