You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bill Rolston <ro...@healthnetint.com> on 2000/03/04 06:11:24 UTC

SQLProcessor problems

Hello,

I'm having problems with the SQLProcessor function. I'm running Apache
1.3.11 with Jserv 1.1-2 and Cocoon 1.6 on Red Hat Linux 2.2.12-20 and I've
tried to create a simple test file and it appears that the tags for creating
the connection (as well as the <query> tag) don't seem to be recognized. For
example:

Test file:

<?xml version="1.0" encoding="UTF-8"?>
<?cocoon-process type="sql"?>

<?xml-stylesheet href="sql_test.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<sql_test_page>

<connectiondefs>
   <connection name="foo_con">
     <driver>oracle.jdbc.driver.OracleDriver</driver>
     <dburl>jdbc:oracle:thin:@XX.XX.XX.XX:1521:hni01d</dburl>
     <username>foobar</username>
     <password>foobar</password>
   </connection>
</connectiondefs>

<query connection="foo_con">
select NAME from EMP
</query>

</sql_test_page>

and what I get in the browser window is the following text line:

oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@XX.XX.XX.XX:1521:hni01d
foobar foobar select NAME from EMP

What this tells me (and I could be wrong) is that the SQLProcessor is not
processing the tags and just spitting out the text in the tags and not
interpreting them. I've looked at the SQLProcessor code (which looks to be
right) but I haven't re-compiled it and put it into the jar (though I'm not
sure of the efficacy of this). Has anyone any ideas as too where to look?
I'm probably missing something obvious but... perhaps a second pair of eyes
will see clearer.

Bill


Re: SQLProcessor problems

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 3 Mar 2000, Bill Rolston wrote:

> Hello,
> 
> I'm having problems with the SQLProcessor function. I'm running Apache
> 1.3.11 with Jserv 1.1-2 and Cocoon 1.6 on Red Hat Linux 2.2.12-20 and I've
> tried to create a simple test file and it appears that the tags for creating
> the connection (as well as the <query> tag) don't seem to be recognized. For
> example:
> 
> Test file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <?cocoon-process type="sql"?>
> 
> <?xml-stylesheet href="sql_test.xsl" type="text/xsl"?>
> <?cocoon-process type="xslt"?>
> <sql_test_page>
> 
> <connectiondefs>
>    <connection name="foo_con">
>      <driver>oracle.jdbc.driver.OracleDriver</driver>
>      <dburl>jdbc:oracle:thin:@XX.XX.XX.XX:1521:hni01d</dburl>
>      <username>foobar</username>
>      <password>foobar</password>
>    </connection>
> </connectiondefs>
> 
> <query connection="foo_con">
> select NAME from EMP
> </query>
> 
> </sql_test_page>
> 
> and what I get in the browser window is the following text line:
> 
> oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@XX.XX.XX.XX:1521:hni01d
> foobar foobar select NAME from EMP

Very strange. Can you turn on full error reporting and let me know if you
get anything? Hmm, it comes to my mind that underscores aren't allowed in
XML element names. Am I just making that up?

- donald


RE: SQLProcessor problems

Posted by Bill Rolston <ro...@healthnetint.com>.
exposed a bug in your servlet engine; maybe evil crackers modified your
JVM launcher to have a malformed CLASSPATH 85% of the time; maybe Oracle's
driver is really flaky. None of these possibilities seem particuarly
likely or even plausible, but neither is the situation you're describing.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yea, I agree that most of the stuff is rather bizarre and I'm not really
comfortable with this for the same thing that you mentioned. I'm not exactly
a neophyte in the world of computers and I find it aesthetically displeasing
that I can't find the reason that this happened as it will undoubtedly show
up again in the most unwanted of circumstances. I can only say that it
appears that there was someone else that appeared to have the same problem
(or at least very similar). I will try and investigate it from my end to try
and hunt this thing down. Even just for my own peace of mind.

BIll


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



RE: SQLProcessor problems

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 6 Mar 2000, Bill Rolston wrote:

> Donald,
> 
> I got this out of the error logs but I'm not sure how to interpret this:
> from jserv.log
> 
> [04/03/2000 08:46:58:741 PST] SqlServlet: started
> [04/03/2000 08:46:58:745 PST] java.lang.NoClassDefFoundError:
> oracle/jdbc/driver/OracleDriver
>         at
> org.apache.jserv.JServConnection.processRequest(JServConnection.java:320)
>         at org.apache.jserv.JServConnection.run(JServConnection.java:188)
>         at java.lang.Thread.run(Thread.java:475)
> 
> and from mod_jserv.log:
> 
> [05/03/2000 18:25:37:809] (ERROR) wrapper: printing debugging information
> (command line, env)
> [05/03/2000 18:25:37:822] (ERROR) wrapper: argument[ 0]
> /usr/jdk1.2.2/bin/java
> [05/03/2000 18:25:37:822] (ERROR) wrapper: argument[ 1]
> org.apache.jserv.JServ
> [05/03/2000 18:25:37:822] (ERROR) wrapper: argument[ 2]
> /etc/httpd/conf/jserv/jserv.properties
> [05/03/2000 18:25:37:822] (ERROR) wrapper: environment[ 0]
> PATH=/bin:/usr/bin:/usr/local/bin
> [05/03/2000 18:25:37:822] (ERROR) wrapper: environment[ 1]
> CLASSPATH=/usr/lib/apache/ApacheJServ.j
> ar:/home/httpd/classes/servlet-2.0.jar:/opt/cocoon/bin/Cocoon.jar:/usr/jdk1.
> 2.2/lib/tools.jar:/hom
> e/oracle/jdbc/lib/classes111.zip:/opt/cocoon1.5/bin/fop.0110.jar:/opt/cocoon
> 1.5/bin/xslp.19991017-
> fix.jar:/opt/cocoon1.5/bin/openxml.106-fix.jar:/opt/xt/sax.jar:/opt/xt/xt.ja
> r:/opt/xerces-1_0_1/xe
> rces.jar:/opt/xerces-1_0_1/xercesSamples.jar:/opt/xalan_0_19_2/xalan.jar:/op
> t/fop-0_12_1/fop_bin_0
> _12_1.jar:/opt/gnu.regexp-1.0.8/lib/gnu-regexp-1.0.8.jar:/opt/jndi_1_2_1/lib
> /jndi.jar:/opt/fesi/fe
> si.jar
> 
> Well I'm not completely dim (or maybe I am but...) and I can see that it is
> not finding the Oracle driver, but again, we have the problem of rebooting
> (several times) seems to clear everything up. I have a rough understanding
> of how things go together but perhaps I'm not clear about everything.
> Perhaps you can shine some light on this.

You are completely correct, that error indicates that the JVM is unable to
find the Oracle driver. If rebooting without changing anything fixes the
problem, well, you're looking at a really subtle problem that's almost
impossible for me to diagnose remotely (perhaps even locally). Maybe your
JVM is buggy; maybe you have the oracle driver in both your servlet
repository and your JVM classpath and it's being flaky; maybe you've
exposed a bug in your servlet engine; maybe evil crackers modified your
JVM launcher to have a malformed CLASSPATH 85% of the time; maybe Oracle's
driver is really flaky. None of these possibilities seem particuarly
likely or even plausible, but neither is the situation you're describing.

Odd that this is the only place this behavior is exposed, though. One
would think that this library loading problem would manifest itself in
other more terrible ways (say, failure to find xerces library). Does
manipualting the order of libraries in your CLASSPATH have any effect?

- donald


RE: SQLProcessor problems

Posted by Bill Rolston <ro...@healthnetint.com>.
Donald,

I got this out of the error logs but I'm not sure how to interpret this:
from jserv.log

[04/03/2000 08:46:58:741 PST] SqlServlet: started
[04/03/2000 08:46:58:745 PST] java.lang.NoClassDefFoundError:
oracle/jdbc/driver/OracleDriver
        at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:320)
        at org.apache.jserv.JServConnection.run(JServConnection.java:188)
        at java.lang.Thread.run(Thread.java:475)

and from mod_jserv.log:

[05/03/2000 18:25:37:809] (ERROR) wrapper: printing debugging information
(command line, env)
[05/03/2000 18:25:37:822] (ERROR) wrapper: argument[ 0]
/usr/jdk1.2.2/bin/java
[05/03/2000 18:25:37:822] (ERROR) wrapper: argument[ 1]
org.apache.jserv.JServ
[05/03/2000 18:25:37:822] (ERROR) wrapper: argument[ 2]
/etc/httpd/conf/jserv/jserv.properties
[05/03/2000 18:25:37:822] (ERROR) wrapper: environment[ 0]
PATH=/bin:/usr/bin:/usr/local/bin
[05/03/2000 18:25:37:822] (ERROR) wrapper: environment[ 1]
CLASSPATH=/usr/lib/apache/ApacheJServ.j
ar:/home/httpd/classes/servlet-2.0.jar:/opt/cocoon/bin/Cocoon.jar:/usr/jdk1.
2.2/lib/tools.jar:/hom
e/oracle/jdbc/lib/classes111.zip:/opt/cocoon1.5/bin/fop.0110.jar:/opt/cocoon
1.5/bin/xslp.19991017-
fix.jar:/opt/cocoon1.5/bin/openxml.106-fix.jar:/opt/xt/sax.jar:/opt/xt/xt.ja
r:/opt/xerces-1_0_1/xe
rces.jar:/opt/xerces-1_0_1/xercesSamples.jar:/opt/xalan_0_19_2/xalan.jar:/op
t/fop-0_12_1/fop_bin_0
_12_1.jar:/opt/gnu.regexp-1.0.8/lib/gnu-regexp-1.0.8.jar:/opt/jndi_1_2_1/lib
/jndi.jar:/opt/fesi/fe
si.jar

Well I'm not completely dim (or maybe I am but...) and I can see that it is
not finding the Oracle driver, but again, we have the problem of rebooting
(several times) seems to clear everything up. I have a rough understanding
of how things go together but perhaps I'm not clear about everything.
Perhaps you can shine some light on this.

Bill

-----Original Message-----
From: Donald Ball [mailto:balld@webslingerZ.com]
Sent: Sunday, March 05, 2000 11:32 PM
To: cocoon-users@xml.apache.org
Subject: RE: SQLProcessor problems


On Sun, 5 Mar 2000, Bill Rolston wrote:

> I bounced the server and it appears to have fixed it. This has got me
> worried as this is about the 7th time that I have bounced it and the
> previous 6 times (same source xml, same everything) nothing happened.
> Cuidado.

Ick, that's the worst kind of bug there. Okay dokay, is there anything
flaky happening with your sql server at all? not running out of
connections or anything silly like that, right?

- donald


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



RE: SQLProcessor problems

Posted by Donald Ball <ba...@webslingerZ.com>.
On Sun, 5 Mar 2000, Bill Rolston wrote:

> I bounced the server and it appears to have fixed it. This has got me
> worried as this is about the 7th time that I have bounced it and the
> previous 6 times (same source xml, same everything) nothing happened.
> Cuidado.

Ick, that's the worst kind of bug there. Okay dokay, is there anything
flaky happening with your sql server at all? not running out of
connections or anything silly like that, right?

- donald


RE: SQLProcessor problems

Posted by Bill Rolston <ro...@healthnetint.com>.
I bounced the server and it appears to have fixed it. This has got me
worried as this is about the 7th time that I have bounced it and the
previous 6 times (same source xml, same everything) nothing happened.
Cuidado.

Bill

-----Original Message-----
From: Bill Rolston [mailto:rolston@healthnetint.com]
Sent: Friday, March 03, 2000 9:11 PM
To: Cocoon-Users
Subject: SQLProcessor problems


Hello,

I'm having problems with the SQLProcessor function. I'm running Apache
1.3.11 with Jserv 1.1-2 and Cocoon 1.6 on Red Hat Linux 2.2.12-20 and I've
tried to create a simple test file and it appears that the tags for creating
the connection (as well as the <query> tag) don't seem to be recognized. For
example:

Test file:

<?xml version="1.0" encoding="UTF-8"?>
<?cocoon-process type="sql"?>

<?xml-stylesheet href="sql_test.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<sql_test_page>

<connectiondefs>
   <connection name="foo_con">
     <driver>oracle.jdbc.driver.OracleDriver</driver>
     <dburl>jdbc:oracle:thin:@XX.XX.XX.XX:1521:hni01d</dburl>
     <username>foobar</username>
     <password>foobar</password>
   </connection>
</connectiondefs>

<query connection="foo_con">
select NAME from EMP
</query>

</sql_test_page>

and what I get in the browser window is the following text line:

oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@XX.XX.XX.XX:1521:hni01d
foobar foobar select NAME from EMP

What this tells me (and I could be wrong) is that the SQLProcessor is not
processing the tags and just spitting out the text in the tags and not
interpreting them. I've looked at the SQLProcessor code (which looks to be
right) but I haven't re-compiled it and put it into the jar (though I'm not
sure of the efficacy of this). Has anyone any ideas as too where to look?
I'm probably missing something obvious but... perhaps a second pair of eyes
will see clearer.

Bill


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