You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ma...@swisscom.com on 2002/12/02 11:09:51 UTC
Microsoft SQLserver with cocoon
Hi
I want to use a microsoft sql server with cocoon, so I downloaded
Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
cocoon's library dir, restarted cocoon.
Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
to make a connection and get data?
Thanks
---------------------------------------------------------------------
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: Microsoft SQLserver with cocoon
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 02.Dec.2002 -- 11:09 AM, Maxime.Gheysen@swisscom.com wrote:
> Hi
> I want to use a microsoft sql server with cocoon, so I downloaded
> Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
> cocoon's library dir, restarted cocoon.
> Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
> to make a connection and get data?
Please read
http://xml.apache.org/cocoon/userdocs/concepts/databases.html
and documents linked from there.
For specifics on MS SQL, search this list for examples.
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: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections
Posted by Thor Heinrichs-Wolpert <th...@lunartek.com>.
Torque has some issues surrounding LOBs in Oracle, which have no
suitable work around for now (not eve a nifty bypass). Thanks for the
OJB url!
Thor HW
On Friday, December 6, 2002, at 02:53 AM, Nicola Ken Barozzi wrote:
>
>
> Antonio Gallardo wrote:
>> Hi,
>> I already saw your post on the wiki. :-D
>> The proposal is nice. Maybe we can make some changes to integrate
>> Torque
>> into Cocoon.
>> I will start to learn about Torque.
>> Thanks for your comments.
>
> Look at OJB http://jakarta.apache.org/ojb/index.html
>
> It's deemed to be better than torque by some Turbine developers, and
> has an Avalon component for it (ask on that dev list for it).
>
>> Antonio Gallardo.
>> Alex McLintock dijo:
>>> At 22:42 04/12/02, Gabriele Domenichini wrote:
>>>
>>>> Are you wondering how to connect Cocoon to your database and you
>>>> have
>>>> got one of theese?:
>>>>
>>>> * As400 <http://outerthought.net/wiki/Wiki.jsp?page=As400>
>>>> * BasisPlus <http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus>
>>>> * Oracle <http://outerthought.net/wiki/Wiki.jsp?page=Oracle>
>>>> * PostgreSQL
>>>> <http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL> * MsSQL
>>>> <http://outerthought.net/wiki/Wiki.jsp?page=MsSQL>
>>>> * MySQL <http://outerthought.net/wiki/Wiki.jsp?page=MySQL>
>>>>
>>>>
>>>> Then go to
>>>>
>>>> http://outerthought.net/wiki/
>>>> Wiki.jsp?page=SpecificDatabaseConnection
>>>>
>>>> Thanks to the tribute from people who had your same problem, you can
>>>> now follow instructions on:
>>>
>>>
>>> Or better still, why not try using Apache Torque which is part of the
>>> Apache Turbine project, and get database independance.
>>> Has anyone tried that yet?
>>>
>>> Alex McLintock
>>>
>>>
>>>
>
> --
> Nicola Ken Barozzi nicolaken@apache.org
> - verba volant, scripta manent -
> (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> 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: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Antonio Gallardo wrote:
> Hi,
>
> I already saw your post on the wiki. :-D
>
> The proposal is nice. Maybe we can make some changes to integrate Torque
> into Cocoon.
>
> I will start to learn about Torque.
>
> Thanks for your comments.
Look at OJB http://jakarta.apache.org/ojb/index.html
It's deemed to be better than torque by some Turbine developers, and has
an Avalon component for it (ask on that dev list for it).
> Antonio Gallardo.
>
> Alex McLintock dijo:
>
>>At 22:42 04/12/02, Gabriele Domenichini wrote:
>>
>>>Are you wondering how to connect Cocoon to your database and you have
>>>got one of theese?:
>>>
>>> * As400 <http://outerthought.net/wiki/Wiki.jsp?page=As400>
>>> * BasisPlus <http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus>
>>>* Oracle <http://outerthought.net/wiki/Wiki.jsp?page=Oracle>
>>> * PostgreSQL
>>><http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL> * MsSQL
>>><http://outerthought.net/wiki/Wiki.jsp?page=MsSQL>
>>> * MySQL <http://outerthought.net/wiki/Wiki.jsp?page=MySQL>
>>>
>>>
>>> Then go to
>>> http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
>>>
>>>Thanks to the tribute from people who had your same problem, you can
>>>now follow instructions on:
>>
>>
>>Or better still, why not try using Apache Torque which is part of the
>>Apache Turbine project, and get database independance.
>>Has anyone tried that yet?
>>
>>Alex McLintock
>>
>>
>>
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
---------------------------------------------------------------------
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: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections
Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Hi,
I already saw your post on the wiki. :-D
The proposal is nice. Maybe we can make some changes to integrate Torque
into Cocoon.
I will start to learn about Torque.
Thanks for your comments.
Antonio Gallardo.
Alex McLintock dijo:
> At 22:42 04/12/02, Gabriele Domenichini wrote:
>>Are you wondering how to connect Cocoon to your database and you have
>> got one of theese?:
>>
>> * As400 <http://outerthought.net/wiki/Wiki.jsp?page=As400>
>> * BasisPlus <http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus>
>> * Oracle <http://outerthought.net/wiki/Wiki.jsp?page=Oracle>
>> * PostgreSQL
>> <http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL> * MsSQL
>> <http://outerthought.net/wiki/Wiki.jsp?page=MsSQL>
>> * MySQL <http://outerthought.net/wiki/Wiki.jsp?page=MySQL>
>>
>>
>> Then go to
>> http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
>>
>>Thanks to the tribute from people who had your same problem, you can
>> now follow instructions on:
>
>
> Or better still, why not try using Apache Torque which is part of the
> Apache Turbine project, and get database independance.
> Has anyone tried that yet?
>
> Alex McLintock
>
>
>
>
> Openweb Analysts Ltd, London.
> Software For Complex Websites http://www.OWAL.co.uk/
> Open Source Software Companies please register here
> http://www.OWAL.co.uk/oss_support/
>
>
> ---------------------------------------------------------------------
> 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: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections
Posted by Alex McLintock <al...@OWAL.co.uk>.
At 22:42 04/12/02, Gabriele Domenichini wrote:
>Are you wondering how to connect Cocoon to your database and you have got
>one of theese?:
>
> * As400 <http://outerthought.net/wiki/Wiki.jsp?page=As400>
> * BasisPlus <http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus>
> * Oracle <http://outerthought.net/wiki/Wiki.jsp?page=Oracle>
> * PostgreSQL <http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL>
> * MsSQL <http://outerthought.net/wiki/Wiki.jsp?page=MsSQL>
> * MySQL <http://outerthought.net/wiki/Wiki.jsp?page=MySQL>
>
>
> Then go to
> http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
>
>Thanks to the tribute from people who had your same problem, you can now
>follow instructions on:
Or better still, why not try using Apache Torque which is part of the
Apache Turbine project, and get database independance.
Has anyone tried that yet?
Alex McLintock
Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here
http://www.OWAL.co.uk/oss_support/
---------------------------------------------------------------------
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: Deploying to Oracle's oc4j (aka Orion with mods)
Posted by Thor Heinrichs-Wolpert <th...@lunartek.com>.
I should've said -> I get this error when entering this URL
http://localhost:8888/cocoon/samples/welcome/
On Thursday, December 5, 2002, at 12:21 AM, Thor Heinrichs-Wolpert
wrote:
> I'm wondering if someone has already solved this.
>
> If I place my war file into Apache 4.1.12, everything works as
> expected.
>
> If I wrap the same war file into an ear and deploy it to oc4j ... it
> sort of works.
>
> Configuration:
> OSX 10.2
> Java 1.3.1
> Oracle's oc4j v 9.0.3
>
> Launch is
> java -Xbootclasspath/a:/<path to>/xalan-2.4.1.jar:/<path
> to>/xercesImpl-2.1.0.jar:/<path to>/xml-apis.jar
> -Djavax.xml.transform.TransformerFactory=
> org.apache.xalan.processor.TransformerFactoryImpl
> -Dorg.xml.sax.driver=oracle.xml.parser.v2.SAXParser
> -jar oc4j.jar
>
> I get the following error (which happens in other URI paths as well)
>
> Failed to load sitemap from
> file:/sw/oracle/products/oc4j/9.0.3/j2ee/home/applications/cocoon/
> cocoon/samples/welcome/sitemap.xmap
>
> More precisely:
>
> org.apache.cocoon.ProcessingException: Failed to load sitemap from
> file:/sw/oracle/products/oc4j/9.0.3/j2ee/home/applications/cocoon/
> cocoon/samples/welcome/sitemap.xmap:
> org.apache.cocoon.ResourceNotFoundException: Resource not found.:
> org.apache.excalibur.source.SourceNotFoundException: Resource not
> found
> file:/sw/oracle/products/oc4j/9.0.3/j2ee/home/applications/cocoon/
> cocoon/samples/welcome/sitemap.xmap
>
> Any hints?
> Cheers,
> Thor HW
>
>
> ---------------------------------------------------------------------
> 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>
Deploying to Oracle's oc4j (aka Orion with mods)
Posted by Thor Heinrichs-Wolpert <th...@lunartek.com>.
I'm wondering if someone has already solved this.
If I place my war file into Apache 4.1.12, everything works as expected.
If I wrap the same war file into an ear and deploy it to oc4j ... it
sort of works.
Configuration:
OSX 10.2
Java 1.3.1
Oracle's oc4j v 9.0.3
Launch is
java -Xbootclasspath/a:/<path to>/xalan-2.4.1.jar:/<path
to>/xercesImpl-2.1.0.jar:/<path to>/xml-apis.jar
-Djavax.xml.transform.TransformerFactory=
org.apache.xalan.processor.TransformerFactoryImpl
-Dorg.xml.sax.driver=oracle.xml.parser.v2.SAXParser
-jar oc4j.jar
I get the following error (which happens in other URI paths as well)
Failed to load sitemap from
file:/sw/oracle/products/oc4j/9.0.3/j2ee/home/applications/cocoon/
cocoon/samples/welcome/sitemap.xmap
More precisely:
org.apache.cocoon.ProcessingException: Failed to load sitemap from
file:/sw/oracle/products/oc4j/9.0.3/j2ee/home/applications/cocoon/
cocoon/samples/welcome/sitemap.xmap:
org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: Resource not found
file:/sw/oracle/products/oc4j/9.0.3/j2ee/home/applications/cocoon/
cocoon/samples/welcome/sitemap.xmap
Any hints?
Cheers,
Thor HW
---------------------------------------------------------------------
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>
MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections
Posted by Gabriele Domenichini <ga...@fastmail.fm>.
Are you wondering how to connect Cocoon to your database and you have
got one of theese?:
* As400 <http://outerthought.net/wiki/Wiki.jsp?page=As400>
* BasisPlus <http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus>
* Oracle <http://outerthought.net/wiki/Wiki.jsp?page=Oracle>
* PostgreSQL <http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL>
* MsSQL <http://outerthought.net/wiki/Wiki.jsp?page=MsSQL>
* MySQL <http://outerthought.net/wiki/Wiki.jsp?page=MySQL>
Then go to
http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
Thanks to the tribute from people who had your same problem, you can now
follow instructions on:
- Where to find the right drivers
- Which class to load for connection
- Tips and tricks specific of each database.
Please go there and contribute using the page and writing into it.
Now we can improve the mini-site:
- Restructuring it using the official documentation for the parts that
are common to all the DBs and Cocoon specific
- Going deeply describing success cases with complicated query or stored
procedures
- Enlargeing the number of DBs.
- Asking for inserting the best part of the initiative in the official
Covcoon documentation
Please support
---------------------------------------------------------------------
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: Microsoft SQLserver with cocoon
Posted by Gabriele Domenichini <ga...@fastmail.fm>.
Thanks all,
Please.... please contribute to the page on specific database
connections on wiki.
It's pretty simple:
1. go to
http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection
2. see what others like you have done. Copy one of them in a new page
you create
3. Adapt it to the specifity of Ms SQL connection and add tips that you
have learned
If someone had done it before, Maxime wouldn't have needed to ask for
the solution to the group.
Christopher Watson wrote:
>Maxime
>
>
>1)
>
>When I last got the drivers there were 3 jars, namely
>msbase.jar
>mssqlserver.jar
>msutil.jar
>
>Try putting all 3 jars into cocoon's WEB-INF/lib
>
>2)
>
>For mssql add following lines (between ... ...) to in WEB-INF/web.xml
>within
> <init-param>
> <param-name>load-class</param-name>
> <param-value>
>
>...
> <!-- For mssql2000 Driver: -->
> com.microsoft.jdbc.sqlserver.SQLServerDriver
>...
>
>3)
>
>Add following jdbc element within <datasources/> in cocoon.xconf
>
> <jdbc name="my_sql2000_cocoon_datasource">
> <pool-controller min="5" max="10"/>
>
><dburl>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydatabase
></dburl>
> <user>sa</user>
> <password>mypassword</password>
> </jdbc>
>
>assuming database on
>Server: localhost
>Port: 1433
>Database: mydatabase
>and user and password as specified
>please edit as necessary
>
>4)
>
>You can now (after restarting servlet engine) do something like
>
><?xml version="1.0"?>
><xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
>
><page>
> <esql:connection>
> <esql:pool>my_sql2000_cocoon_datasource</esql:pool>
> <my_table_element>
> <esql:execute-query>
> <esql:query>
> select fld1 as myfield1, fld1 as myfield2 from mytable
> </esql:query>
> <esql:results>
> <esql:row-results>
> <my_row_element>
> <my_column_one_element><esql:get-string
>column="myfield1"/></my_column_one_element>
> <my_column_two_element><esql:get-string
>column="myfield2"/></my_column_two_element>
> </my_row_element>
> </esql:row-results>
> </esql:results>
> <esql:no-results>
> <no-results>no-results</no-results>
> </esql:no-results>
> </esql:execute-query>
> </my_table_element>
> </esql:connection>
></page>
></xsp:page>
>
>Where
>
>
>-----Original Message-----
>From: Maxime.Gheysen@swisscom.com [mailto:Maxime.Gheysen@swisscom.com]
>Sent: 02 December 2002 10:10
>To: cocoon-users@xml.apache.org
>Subject: Microsoft SQLserver with cocoon
>
>
>Hi
>I want to use a microsoft sql server with cocoon, so I downloaded
>Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
>cocoon's library dir, restarted cocoon.
>Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
>to make a connection and get data?
>
>Thanks
>
>---------------------------------------------------------------------
>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>
>
>
>
>
---------------------------------------------------------------------
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: Microsoft SQLserver with cocoon
Posted by Christopher Watson <c....@zen.co.uk>.
Maxime
1)
When I last got the drivers there were 3 jars, namely
msbase.jar
mssqlserver.jar
msutil.jar
Try putting all 3 jars into cocoon's WEB-INF/lib
2)
For mssql add following lines (between ... ...) to in WEB-INF/web.xml
within
<init-param>
<param-name>load-class</param-name>
<param-value>
...
<!-- For mssql2000 Driver: -->
com.microsoft.jdbc.sqlserver.SQLServerDriver
...
3)
Add following jdbc element within <datasources/> in cocoon.xconf
<jdbc name="my_sql2000_cocoon_datasource">
<pool-controller min="5" max="10"/>
<dburl>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydatabase
</dburl>
<user>sa</user>
<password>mypassword</password>
</jdbc>
assuming database on
Server: localhost
Port: 1433
Database: mydatabase
and user and password as specified
please edit as necessary
4)
You can now (after restarting servlet engine) do something like
<?xml version="1.0"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<page>
<esql:connection>
<esql:pool>my_sql2000_cocoon_datasource</esql:pool>
<my_table_element>
<esql:execute-query>
<esql:query>
select fld1 as myfield1, fld1 as myfield2 from mytable
</esql:query>
<esql:results>
<esql:row-results>
<my_row_element>
<my_column_one_element><esql:get-string
column="myfield1"/></my_column_one_element>
<my_column_two_element><esql:get-string
column="myfield2"/></my_column_two_element>
</my_row_element>
</esql:row-results>
</esql:results>
<esql:no-results>
<no-results>no-results</no-results>
</esql:no-results>
</esql:execute-query>
</my_table_element>
</esql:connection>
</page>
</xsp:page>
Where
-----Original Message-----
From: Maxime.Gheysen@swisscom.com [mailto:Maxime.Gheysen@swisscom.com]
Sent: 02 December 2002 10:10
To: cocoon-users@xml.apache.org
Subject: Microsoft SQLserver with cocoon
Hi
I want to use a microsoft sql server with cocoon, so I downloaded
Microsoft JDBC drivers for MS Sql server, and put the lib (JAR) into
cocoon's library dir, restarted cocoon.
Now, do I have to modify the cocoon.xconf? Can anybody tell me the way
to make a connection and get data?
Thanks
---------------------------------------------------------------------
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>