You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by CARLOS VINUEZA <ch...@yahoo.com> on 2000/03/03 22:53:35 UTC

SQLProcessor and MySQL

hi, I'm new on this, and I'm trying to make SQL
Proccessor work.

I took the rowset.xml example that's in the mailing
list archive

This is the part of the code that isn't clear for me:

<connectiondefs>
  <connection name="www_odbc">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://xx.xx.xx.xx/AutoAuto</dburl>
   <username/>
   <password/>
  </connection>
 </connectiondefs>
<query connection="www_odbc">
  select * from estados_de_pedido
 </query>

where xx.xx.xx.xx is the host ip, and AutoAuto is the
database name

When I tried to see it on the browser I've just got


org.gjt.mm.mysql.Driver
jdbc:mysql://204.225.203.178/AutoAuto select *
from estados_de_pedido

in Explorer5, and nothing in Netscape,

I tried Cocoon, with normal XML files and works fine,
does anybody can
tell me what I'm doing wrong??

I'm using Apache1.3.9 with ApacheJServ and MySQL
database


--
Computers let you make More mistakes faster
than any other invention in human history
with the possible exception of handguns and tequila.


cArLos  8-)



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Re: SQLProcessor and MySQL

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

> hi, I'm new on this, and I'm trying to make SQL
> Proccessor work.
> 
> I took the rowset.xml example that's in the mailing
> list archive
> 
> This is the part of the code that isn't clear for me:
> 
> <connectiondefs>
>   <connection name="www_odbc">
>    <driver>org.gjt.mm.mysql.Driver</driver>
>    <dburl>jdbc:mysql://xx.xx.xx.xx/AutoAuto</dburl>
>    <username/>
>    <password/>
>   </connection>
>  </connectiondefs>
> <query connection="www_odbc">
>   select * from estados_de_pedido
>  </query>
> 
> where xx.xx.xx.xx is the host ip, and AutoAuto is the
> database name

Try it without the username and password elements. Having the empty
elements is probably making SQLProcessor attempt to connect to the mysql
server using the empty string as username/password, instead of attempting
to connect as the guest user.

- donald


Re: SQLProcessor and MySQL

Posted by Russell Castagnaro <ru...@synctank.com>.
Yikes!
After this message I decided to hook Cocoon into my instance of MySQL too, Well
it REALLY messed things up.
The results of the Translation yields:

?xml version="1.0"?>

<?cocoon-process type="sql"?>
<?cocoon-format type="text/xml"?>

<page>

 <query connection="mysql">
  SELECT * FROM URL_Resources
 </query>

</page>


HOWEVER this isn't the big deal.  Now it seems MySQL has been completely hosed!
Whenever I try to connect to it I get:
ava.sql.SQLException: Communication link failure: Bad handshake at
java.lang.Throwable.fillInStackTrace(Native Method) at
java.lang.Throwable.(Throwable.java:94) at
java.lang.Exception.(Exception.java:42) at
java.sql.SQLException.(SQLException.java:43) at
org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:225) at
org.gjt.mm.mysql.Connection.(Connection.java:229)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126) at

WHAT ON EARTH Happened??

Thanks in advance

Terry Paddy wrote:

> Hi Carlos,
>
> >I'm using Apache1.3.9 with ApacheJServ and MySQL database
> I'm using the same setup and it works fine for me
>
> <?xml version="1.0" ?>
>   <?cocoon-process type="sql"?>
>   <?cocoon-format type="text/xml"?>
>
> <WD23>
>
> <connectiondefs>
>    <connection name="connection1">
>     <driver>org.gjt.mm.mysql.Driver</driver>
>     <dburl>jdbc:mysql://home.mySite.com/demo</dburl>
>     <username>anybody</username>
>     <password>anything</password>
>    </connection>
>   </connectiondefs>
>
>   <query connection="connection1" doc-element="6854" row-element="Shift"
> id-attribute-column="idName">SELECT * FROM roster    where empid="6854"
> ORDER BY start
>   </query>
>
> </WD23>
>
> Maybe the username/password can't be blank?
> I know it's not much help, but at least you know what you are trying to do
> does work elsewhere :-)
>
> Regards ...
> Terry
> Christchurch, New Zealand
>
> -----Original Message-----
> From: CARLOS VINUEZA [mailto:chinesco@yahoo.com]
> Sent: Saturday, 4 March 2000 10:54
> To: cocoon-users@xml.apache.org
> Subject: SQLProcessor and MySQL
>
> hi, I'm new on this, and I'm trying to make SQL
> Proccessor work.
>
> I took the rowset.xml example that's in the mailing
> list archive
>
> This is the part of the code that isn't clear for me:
>
> <connectiondefs>
>   <connection name="www_odbc">
>    <driver>org.gjt.mm.mysql.Driver</driver>
>    <dburl>jdbc:mysql://xx.xx.xx.xx/AutoAuto</dburl>
>    <username/>
>    <password/>
>   </connection>
>  </connectiondefs>
> <query connection="www_odbc">
>   select * from estados_de_pedido
>  </query>
>
> where xx.xx.xx.xx is the host ip, and AutoAuto is the
> database name
>
> When I tried to see it on the browser I've just got
>
> org.gjt.mm.mysql.Driver
> jdbc:mysql://204.225.203.178/AutoAuto select *
> from estados_de_pedido
>
> in Explorer5, and nothing in Netscape,
>
> I tried Cocoon, with normal XML files and works fine,
> does anybody can
> tell me what I'm doing wrong??
>
> I'm using Apache1.3.9 with ApacheJServ and MySQL
> database
>
> --
> Computers let you make More mistakes faster
> than any other invention in human history
> with the possible exception of handguns and tequila.
>
> cArLos  8-)
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--

Russell Castagnaro
Chief Mentor
SyncTank Solutions
http://www.synctank.com

Earth is the cradle of mankind; one does not remain in the cradle forever
-Tsiolkovsky



RE: SQLProcessor and MySQL

Posted by Terry Paddy <te...@rostersetc.com>.
Hi Carlos,

>I'm using Apache1.3.9 with ApacheJServ and MySQL database
I'm using the same setup and it works fine for me

<?xml version="1.0" ?>
  <?cocoon-process type="sql"?>
  <?cocoon-format type="text/xml"?>

<WD23>

<connectiondefs>
   <connection name="connection1">
    <driver>org.gjt.mm.mysql.Driver</driver>
    <dburl>jdbc:mysql://home.mySite.com/demo</dburl>
    <username>anybody</username>
    <password>anything</password>
   </connection>
  </connectiondefs>

  <query connection="connection1" doc-element="6854" row-element="Shift"
id-attribute-column="idName">SELECT * FROM roster    where empid="6854"
ORDER BY start
  </query>

</WD23>

Maybe the username/password can't be blank?
I know it's not much help, but at least you know what you are trying to do
does work elsewhere :-)

Regards ...
Terry
Christchurch, New Zealand

-----Original Message-----
From: CARLOS VINUEZA [mailto:chinesco@yahoo.com]
Sent: Saturday, 4 March 2000 10:54
To: cocoon-users@xml.apache.org
Subject: SQLProcessor and MySQL


hi, I'm new on this, and I'm trying to make SQL
Proccessor work.

I took the rowset.xml example that's in the mailing
list archive

This is the part of the code that isn't clear for me:

<connectiondefs>
  <connection name="www_odbc">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://xx.xx.xx.xx/AutoAuto</dburl>
   <username/>
   <password/>
  </connection>
 </connectiondefs>
<query connection="www_odbc">
  select * from estados_de_pedido
 </query>

where xx.xx.xx.xx is the host ip, and AutoAuto is the
database name

When I tried to see it on the browser I've just got


org.gjt.mm.mysql.Driver
jdbc:mysql://204.225.203.178/AutoAuto select *
from estados_de_pedido

in Explorer5, and nothing in Netscape,

I tried Cocoon, with normal XML files and works fine,
does anybody can
tell me what I'm doing wrong??

I'm using Apache1.3.9 with ApacheJServ and MySQL
database


--
Computers let you make More mistakes faster
than any other invention in human history
with the possible exception of handguns and tequila.


cArLos  8-)



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

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