Skip to content

Instantly share code, notes, and snippets.

@Isxida
Created December 11, 2012 21:32
Show Gist options
  • Save Isxida/4262305 to your computer and use it in GitHub Desktop.
Save Isxida/4262305 to your computer and use it in GitHub Desktop.
Log and query. from RPTTiempoxAveriaxEstacion
2012-12-11 16:28:45,484 [http-8080-2] DEBUG com.ibatis.sqlmap.engine.cache.CacheModel - Cache 'Averia.Averia-cache': cache miss
2012-12-11 16:28:45,484 [http-8080-2] DEBUG com.ibatis.common.jdbc.SimpleDataSource - Checked out connection 21719810 from pool.
2012-12-11 16:28:45,500 [http-8080-2] DEBUG java.sql.Connection - {conn-100353} Connection
2012-12-11 16:28:45,500 [http-8080-2] DEBUG java.sql.Connection - {conn-100353} Preparing Statement: SELECT h.cod_prefijo, h.cod_averia, h.cli_raz_social, c.dec_ex2_ds as Servicio, h.num_ide_nu as codCircuito, e.des_estacion, substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS(sysdate - h.fec_registro),10,'0'),6) as tiempo_total, NVL(substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS(pra.fec_reaper_real - pra.fec_inicio_real),10,'0'),6),'0') as tiempo_parada, substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS((sysdate - h.fec_registro) - (pra.fec_reaper_real - pra.fec_inicio_real ) ),10,'0'),6) as tiempo_imputable FROM HAVERIA h left join DET_CATALOGO c on h.cod_servicio = c.dec_ex1_ds left join CAT_ESTACION e on h.cod_estacion = e.cod_estacion left join par_rel_averia pra on pra.cod_averia = h.cod_averia
2012-12-11 16:28:45,500 [http-8080-2] DEBUG java.sql.PreparedStatement - {pstm-100354} Executing Statement: SELECT h.cod_prefijo, h.cod_averia, h.cli_raz_social, c.dec_ex2_ds as Servicio, h.num_ide_nu as codCircuito, e.des_estacion, substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS(sysdate - h.fec_registro),10,'0'),6) as tiempo_total, NVL(substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS(pra.fec_reaper_real - pra.fec_inicio_real),10,'0'),6),'0') as tiempo_parada, substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS((sysdate - h.fec_registro) - (pra.fec_reaper_real - pra.fec_inicio_real ) ),10,'0'),6) as tiempo_imputable FROM HAVERIA h left join DET_CATALOGO c on h.cod_servicio = c.dec_ex1_ds left join CAT_ESTACION e on h.cod_estacion = e.cod_estacion left join par_rel_averia pra on pra.cod_averia = h.cod_averia
2012-12-11 16:28:45,500 [http-8080-2] DEBUG java.sql.PreparedStatement - {pstm-100354} Parameters: []
2012-12-11 16:28:45,500 [http-8080-2] DEBUG java.sql.PreparedStatement - {pstm-100354} Types: []
2012-12-11 16:28:45,812 [http-8080-2] DEBUG com.ibatis.common.jdbc.SimpleDataSource - Returned connection 21719810 to pool.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in pe/com/tdp/perifericos/averias/xml/Averia.xml.
--- The error occurred while applying a parameter map.
--- Check the Averias_Estacion-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00904: "PKG_AVERIAS"."FU_FORMATEARRESTAFECHAS": identificador no válido
Caused by: java.sql.SQLException: ORA-00904: "PKG_AVERIAS"."FU_FORMATEARRESTAFECHAS": identificador no válido
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
at com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:614)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:588)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:96)
at pe.com.tdp.perifericos.averias.DAOImpl.AveriaDAOImpl.rpteAverias_Estacion_Tiempos(AveriaDAOImpl.java:244)
at pe.com.tdp.perifericos.averias.serviceImpl.AveriaServicesImpl.rpteAverias_Estacion_Tiempos(AveriaServicesImpl.java:189)
at pe.com.tdp.perifericos.averias.servlet.Averias_Rpt_Tiempo_Estacion.service(Averias_Rpt_Tiempo_Estacion.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: ORA-00904: "PKG_AVERIAS"."FU_FORMATEARRESTAFECHAS": identificador no válido
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:744)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:809)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:849)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3338)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3444)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy1.execute(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:182)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
... 22 more
Caused by:
java.sql.SQLException: ORA-00904: "PKG_AVERIAS"."FU_FORMATEARRESTAFECHAS": identificador no válido
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:744)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:809)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:849)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3338)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3444)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy1.execute(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:182)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
at com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:614)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:588)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:96)
at pe.com.tdp.perifericos.averias.DAOImpl.AveriaDAOImpl.rpteAverias_Estacion_Tiempos(AveriaDAOImpl.java:244)
at pe.com.tdp.perifericos.averias.serviceImpl.AveriaServicesImpl.rpteAverias_Estacion_Tiempos(AveriaServicesImpl.java:189)
at pe.com.tdp.perifericos.averias.servlet.Averias_Rpt_Tiempo_Estacion.service(Averias_Rpt_Tiempo_Estacion.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by:
java.sql.SQLException: ORA-00904: "PKG_AVERIAS"."FU_FORMATEARRESTAFECHAS": identificador no válido
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:744)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:809)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:849)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3338)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3444)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy1.execute(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:182)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
at com.ibatis.sqlmap.engine.mapping.statement.CachingStatement.executeQueryForList(CachingStatement.java:97)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:614)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:588)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:96)
at pe.com.tdp.perifericos.averias.DAOImpl.AveriaDAOImpl.rpteAverias_Estacion_Tiempos(AveriaDAOImpl.java:244)
at pe.com.tdp.perifericos.averias.serviceImpl.AveriaServicesImpl.rpteAverias_Estacion_Tiempos(AveriaServicesImpl.java:189)
at pe.com.tdp.perifericos.averias.servlet.Averias_Rpt_Tiempo_Estacion.service(Averias_Rpt_Tiempo_Estacion.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
----------------------------------------------------------------------------
QUERY
----------------------------------------------------------------------------
SELECT h.cod_prefijo,
h.cod_averia,
h.cli_raz_social,
c.dec_ex2_ds as Servicio,
h.num_ide_nu as codCircuito,
e.des_estacion,
substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS(sysdate - h.fec_registro),10,'0'),6) as tiempo_total,
NVL(substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS(pra.fec_reaper_real - pra.fec_inicio_real),10,'0'),6),'0') as tiempo_parada,
substr(lpad(PKG_AVERIAS.FU_FORMATEARRESTAFECHAS((sysdate - h.fec_registro) - (pra.fec_reaper_real - pra.fec_inicio_real ) ),10,'0'),6) as tiempo_imputable
FROM HAVERIA h
left join DET_CATALOGO c
on h.cod_servicio = c.dec_ex1_ds
left join CAT_ESTACION e
on h.cod_estacion = e.cod_estacion
left join par_rel_averia pra
on pra.cod_averia = h.cod_averia;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment