You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Albert Cervera Areny <in...@sedifa.com> on 2002/08/09 12:35:16 UTC

Re: Yet another No suitable driver error

Thanks! It worked without problems!

But of  course I couldn't wait until having another problem ;-)
The thing is that I'm trying to make this work:

sitemap.xmap:

<map:generate src="docs/usuaris.xml"/>
<map:transform src="stylesheets/usuaris.xsl">
    <map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="sql">
    <map:parameter name="use-connection" value="cocoon"/>
</map:transform>
<map:transform src="stylesheets/usuaris.xsl"/>
<map:serialize type="xml"/>

While debugging I commented the last transform and data arrives as I expect.
In fact, I save the xml generated file with the browser and process it
with xalan using the usuaris.xsl and it works! But if I use this transform
in the sitemap I get all the fields returned but without any XML tags. (It
should return as xalan all the authentication XML structure)

Yes I know I'm using the same stylesheet twice but its for an
authentication process and It should work :-)

The strange thing is that last step <map:transform
src="stylesheets/usuaris.xsl"/>. Any clue?

Thanks, once again!

PS: I believe, after so many problems, some day I will be able to answer
all the questions in this list ;-) May be a new Trivial Pursuit about
cocoon? That


On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote:
> > From: Albert Cervera Areny [mailto:informatic@sedifa.com]
> >
> > I get the following error while trying to connect to a postgresql
>
> database
>
> > throw the SQLTransformer:
> >
> > java.sql.SQLException: No suitable driver
> >
> > I've seen in the list archives that it's been reported various times
>
> but
>
> > none of the solutions seems to correct my problem.
> >
> > web.xml:
> >
> >   <init-param>
> >     <param-name>load-class</param-name>
> >     <param-value>
> >       org.postgresql.Driver
> >     </param-value>
> >   </init-param>
> >   <init-param>
> >     <param-name>extra-classpath</param-name>
> >     <param-value>/usr/share/java/postgresql.jar</param-value>
>
> AFAIR, this will not work and has different purpose.
>
> Please jar under WEB-INF/lib.
>
> Vadim
>
>    </init-param>
>
> > cocoon.xconf:
> >
> > <datasources>
> >      <jdbc logger="core.datasources.postgres" name="cocoon">
> >             <pool-controller max="10" min="5"/>
> >             <driver>org.postgresql.Driver</driver>
> >             <dburl>jdbc:postgresql://localhost/cocoon:5432</dburl>
> >             <user>cocoon</user>
> >             <password>password</password>
> >      </jdbc>
> > </datasources>
> >
> > I don't know if org.postgresql.Driver is necessari in both files but I
> > started I've tried it in just one of them and doesn't work neighter.
> > Of course access to the database is enabled correctly, the port is
>
> 5432 as
>
> > NMAP says ;) and I can connect from psql. All connection data seems to
>
> be
>
> > correct... Any other ideas??
> >
> >
> > Thanks!
> >
> > Albert Cervera Areny
>
> ---------------------------------------------------------------------
> 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>

-- 
Albert Cervera Areny
Dept. Informàtica Sedifa, S.L.




---------------------------------------------------------------------
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: Problems with SQLTransformer

Posted by Luca Morandini <lu...@tin.it>.
Albert,

may you show us usuaris.xsl ?

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Albert Cervera Areny [mailto:informatic@sedifa.com]
> Sent: Friday, August 09, 2002 4:01 PM
> To: cocoon-users@xml.apache.org
> Subject: Problems with SQLTransformer
>
>
> Hi,
>   I start a new thread about it because the problem deserves this and I'm
> desperate ;-)
>
> <map:generate src="docs/consulta.xml"/>
> <map:transform type="sql">
>   <map:parameter name="use-connection" value="cocoon"/>
> </map:transform>
> <map:transform src="stylesheets/usuaris.xsl"/>
> <map:serialize type="xml"/>
>
> Looking at the source code of the generated xml with the browser I see
> only data no xml tags. Only the initial one: <?xml ....>
> I've been making some changes and it seems like after the SQLTransform I
> can't put a XSLTransform. I've tried the following things:
>    a) Take off the XSL transform and the result is correct. The data I get
> can be processed with xalan and usuaris.xsl and I get a new well formed
> XML file.
>    b) Change the name of usuaris.xsl (just in case I was modifing the
> wrong one) and it gives an error as cocoon can't find the file.
>    c) Leave usuaris.xsl empty and It gives an error.
>    d) Only leave the initial and final xsl:stylesheet tags and the output
> is the same.
>    e) Various modifications in the xsl file but does not seem to affect to
> the output unless it is bad formed, then it gives an error. So the file
> is processed but incorrectly?
>
> I don't know if it might be a bug or I'm really doing something very
> wrong, but it should be pretty stright forward, shouldn't it?
>
> Well... thanks for your patience ;-)
>
>
> > Thanks! It worked without problems!
> >
> > But of  course I couldn't wait until having another problem ;-)
> > The thing is that I'm trying to make this work:
> >
> > sitemap.xmap:
> >
> > <map:generate src="docs/usuaris.xml"/>
> > <map:transform src="stylesheets/usuaris.xsl">
> >     <map:parameter name="use-request-parameters" value="true"/>
> > </map:transform>
> > <map:transform type="sql">
> >     <map:parameter name="use-connection" value="cocoon"/>
> > </map:transform>
> > <map:transform src="stylesheets/usuaris.xsl"/>
> > <map:serialize type="xml"/>
> >
> > While debugging I commented the last transform and data arrives as I
> > expect. In fact, I save the xml generated file with the browser and
> > process it with xalan using the usuaris.xsl and it works! But if I use
> > this transform in the sitemap I get all the fields returned but without
> > any XML tags. (It should return as xalan all the authentication XML
> > structure)
> >
> > Yes I know I'm using the same stylesheet twice but its for an
> > authentication process and It should work :-)
> >
> > The strange thing is that last step <map:transform
> > src="stylesheets/usuaris.xsl"/>. Any clue?
> >
> > Thanks, once again!
> >
> > PS: I believe, after so many problems, some day I will be able to answer
> > all the questions in this list ;-) May be a new Trivial Pursuit about
> > cocoon? That
> >
> >
> > On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote:
> >> > From: Albert Cervera Areny [mailto:informatic@sedifa.com]
> >> >
> >> > I get the following error while trying to connect to a postgresql
> >>
> >> database
> >>
> >> > throw the SQLTransformer:
> >> >
> >> > java.sql.SQLException: No suitable driver
> >> >
> >> > I've seen in the list archives that it's been reported various times
> >>
> >> but
> >>
> >> > none of the solutions seems to correct my problem.
> >> >
> >> > web.xml:
> >> >
> >> >   <init-param>
> >> >     <param-name>load-class</param-name>
> >> >     <param-value>
> >> >       org.postgresql.Driver
> >> >     </param-value>
> >> >   </init-param>
> >> >   <init-param>
> >> >     <param-name>extra-classpath</param-name>
> >> >     <param-value>/usr/share/java/postgresql.jar</param-value>
> >>
> >> AFAIR, this will not work and has different purpose.
> >>
> >> Please jar under WEB-INF/lib.
> >>
> >> Vadim
> >>
> >>    </init-param>
> >>
> >> > cocoon.xconf:
> >> >
> >> > <datasources>
> >> >      <jdbc logger="core.datasources.postgres" name="cocoon">
> >> >             <pool-controller max="10" min="5"/>
> >> >             <driver>org.postgresql.Driver</driver>
> >> >             <dburl>jdbc:postgresql://localhost/cocoon:5432</dburl>
> >> <user>cocoon</user>
> >> >             <password>password</password>
> >> >      </jdbc>
> >> > </datasources>
> >> >
> >> > I don't know if org.postgresql.Driver is necessari in both files but
> >> I started I've tried it in just one of them and doesn't work
> >> neighter. Of course access to the database is enabled correctly, the
> >> port is
> >>
> >> 5432 as
> >>
> >> > NMAP says ;) and I can connect from psql. All connection data seems
> >> to
> >>
> >> be
> >>
> >> > correct... Any other ideas??
> >> >
> >> >
> >> > Thanks!
> >> >
> >> > Albert Cervera Areny
> >>
> >> ---------------------------------------------------------------------
> >> 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>
> >
> > --
> > Albert Cervera Areny
> > Dept. Informàtica Sedifa, S.L.
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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>
>
>
> --
> Albert Cervera Areny
> Dept. Informàtica Sedifa, S.L.
>
>
>
> ---------------------------------------------------------------------
> 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>


Problems with SQLTransformer

Posted by Albert Cervera Areny <in...@sedifa.com>.
Hi,
  I start a new thread about it because the problem deserves this and I'm
desperate ;-)

<map:generate src="docs/consulta.xml"/>
<map:transform type="sql">
  <map:parameter name="use-connection" value="cocoon"/>
</map:transform>
<map:transform src="stylesheets/usuaris.xsl"/>
<map:serialize type="xml"/>

Looking at the source code of the generated xml with the browser I see
only data no xml tags. Only the initial one: <?xml ....>
I've been making some changes and it seems like after the SQLTransform I
can't put a XSLTransform. I've tried the following things:
   a) Take off the XSL transform and the result is correct. The data I get
can be processed with xalan and usuaris.xsl and I get a new well formed
XML file.
   b) Change the name of usuaris.xsl (just in case I was modifing the
wrong one) and it gives an error as cocoon can't find the file.
   c) Leave usuaris.xsl empty and It gives an error.
   d) Only leave the initial and final xsl:stylesheet tags and the output
is the same.
   e) Various modifications in the xsl file but does not seem to affect to
the output unless it is bad formed, then it gives an error. So the file
is processed but incorrectly?

I don't know if it might be a bug or I'm really doing something very
wrong, but it should be pretty stright forward, shouldn't it?

Well... thanks for your patience ;-)


> Thanks! It worked without problems!
>
> But of  course I couldn't wait until having another problem ;-)
> The thing is that I'm trying to make this work:
>
> sitemap.xmap:
>
> <map:generate src="docs/usuaris.xml"/>
> <map:transform src="stylesheets/usuaris.xsl">
>     <map:parameter name="use-request-parameters" value="true"/>
> </map:transform>
> <map:transform type="sql">
>     <map:parameter name="use-connection" value="cocoon"/>
> </map:transform>
> <map:transform src="stylesheets/usuaris.xsl"/>
> <map:serialize type="xml"/>
>
> While debugging I commented the last transform and data arrives as I
> expect. In fact, I save the xml generated file with the browser and
> process it with xalan using the usuaris.xsl and it works! But if I use
> this transform in the sitemap I get all the fields returned but without
> any XML tags. (It should return as xalan all the authentication XML
> structure)
>
> Yes I know I'm using the same stylesheet twice but its for an
> authentication process and It should work :-)
>
> The strange thing is that last step <map:transform
> src="stylesheets/usuaris.xsl"/>. Any clue?
>
> Thanks, once again!
>
> PS: I believe, after so many problems, some day I will be able to answer
> all the questions in this list ;-) May be a new Trivial Pursuit about
> cocoon? That
>
>
> On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote:
>> > From: Albert Cervera Areny [mailto:informatic@sedifa.com]
>> >
>> > I get the following error while trying to connect to a postgresql
>>
>> database
>>
>> > throw the SQLTransformer:
>> >
>> > java.sql.SQLException: No suitable driver
>> >
>> > I've seen in the list archives that it's been reported various times
>>
>> but
>>
>> > none of the solutions seems to correct my problem.
>> >
>> > web.xml:
>> >
>> >   <init-param>
>> >     <param-name>load-class</param-name>
>> >     <param-value>
>> >       org.postgresql.Driver
>> >     </param-value>
>> >   </init-param>
>> >   <init-param>
>> >     <param-name>extra-classpath</param-name>
>> >     <param-value>/usr/share/java/postgresql.jar</param-value>
>>
>> AFAIR, this will not work and has different purpose.
>>
>> Please jar under WEB-INF/lib.
>>
>> Vadim
>>
>>    </init-param>
>>
>> > cocoon.xconf:
>> >
>> > <datasources>
>> >      <jdbc logger="core.datasources.postgres" name="cocoon">
>> >             <pool-controller max="10" min="5"/>
>> >             <driver>org.postgresql.Driver</driver>
>> >             <dburl>jdbc:postgresql://localhost/cocoon:5432</dburl>
>> <user>cocoon</user>
>> >             <password>password</password>
>> >      </jdbc>
>> > </datasources>
>> >
>> > I don't know if org.postgresql.Driver is necessari in both files but
>> I started I've tried it in just one of them and doesn't work
>> neighter. Of course access to the database is enabled correctly, the
>> port is
>>
>> 5432 as
>>
>> > NMAP says ;) and I can connect from psql. All connection data seems
>> to
>>
>> be
>>
>> > correct... Any other ideas??
>> >
>> >
>> > Thanks!
>> >
>> > Albert Cervera Areny
>>
>> ---------------------------------------------------------------------
>> 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>
>
> --
> Albert Cervera Areny
> Dept. Informàtica Sedifa, S.L.
>
>
>
>
> ---------------------------------------------------------------------
> 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>


-- 
Albert Cervera Areny
Dept. Informàtica Sedifa, S.L.



---------------------------------------------------------------------
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>