You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kirk Storer <ba...@yahoo.com> on 2004/06/28 21:40:05 UTC

PostgreSQL and Cocoon

I am trying to retrieve information from a postgresql
data base to use in my pages. I followed the
directions on the following page, but I didn't find
enough information.

http://wiki.apache.org/cocoon/PostgreSQL

What is the format of the xml that contains the query?
I am really clueless of what to do next. Any advice or
examples would be greatly appreciated.

Kirk


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PostgreSQL and Cocoon

Posted by defe <de...@free.fr>.
Kirk Storer wrote:

>All I am getting is a page not found error.
>Here is exactly what I have done:
>
>I have varified that posgres is accessable of tcp/ip
>
>Put the postgres jar in tomcathome/common/lib
>
>Added to web.xml under the commented out websphere
>entry:
>org.postgresql.Driver
>
>Added inside of <datasources> in cocoon.xconf:
>  <jdbc name="test">
>    <pool-controller min="5" max="10"/>
>   
><dburl>jdbc:postgresql://localhost:5432/test</dburl>
>    <user>user</user>
>    <password>password</password>
>  </jdbc>
>
>Added to sitemap.xml:
>             <map:match pattern="*.htm">
>               <map:generate src="sql.xml"/>
>               <map:transform type="sql">
>                   <map:parameter
>name="use-connection" value="test"/>
>                   <map:parameter
>name="show-nr-of-rows" value="true"/> 
>                   <map:parameter name="clob-encoding"
>value="UTF-8"/> 
>               </map:transform>
>
did you forget to <map:serialize/> just here?

>             </map:match>
>
>Created sql.xml: (tried with and without sql:
>prefixes)
><execute-query
>xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>  <query>
>    SELECT * FROM tablename
>  </query>
></execute-query>
>
>Any help is welcomed.
>
>Thanks,
>kirk
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PostgreSQL and Cocoon

Posted by Kirk Storer <ba...@yahoo.com>.
Got it working. Not sure what was wrong, but kept
tweaking it and got lucky.

Thanks for all the help,
Kirk


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PostgreSQL and Cocoon

Posted by Kirk Storer <ba...@yahoo.com>.
All I am getting is a page not found error.
Here is exactly what I have done:

I have varified that posgres is accessable of tcp/ip

Put the postgres jar in tomcathome/common/lib

Added to web.xml under the commented out websphere
entry:
org.postgresql.Driver

Added inside of <datasources> in cocoon.xconf:
  <jdbc name="test">
    <pool-controller min="5" max="10"/>
   
<dburl>jdbc:postgresql://localhost:5432/test</dburl>
    <user>user</user>
    <password>password</password>
  </jdbc>

Added to sitemap.xml:
             <map:match pattern="*.htm">
               <map:generate src="sql.xml"/>
               <map:transform type="sql">
                   <map:parameter
name="use-connection" value="test"/>
                   <map:parameter
name="show-nr-of-rows" value="true"/> 
                   <map:parameter name="clob-encoding"
value="UTF-8"/> 
               </map:transform>
             </map:match>

Created sql.xml: (tried with and without sql:
prefixes)
<execute-query
xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <query>
    SELECT * FROM tablename
  </query>
</execute-query>

Any help is welcomed.

Thanks,
kirk



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PostgreSQL and Cocoon

Posted by Yves Vindevogel <yv...@implements.be>.
Just a quick check:
1) Did you start Postgresql with the option -i to listen on port 5432 
on tcp/ip
2) Did you configure you pg_hba.conf ?
3) Did you make your data connection in your datapool ?

What error do you get in your cocoon screen anyway ?


On 28 Jun 2004, at 22:08, defe wrote:

> Kirk Storer wrote:
>
>> I am trying to retrieve information from a postgresql
>> data base to use in my pages. I followed the
>> directions on the following page, but I didn't find
>> enough information.
>>
>> http://wiki.apache.org/cocoon/PostgreSQL
>>
>> What is the format of the xml that contains the query?
>> I am really clueless of what to do next. Any advice or
>> examples would be greatly appreciated.
>>
>> Kirk
>>
> You'll find more information  at :
> http://wiki.cocoondev.org/Wiki.jsp?pageHowTos
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PostgreSQL and Cocoon

Posted by defe <de...@free.fr>.
Kirk Storer wrote:

>I am trying to retrieve information from a postgresql
>data base to use in my pages. I followed the
>directions on the following page, but I didn't find
>enough information.
>
>http://wiki.apache.org/cocoon/PostgreSQL
>
>What is the format of the xml that contains the query?
>I am really clueless of what to do next. Any advice or
>examples would be greatly appreciated.
>
>Kirk
>  
>
You'll find more information  at :
http://wiki.cocoondev.org/Wiki.jsp?pageHowTos




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PostgreSQL and Cocoon

Posted by Kirk Storer <ba...@yahoo.com>.
I haven't gotten that far yet.

Kirk


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PostgreSQL and Cocoon

Posted by defe <de...@free.fr>.
Kirk Storer wrote:

>I am trying to retrieve information from a postgresql
>data base to use in my pages. I followed the
>directions on the following page, but I didn't find
>enough information.
>
>http://wiki.apache.org/cocoon/PostgreSQL
>
>What is the format of the xml that contains the query?
>I am really clueless of what to do next. Any advice or
>examples would be greatly appreciated.
>
>Kirk
>  
>
how do you hit your database (eql, SQLTransformer, hibernate, ...) ?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org