cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hahn Kurt (CHA)" <kurt.h...@etat.ge.ch>
Subject RE: please, please, ... help with SQL transformer
Date Thu, 11 Apr 2002 06:49:52 GMT
Since nobody else answered, I'll give it a try.
I don't know how that works with Access, but your datasource declaration
seems incomplete. E.g. here's mine (of course it looks differently because
your using JDBC-ODCB for Access, whereas with Oracle, there's a native
JDBC-driver):
<datasources>
    <!-- Oracle DB --> 
<jdbc name="aigle_oracle_pool"> 
<pool-controller min="5" max="10" oradb="true" /> 
<auto-commit>true</auto-commit> 
<dburl>jdbc:oracle:thin:@pallas6:1521:PAIG</dburl> 
<user>MyUsername</user> 
<password>MyPW</password> 
</jdbc>

Something else you could try is, in web.xml, comment out the IBM Websphere
section, and place your declaration in front of the other one. Can sometimes
help in case of a strange classloader problem.

Otherwise, give us more info. Check the various logs for that. Or try to use
Oracle directly, I think it is easier for Java applications. 

Did you test your connection in another front-end application? E.g. a small
Java program,just to see if it works.

Regards 
Kurt
-----Message d'origine-----
De: Jerónimo Molina [mailto:j.molina@spi-nv.es]
Date: mercredi, 10. avril 2002 16:57
À: cocoon-users@xml.apache.org
Objet: please, please, ... help with SQL transformer


Hi all  (sorry for my poor english):

	My name's Jeronimo Molina, and I'm neby with cocoon.
	I'm trying to work with SQL transformers, for generate an HTML page
with
data stored in a ACCESS database on my machine (it's my first work with
cocoon, so I don't want to do this with ORACLE any other DB).

	I'm trying to do this at the next steps:

	1.- Configure the JDBC-ODBC driver at the web.xml file, by adding

		sun.jdbc.odbc.JdbcOdbcDriver

		as shown bellow:

		<init-param>
		<param-name>load-class</param-name>
			<!-- For IBM WebSphere
			com.ibm.servlet.classloader.Handler -->

			<!-- For Database Driver -->
			oprg.hsqldb.jdbcDriver

			<!-- For JDBC:ODBC -->
			sun.jdbc.odbc.JdbcOdbcDriver
		</param-value>
		</init-pram>

	2.- Configure the connection ad the cocoon.xml file as shown bellow:

		<datasources>
			<jdbc name="personas">
				<dburl>jdbc:odbc:nombres</dburl>
			</jdbc>
		</datasources>

		Note that nombres is the name of the ODBC I've just created
pointing to my
access database.

	3.- Configure the sitemap.xmap file to use my new connection. I've
done
this modifying a line:


		<map:match pattern="sql/*">
			<map:generate src="docs/samples/sql/{1}.xml"/>
			<map:transform type="sql">
				<map:parameter name="use-connection"
value="personas"/>
			</map:transform>
			<map:transform
src="stylesheets/simple-sql2html.xsl"/>
			<map:serialize/>
		</map:match>


	4.- I've also modified the sql-page.xml, putting the code

		<query>
			select id,nombre from nombres
		</query>

			(where nombres is the table name)

		in order of the query example provided in that file.

	BUT.... I don't get the data stored in my access database, and I
don't know
why.

	please, can anyone help me?

	Thanks... Jeronimo.







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

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

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

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


Mime
View raw message