cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SANSONE, AARON M [Non-Pharmacia/1000]" <aaron.m.sans...@monsanto.com>
Subject RE: Calling C2 from command line: problem with Oracle driver
Date Tue, 04 Dec 2001 17:12:38 GMT
Hi Christoph,

To get oracle working, you must first add a section to load the oracle
driver class in the web.xml file. Be certain that the Oracle driver Jar file
is in your servlet engine's classpath.

<web-app>
	<servlet>
		<servlet-name>Cocoon2</servlet-name>
		<init-param>
			<param-name>load-class</param-name>
			<param-value>
				oracle.jdbc.driver.OracleDriver
			</param-value>
		</init-param>
		...
	</servlet>
</web-app>

Then in the cocoon.xconf configuration file you must specify a datasource
such as:

  <datasources>
    <jdbc name="mydata">
      <pool-controller min="5" max="10" oradb="true"/>
      <dburl>jdbc:oracle:thin:@myserver.mydomain.com:1521:myInstance</dburl>
      <user>scott</user>
      <password>tiger</password>
    </jdbc>
  </datasources>


Finally, you can either use the connection in an XSP page or pass a Query in
XML to the SQL transformer as part of a pipeline in your sitemap:

		<map:transform type="sql">
			<map:parameter name="use-connection" value="fp"/>
			<map:parameter name="show-nr-of-rows"
value="false"/>
		</map:transform>


HTH,
Aaron


-----Original Message-----
From: Christoph.Oberle@mlp-ag.com [mailto:Christoph.Oberle@mlp-ag.com]
Sent: Tuesday, December 04, 2001 6:14 AM
To: cocoon-users@xml.apache.org
Subject: Calling C2 from command line: problem with Oracle driver


Hello,

I'm working with Cocoon2.0-rc1a and Tomcat 3.2.3 on a Linux-Server.
With Tomcat everything is fine, but yesterday I tried to call Cocoon from
the
command line.
I did not find any documentation on command line parameters and options,
only
the definition of
COCOON_LIB and COCOON_WORK environment variables in run.sh.
After some hours my Cocoon command line environment nearly works, but there
is a
problem left:

I can not get the Oracle JDBC (thin) driver to work. I think it has do do
with
the missing initialization of the JDBC driver class.

When Cocoon is called from Tomcat, there is a configuration file called
web.xml
in the WEB-INF directory, where the initial parameters - like load-class -
are
defined.

What is the right way to specify these settings for command line execution?

Many thanks in advance
Christoph

PS: How can I specify directories, like the application directory, which is
assumed to be "./webapp" etc.



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