You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by DU...@britbio.co.uk on 2000/03/22 18:31:34 UTC
SQL processor: dburl syntax for oracle
I'm having difficulty getting the SQL processor to connect to oracle.
The SQL processor is running (as judged by it stripping out the
connectiondefs section of the xml).
The query is not being run. Instead the query element is untouched.
The error log contains
java.sql.SQLException: Invalid Oracle URL specified: OracleDriver.connect
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:775)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:143)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at
org.apache.cocoon.processor.sql.ConnectionCreator.getConnection(ConnectionCr
eator.java:88)
at
org.apache.cocoon.processor.sql.ConnectionDefs.getConnection(ConnectionDefs.
java:179)
at org.apache.cocoon.processor.sql.SQLProcessor.process(Compiled
Code)
at org.apache.cocoon.Engine.handle(Compiled Code)
at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
at org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java:479)
This looks to me as if the dburl is incorrect. I'm using
<connectiondefs>
<connection name="foo-connection">
<driver>oracle.jdbc.driver.OracleDriver</driver>
<dburl>jdbc:oracle:thin@XX.XX.XX.XX:1521:d2k</dburl>
<username>XXXXXX</username>
<password>YYYYYY</password>
</connection>
</connectiondefs>
which was worked out on the basis of a previous post
http://xml-archive.webweaving.org/xml-archive-cocoon-users/1059.html
I can connect to the oracle database directly from java using the same jdbc
drivers, so there's nothing inherantly wrong.
Can anyone spot anything wrong with this, or am I looking in the wrong
place?
Many thanks
Tim
---------------------------------------------
Tim Dudgeon
dudgeon@britbio.co.uk
Re: SQL processor: dburl syntax for oracle
Posted by Brian P Millett <bp...@ec-group.com>.
DUDGEON@britbio.co.uk wrote:
> I'm having difficulty getting the SQL processor to connect to oracle.
> This looks to me as if the dburl is incorrect. I'm using
>
> <connectiondefs>
> <connection name="foo-connection">
> <driver>oracle.jdbc.driver.OracleDriver</driver>
> <dburl>jdbc:oracle:thin@XX.XX.XX.XX:1521:d2k</dburl>
> <username>XXXXXX</username>
> <password>YYYYYY</password>
> </connection>
> </connectiondefs>
>
>
> Can anyone spot anything wrong with this, or am I looking in the wrong
> place?
Tim, the above is correct (at least for me) for Oracle 8i,
Solaris_JDK_1.2.1_04, Cocoon 1.7.
Is the database (d2k) correct?
What was the query? Something like this works:
<query connection="foo-connection"
null-indicator="y"
tag-case="upper">
SELECT * FROM EMPLOYEE
</query>
--
Brian Millett
Enterprise Consulting Group "Shifts in paradigms
(314) 205-9030 often cause nose bleeds."
bpm@ec-group.com Greg Glenn
Re: SQL processor: dburl syntax for oracle
Posted by Raj Basavaraju <ra...@bidland.com>.
DUDGEON@britbio.co.uk wrote:
> I'm having difficulty getting the SQL processor to connect to oracle.
> <dburl>jdbc:oracle:thin@XX.XX.XX.XX:1521:d2k</dburl>
I think you are missing a : (colon) before @ sign for oracle thin driver.
<dburl>jdbc:oracle:thin:@XX.XX.XX.XX:1521:d2k</dburl>
Give a try and see what happens.
Raj