You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carlos Maté <cm...@tid.es> on 2002/07/11 15:54:32 UTC

ESQL QUERY

Hi.

In my cocoon2 based application, queries in a xsp page using "esql" taglib  are executed  ¡¡ two times !! although, of course, they are only written once.
It doesn't happen always, but happen.
I think it's related with the form-validator but I'm not sure. And I need the form-validator.
Can you help me, please?
Thanks.
Carlos.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ESQL QUERY SUMMARY

Posted by Carlos Maté <cm...@tid.es>.
Chris, Thank you  very much for yor answers.

I have moved my application to a new develop enviroment using cocoon 2.0.3 and the latest versions of navigators and Web server.
The problem has been solved.

SUMMARY: I found two threads executing the same xsp page. I  changed the develop enviroment and the problem was solved.



Christian Haul wrote:

> On 12.Jul.2002 -- 03:04 PM, Carlos Maté wrote:
> > cocoon 2.0.1
>
> Please verify that the problem persists with 2.0.3
>
> > <map:resource name="recursoprueba">
> >       <map:generate type="serverpages" src="{accion}.xsp"/>
> >       <map:serialize type="xml"/>
> >  </map:resource>
>
> Please do *not* have the same file in both branches. I'd like to eliminate
> the possibility that *both* branches are executed.
>
> Likewise, the part of the log that *leads*to* the invocation of the XSP is
> more interesting than the release of components.
>
>         Chris.
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

--
**********************************************
Carlos Maté de Anta
Telefónica I+D
Boecillo (Valladolid)
cmate@tid.es
Tfno: 983367629
Fax:  983367564
**********************************************



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ESQL QUERY

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 12.Jul.2002 -- 03:04 PM, Carlos Maté wrote:
> cocoon 2.0.1

Please verify that the problem persists with 2.0.3

> <map:resource name="recursoprueba">
>       <map:generate type="serverpages" src="{accion}.xsp"/>
>       <map:serialize type="xml"/>
>  </map:resource>

Please do *not* have the same file in both branches. I'd like to eliminate
the possibility that *both* branches are executed.

Likewise, the part of the log that *leads*to* the invocation of the XSP is
more interesting than the release of components.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ESQL QUERY

Posted by Carlos Maté <cm...@tid.es>.
I use cocoon2.0.1

My resource "portal":

<map:resource name="portal">
      <map:generate type="serverpages" src="{accion}.xsp">
        <map:parameter name="validado" value="{validado}"/>
        <map:parameter name="ajeno" value="{ajeno}"/>
        <map:parameter name="primeraVez" value="{primeraVez}"/>
        <map:parameter name="vieneDeMod" value="{vieneDeMod}"/>
      </map:generate>
      <map:transform type="xinclude"/>
    <map:act type="session-validator">
      <map:parameter name="descriptor" value="context://pieles/piel.xml"/>
      <map:parameter name="validate-set" value="piel-hojasestilo3"/>
      <map:transform src="context://pieles/{es.tid.sga.piel.nombre.hojasestilo}/portal.xsl">
        <map:parameter name="PSP_PERFIL" value="{PSP_PERFIL}"/>
        <map:parameter name="PSP_MATRICULA_RH" value="{PSP_MATRICULA_RH}"/>
        <map:parameter name="PSP_NOMBRE_USU" value="{PSP_NOMBRE_USU}"/>
        <map:parameter name="PSP_APELLIDOS_USU" value="{PSP_APELLIDOS_USU}"/>
        <map:parameter name="PSP_CARGO" value="{PSP_CARGO}"/>
        <map:parameter name="PSP_NOMBRE_TERRITORIO" value="{PSP_NOMBRE_TERRITORIO}"/>
      </map:transform>
      <map:serialize type="html"/>
    </map:act>
     <map:act type="session-validator">
      <map:parameter name="descriptor" value="context://pieles/piel.xml"/>
      <map:parameter name="validate-set" value="sesion3"/>
      <map:transform src="context://pieles/default/hojasestilo/portal.xsl">
        <map:parameter name="PSP_PERFIL" value="{PSP_PERFIL}"/>
        <map:parameter name="PSP_MATRICULA_RH" value="{PSP_MATRICULA_RH}"/>
        <map:parameter name="PSP_NOMBRE_USU" value="{PSP_NOMBRE_USU}"/>
        <map:parameter name="PSP_APELLIDOS_USU" value="{PSP_APELLIDOS_USU}"/>
        <map:parameter name="PSP_NOMBRE_TERRITORIO" value="{PSP_NOMBRE_TERRITORIO}"/>
        <map:parameter name="PSP_CARGO" value="{PSP_CARGO}"/>
      </map:transform>
      <map:serialize type="html"/>
    </map:act>
   <map:act type="session-validator">
      <map:parameter name="descriptor" value="context://pieles/piel.xml"/>
      <map:parameter name="validate-set" value="piel-hojasestilo-inicio"/>
      <map:transform src="context://pieles/{es.tid.sga.piel.nombre.hojasestilo}/portal.xsl"/>
      <map:serialize type="html"/>
    </map:act>
    <map:transform src="context://pieles/default/hojasestilo/portal.xsl"/>
    <map:serialize type="html"/>
  </map:resource>
I have also modified the sitemap:
 <map:match pattern="NuevoMotivosSolicitud">
      <map:act type="form-validator">
        <map:parameter name="descriptor" value="context://descriptores/NuevoMotivosSolicitud.xml"/>
        <map:parameter name="validate-set" value="NuevoMotivosSolicitud"/>
        <map:call resource="portal">
          <map:parameter name="accion" value="context://logica/configuracion/MotivosSolicitud/FrmMotivosSolicitud"/>
              <map:parameter name="validado" value="false"/>
              <map:parameter name="ajeno" value="false"/>
              <map:parameter name="primeraVez" value="false"/>
              <map:parameter name="vieneDeMod" value="false"/>
        </map:call>
      </map:act>
      <map:call resource="recursoprueba">
        <map:parameter name="accion" value="context://logica/configuracion/MotivosSolicitud/FrmNuevoMotivosSolicitud"/>
              <map:parameter name="validado" value="true"/>
              <map:parameter name="ajeno" value="false"/>
              <map:parameter name="primeraVez" value="false"/>
              <map:parameter name="vieneDeMod" value="false"/>
      </map:call>
    </map:match>

<map:resource name="recursoprueba">
      <map:generate type="serverpages" src="{accion}.xsp"/>
      <map:serialize type="xml"/>
 </map:resource>

In the core.log I can't find the string "recursoprueba" but the queries have been executed twice.

DEBUG   (2002-07-12) 13:52.02:326   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/XIncludeTransformer: Base URI: file:/users/sga/webapps/pruebas/sga/distribucion/logica/configuracion/MotivosSolicitud/
DEBUG   (2002-07-12) 13:52.02:326   [core.url-factory] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/URLFactoryImpl: Making URL from file:/users/sga/webapps/pruebas/sga/distribucion/logica/configuracion/MotivosSolicitud/../../../perfiles/administradorn/documentos/menu.xml
DEBUG   (2002-07-12) 13:52.02:337   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/XIncludeTransformer: URL: org.apache.cocoon.components.source.URLSource@1fda617
Suffix:
DEBUG   (2002-07-12) 13:52.02:338   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/XIncludeTransformer: Parse type is XML
DEBUG   (2002-07-12) 13:52.02:338   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Retrieving a org.apache.cocoon.components.parser.JaxpParser from the pool
DEBUG   (2002-07-12) 13:52.02:338   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/FrmMotivosSolicitud_xsp: esql query:
          INSERT INTO SGMOSOTO
             SELECT SG_SQ_CO_MOTIVO_SOLI.NEXTVAL, 'PRUEBA 2'
                FROM DUAL WHERE NOT EXISTS (SELECT null FROM SGMOSOTO WHERE
                                      MOSO_DS_MOTIVO_SOLICITUD = 'PRUEBA 2')

DEBUG   (2002-07-12) 13:52.02:343   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.components.parser.JaxpParser to the pool
DEBUG   (2002-07-12) 13:52.02:344   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/XIncludeTransformer: Processing XInclude element: href=../../../perfiles/administradorn/documentos/pie.xml, parse=xml
DEBUG   (2002-07-12) 13:52.02:345   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/XIncludeTransformer: Base URI: file:/users/sga/webapps/pruebas/sga/distribucion/logica/configuracion/MotivosSolicitud/
DEBUG   (2002-07-12) 13:52.02:345   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/FrmMotivosSolicitud_xsp: esql query:
                SELECT      MOSO_CO_MOTIVO_SOLICITUD,
                            MOSO_DS_MOTIVO_SOLICITUD
                FROM        SGMOSOTO

DEBUG   (2002-07-12) 13:52.02:346   [core.url-factory] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/URLFactoryImpl: Making URL from file:/users/sga/webapps/pruebas/sga/distribucion/logica/configuracion/MotivosSolicitud/../../../perfiles/administradorn/documentos/pie.xml
DEBUG   (2002-07-12) 13:52.02:347   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/XIncludeTransformer: URL: org.apache.cocoon.components.source.URLSource@1a356fa
Suffix:
DEBUG   (2002-07-12) 13:52.02:347   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/XIncludeTransformer: Parse type is XML
DEBUG   (2002-07-12) 13:52.02:347   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Retrieving a org.apache.cocoon.components.parser.JaxpParser from the pool
DEBUG   (2002-07-12) 13:52.02:349   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.components.parser.JaxpParser to the pool
DEBUG   (2002-07-12) 13:52.02:349   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Retrieving a org.apache.avalon.excalibur.datasource.JdbcConnection from the pool
DEBUG   (2002-07-12) 13:52.02:350   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Pinging database after 67630ms of inactivity.
DEBUG   (2002-07-12) 13:52.02:355   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
DEBUG   (2002-07-12) 13:52.02:355   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/FrmMotivosSolicitud_xsp: esql query:
          INSERT INTO SGMOSOTO
             SELECT SG_SQ_CO_MOTIVO_SOLI.NEXTVAL, 'PRUEBA 2'
                FROM DUAL WHERE NOT EXISTS (SELECT null FROM SGMOSOTO WHERE
                                      MOSO_DS_MOTIVO_SOLICITUD = 'PRUEBA 2')

DEBUG   (2002-07-12) 13:52.02:360   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/FrmMotivosSolicitud_xsp: esql query:
                SELECT      MOSO_CO_MOTIVO_SOLICITUD,
                            MOSO_DS_MOTIVO_SOLICITUD
                FROM        SGMOSOTO

DEBUG   (2002-07-12) 13:52.02:363   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
DEBUG   (2002-07-12) 13:52.02:372   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.www.logica.configuracion.MotivosSolicitud.FrmMotivosSolicitud_xsp to the pool
DEBUG   (2002-07-12) 13:52.02:373   [core.event-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/CachingEventPipeline: Recycling of CachingEventPipeline
DEBUG   (2002-07-12) 13:52.02:373   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.generation.ServerPagesGenerator to the pool
DEBUG   (2002-07-12) 13:52.02:373   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.transformation.XIncludeTransformer to the pool
DEBUG   (2002-07-12) 13:52.02:373   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.transformation.TraxTransformer to the pool
DEBUG   (2002-07-12) 13:52.02:374   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingEventPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:374   [core.stream-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/CachingStreamPipeline: Recycling of CachingStreamPipeline
DEBUG   (2002-07-12) 13:52.02:374   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.serialization.HTMLSerializer to the pool
DEBUG   (2002-07-12) 13:52.02:375   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingStreamPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:375   [core.event-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/CachingEventPipeline: Recycling of CachingEventPipeline
DEBUG   (2002-07-12) 13:52.02:376   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingEventPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:376   [core.stream-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/CachingStreamPipeline: Recycling of CachingStreamPipeline
DEBUG   (2002-07-12) 13:52.02:376   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-70/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingStreamPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:378   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.www.logica.configuracion.MotivosSolicitud.FrmMotivosSolicitud_xsp to the pool
DEBUG   (2002-07-12) 13:52.02:379   [core.event-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/CachingEventPipeline: Recycling of CachingEventPipeline
DEBUG   (2002-07-12) 13:52.02:379   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.generation.ServerPagesGenerator to the pool
DEBUG   (2002-07-12) 13:52.02:380   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.transformation.XIncludeTransformer to the pool
DEBUG   (2002-07-12) 13:52.02:380   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.transformation.TraxTransformer to the pool
DEBUG   (2002-07-12) 13:52.02:380   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingEventPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:381   [core.stream-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/CachingStreamPipeline: Recycling of CachingStreamPipeline
DEBUG   (2002-07-12) 13:52.02:381   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.serialization.HTMLSerializer to the pool
DEBUG   (2002-07-12) 13:52.02:381   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingStreamPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:382   [core.event-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/CachingEventPipeline: Recycling of CachingEventPipeline
DEBUG   (2002-07-12) 13:52.02:382   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingEventPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:383   [core.stream-pipeline] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/CachingStreamPipeline: Recycling of CachingStreamPipeline
DEBUG   (2002-07-12) 13:52.02:383   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-71/LogKitLogger: Returning a org.apache.cocoon.components.pipeline.CachingStreamPipeline to the pool
DEBUG   (2002-07-12) 13:52.02:486   [core] (/sg/perfil:administradorn/main.javascript) Thread-74/Cocoon: DEBUGGING INFORMATION:







Christian Haul wrote:

> On 12.Jul.2002 -- 10:33 AM, Carlos Maté wrote:
> > This is what I can see in core.log
> > DEBUG   (2002-07-12) 09:25.27:279   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/FrmMotivosSolicitud_xsp: esql query:
> > DEBUG   (2002-07-12) 09:25.27:284   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-196/FrmMotivosSolicitud_xsp: esql query:
>
> Interesting: two different threads!
>
> > And in the sitemap...
> > <map:match pattern="NuevoMotivosSolicitud">
> >       <map:act type="form-validator">
> >         <map:call resource="portal">
> >       </map:act>
> >       <map:call resource="portal">
>
> What version of Cocoon are you using? Do you use the treeprocessor? How
> does the "portal" resource look like?
>
> I suspect the sitemap to be responsible for the problem you see. Change
> the second call to another resource and see if you find both resources
> executed in the log.
>
>         Chris.
>
> Please follow up summarizing your problem and which suggested solution
> / information worked for you when you consider your problem
> solved. Add "SUMMARY: " to the subject line. This will make FAQ
> generation and searching the list easier. In addition, it makes
> helping you more fun. Thank you.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

--
**********************************************
Carlos Maté de Anta
Telefónica I+D
Boecillo (Valladolid)
cmate@tid.es
Tfno: 983367629
Fax:  983367564
**********************************************



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ESQL QUERY

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 12.Jul.2002 -- 10:33 AM, Carlos Maté wrote:
> This is what I can see in core.log
> DEBUG   (2002-07-12) 09:25.27:279   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/FrmMotivosSolicitud_xsp: esql query:
> DEBUG   (2002-07-12) 09:25.27:284   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-196/FrmMotivosSolicitud_xsp: esql query:

Interesting: two different threads!

> And in the sitemap...
> <map:match pattern="NuevoMotivosSolicitud">
>       <map:act type="form-validator">
>         <map:call resource="portal">
>       </map:act>
>       <map:call resource="portal">

What version of Cocoon are you using? Do you use the treeprocessor? How
does the "portal" resource look like?

I suspect the sitemap to be responsible for the problem you see. Change
the second call to another resource and see if you find both resources
executed in the log.

	Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ESQL QUERY

Posted by Carlos Maté <cm...@tid.es>.
This is what I can see in core.log


DEBUG   (2002-07-12) 09:25.27:272   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/XIncludeTransformer: Parse type is XML
DEBUG   (2002-07-12) 09:25.27:273   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/LogKitLogger: Retrieving a org.apache.cocoon.components.parser.JaxpParser from the pool
DEBUG   (2002-07-12) 09:25.27:274   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/LogKitLogger: Returning a org.apache.cocoon.components.parser.JaxpParser to the pool
DEBUG   (2002-07-12) 09:25.27:275   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/LogKitLogger: Retrieving a org.apache.avalon.excalibur.datasource.JdbcConnection from the pool
DEBUG   (2002-07-12) 09:25.27:276   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/LogKitLogger: Pinging database after 243551ms of inactivity.
DEBUG   (2002-07-12) 09:25.27:279   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/FrmMotivosSolicitud_xsp: esql query:
          INSERT INTO SGMOSOTO
             SELECT SG_SQ_CO_MOTIVO_SOLI.NEXTVAL, 'PROBANDO'
                FROM DUAL WHERE NOT EXISTS (SELECT null FROM SGMOSOTO WHERE
                                      MOSO_DS_MOTIVO_SOLICITUD = 'PROBANDO')

DEBUG   (2002-07-12) 09:25.27:283   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/FrmMotivosSolicitud_xsp: esql query:
                SELECT      MOSO_CO_MOTIVO_SOLICITUD,
                            MOSO_DS_MOTIVO_SOLICITUD
                FROM        SGMOSOTO

DEBUG   (2002-07-12) 09:25.27:284   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-196/FrmMotivosSolicitud_xsp: esql query:
          INSERT INTO SGMOSOTO
             SELECT SG_SQ_CO_MOTIVO_SOLI.NEXTVAL, 'PROBANDO'
                FROM DUAL WHERE NOT EXISTS (SELECT null FROM SGMOSOTO WHERE
                                      MOSO_DS_MOTIVO_SOLICITUD = 'PROBANDO')

DEBUG   (2002-07-12) 09:25.27:292   [core] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-196/FrmMotivosSolicitud_xsp: esql query:
                SELECT      MOSO_CO_MOTIVO_SOLICITUD,
                            MOSO_DS_MOTIVO_SOLICITUD
                FROM        SGMOSOTO

DEBUG   (2002-07-12) 09:25.27:357   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-196/LogKitLogger: Returning a org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
DEBUG   (2002-07-12) 09:25.27:358   [core.datasources.sga_db] (/sg/perfil:administradorn/NuevoMotivosSolicitud) Thread-197/LogKitLogger: Returning a org.apache.avalon.excalibur.datasource.JdbcConnection to the pool


The xsp page NuevoMotivoSolicitud:

<xsp:page xmlns:xi="http://www.w3.org/2001/XInclude"  xmlns:error="http://apache.org/cocoon/error/2.0"
     language="java"
     xmlns:xsp="http://apache.org/xsp"
     xmlns:esql="http://apache.org/cocoon/SQL/v2"
     xmlns:xsp-request="http://apache.org/xsp/request/2.0"
     xmlns:xsp-formval="http://apache.org/xsp/form-validator/2.0"
     xmlns:session="http://apache.org/xsp/session/2.0"
>
 <SGA_APLICACION sga_id="frm_motivos_solicitud" sga_titulo="Configuraci@CTE_ACENTO_O@n de Motivos de Solicitud">
<xsp:logic>
String eliminar                 = <xsp-request:get-parameter name="ELIMINAR"/>;
String nuevo                    = <xsp-request:get-parameter name="NUEVO"/>;
String nuevaDescripcion         = <xsp-request:get-parameter name="INPUT_AREA_DESCRIPCION"/>;
if (nuevaDescripcion != null)
{
  nuevaDescripcion = nuevaDescripcion.toUpperCase();
}
String motivo                   = <xsp-request:get-parameter name="SELECT_MOTIVO"/>;
</xsp:logic>
<esql:connection>
  <esql:pool>sga_db</esql:pool>


  if (nuevo!=null)
  {
    <![CDATA[if  ( (nuevo.equals("si"))
                   && (nuevaDescripcion!=null)
                   && (nuevaDescripcion.length() !=0)
                   && (nuevaDescripcion.length() < @CTE_MAX_MOSO_DS_MOTIVO_SOLICITUD@) )]]>
    {
  </xsp:logic>
        <esql:execute-query>
          <esql:query>
          INSERT INTO SGMOSOTO
             SELECT SG_SQ_CO_MOTIVO_SOLI.NEXTVAL, '<xsp:expr>nuevaDescripcion</xsp:expr>'
                FROM DUAL WHERE NOT EXISTS (SELECT null FROM SGMOSOTO WHERE
                                      MOSO_DS_MOTIVO_SOLICITUD = '<xsp:expr>nuevaDescripcion</xsp:expr>')
          </esql:query>
          <esql:results>
            <esql:row-results>
            </esql:row-results>
          </esql:results>
          <esql:no-results>
          </esql:no-results>
        </esql:execute-query>
  <xsp:logic>
    }
  }
  </xsp:logic>

  <SGA_FORMULARIO sga_alias="FrmMotivosSolicitud" sga_titulo="Motivos de las solicitudes">
    <SGA_FILA>
      <SGA_SELECT_CONSULTA sga_nombre="SELECT_MOTIVO" sga_titulo="Motivo">
        <SGA_OPCIONES_A_BUSCAR>
          <SGA_ModeloDatos_dameCodHor>
            <esql:execute-query>
              <esql:query>
                SELECT      MOSO_CO_MOTIVO_SOLICITUD,
                            MOSO_DS_MOTIVO_SOLICITUD
                FROM        SGMOSOTO
              </esql:query>
              <esql:results>
                <esql:row-results>
                  <ROW>
                    <xsp:attribute name="ID"><xsp:expr><esql:get-int column="MOSO_CO_MOTIVO_SOLICITUD"/></xsp:expr></xsp:attribute>
                    <MOSO_DS_MOTICO_SOLICITUD><esql:get-string column="MOSO_DS_MOTIVO_SOLICITUD"/></MOSO_DS_MOTICO_SOLICITUD>
                  </ROW>
                </esql:row-results>
              </esql:results>
            </esql:execute-query>
          </SGA_ModeloDatos_dameCodHor>
        </SGA_OPCIONES_A_BUSCAR>
        <xsp:logic>
         <![CDATA[if ( (eliminar!=null) && (eliminar.equals("si")) && ( (motivo==null) || (motivo.length()==0) )){]]>
         </xsp:logic>
         <SGA_AVISO>Seleccione un Motivo de Solicitud</SGA_AVISO>
         <xsp:logic>
         }
         </xsp:logic>

      </SGA_SELECT_CONSULTA>
    </SGA_FILA>
    <SGA_FILA>
      <SGA_INPUT_OCULTO sga_nombre="ELIMINAR" sga_valor=""/>
    </SGA_FILA>
    <SGA_BOTONES>
      <SGA_BOTON sga_nombre="Nuevo" sga_tipo="submit" sga_script="FrmNuevoMotivosSolicitud"/>
      <SGA_BOTON sga_nombre="Eliminar" sga_tipo="button" sga_script="eliminar"/>
    </SGA_BOTONES>
  </SGA_FORMULARIO>
</esql:connection>
</SGA_APLICACION>
</xsp:page>

And in the sitemap...
<map:match pattern="NuevoMotivosSolicitud">
      <map:act type="form-validator">
        <map:parameter name="descriptor" value="context://descriptores/NuevoMotivosSolicitud.xml"/>
        <map:parameter name="validate-set" value="NuevoMotivosSolicitud"/>
        <map:call resource="portal">
          <map:parameter name="accion" value="context://logica/configuracion/MotivosSolicitud/FrmMotivosSolicitud"/>
              <map:parameter name="validado" value="false"/>
              <map:parameter name="ajeno" value="false"/>
              <map:parameter name="primeraVez" value="false"/>
              <map:parameter name="vieneDeMod" value="false"/>
        </map:call>
      </map:act>
      <map:call resource="portal">
        <map:parameter name="accion" value="context://logica/configuracion/MotivosSolicitud/FrmNuevoMotivosSolicitud"/>
              <map:parameter name="validado" value="true"/>
              <map:parameter name="ajeno" value="false"/>
              <map:parameter name="primeraVez" value="false"/>
              <map:parameter name="vieneDeMod" value="false"/>
      </map:call>
    </map:match>

 If I don't use the form-validator in this "map:match" I have not this problem, so I'm very surprised....
Carlos.



Christian Haul wrote:

> On 11.Jul.2002 -- 03:54 PM, Carlos Maté wrote:
> > Hi.
> >
> > In my cocoon2 based application, queries in a xsp page using "esql" taglib  are executed  ¡¡ two times !! although, of course, they are only written once.
> > It doesn't happen always, but happen.
> > I think it's related with the form-validator but I'm not sure. And I need the form-validator.
> > Can you help me, please?
>
> Example, please.
> I do use both without problem.
>
>         Chris.
>
> Please follow up summarizing your problem and which suggested solution
> / information worked for you when you consider your problem
> solved. Add "SUMMARY: " to the subject line. This will make FAQ
> generation and searching the list easier. In addition, it makes
> helping you more fun. Thank you.
>
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ESQL QUERY

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 11.Jul.2002 -- 03:54 PM, Carlos Maté wrote:
> Hi.
> 
> In my cocoon2 based application, queries in a xsp page using "esql" taglib  are executed  ¡¡ two times !! although, of course, they are only written once.
> It doesn't happen always, but happen.
> I think it's related with the form-validator but I'm not sure. And I need the form-validator.
> Can you help me, please?

Example, please.
I do use both without problem.

	Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>