[pgrouting-users] ERROR: Error computing path: | SQL state: 38001
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Feb 22 09:45:56 EST 2012
Palatla,
It is not clear what might be causing this problem. Normally when you
get an error on the server there is an error message reported with the
error text you got. I just looked at the code and I do not see anyway to
generate the error without additional error message. So I'm guessing
that maybe the server crashed. This could be because you have multiple
copies of the libraries installed or some other system issues. For
issues related to the data:
Do you actually have a column "reverse_cost" in the delhi_road table? Is
it populated with not NULL values?
How big is this table?
select count(*) from delhi_road;
Typically we use a bbox query on the roads table to select only the
roads needed for the solution. Unless this is a small table you should
probably change this query to something like:
'SELECT id, source, target,x1,y1,x2,y2,cost,reverse_cost from delhi_road
where
st_expand(setsrid(makeline(makepoint(xstart,ystart),makepoint(xend,yend)),4326),0.001)
&& the_geom'
Where xstart, ystart and xend, yend are the xy of the start and end of
the route.
4326 is you SRID
0.001 is a small tolerance to expand the bbox by in the units of the
geometry column. Pick a number like 500m or the equivalent in degrees.
-Steve
On 2/22/2012 3:40 AM, Palatla Srikanth wrote:
> Hi,
>
> We are developing an web application that users PostgreSQL 8.4 +
> PostGIS1.5 + Pgrouting 1.03 + development using (Java + Struts + Hibernate)
>
> *When this Query is executed:*
>
> SELECT ST_AsText(the_geom),id AS Coords FROM delhi_road WHERE id IN
> (SELECT edge_id FROM shortest_path_astar('SELECT id, source,
> target,x1,y1,x2,y2,cost,reverse_cost from delhi_road',550,662,true,true))
>
> We are getting the below mentioned error and the other users accessing
> the application were too facing the database exceptions. Can someone
> help us to fix this issue.
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> *Error from the postgreSQL query*
>
> ERROR: Error computing path:
>
> ********** Error **********
>
> ERROR: Error computing path:
>
> SQL state: 38001
>
> ------------------------------------------------------------------------
>
> *Query used:*
>
> **
>
> SELECT ST_AsText(the_geom),id AS Coords FROM delhi_road WHERE id IN
> (SELECT edge_id FROM shortest_path_astar('SELECT id, source,
> target,x1,y1,x2,y2,cost,reverse_cost from delhi_road',550,662,true,true))
>
> -------------------------------------------------------------------------
>
> *Error on the Application server (IDE)*
>
> [ INFO] 46:48 ( MapServiceDAO.java:generateRoute:1525 )
>
> Query is......SELECT ST_AsText(the_geom),id AS Coords FROM delhi_road
> WHERE id IN (SELECT edge_id FROM shortest_path_astar('SELECT id, source,
> target,x1,y1,x2,y2,cost,reverse_cost from delhi_road',550,662,true,true))
>
> [ INFO] 46:48 ( MapServiceDAO.java:generateRoute:1552 )
>
> Exception aala.........org.postgresql.util.PSQLException : ERROR: Error
> computing path: _
>
> Feb 22, 2012 11:46:48 AM org.apache.catalina.core.StandardWrapperValve
> invoke
>
> SEVERE: Servlet.service() for servlet GenerateRoute threw exception
>
> org.hibernate.SessionException : Session was already closed
>
> at org.hibernate.impl.SessionImpl.close( SessionImpl.java:303 )
>
> at com.tis.hib.util.HibernateSessionFactory.closeSession(
> HibernateSessionFactory.java:86 )
>
> at com.tis.dao.impl.MapServiceDAO.generateRoute(
> MapServiceDAO.java:1572 )
>
> at com.tis.servlet.GenerateRoute.doGet( GenerateRoute.java:125 )
>
> at javax.servlet.http.HttpServlet.service( HttpServlet.java:690 )
>
> at javax.servlet.http.HttpServlet.service( HttpServlet.java:803 )
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:290 )
>
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:206 )
>
> at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:230 )
>
> at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:175 )
>
> at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:128 )
>
> at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:104 )
>
> at org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:109 )
>
> at org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:261 )
>
> at org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:844 )
>
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> Http11Protocol.java:581 )
>
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
> JIoEndpoint.java:447 )
>
> at java.lang.Thread.run( Thread.java:619 )
>
>
> *Regards,*
> *Palatla Srikanth*
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
More information about the Pgrouting-users
mailing list