Re: Try this Re: Can't connect to MySQL with Cocoon 2

2002-05-10 Thread Roger I Martin PhD

Hi,

The WEB-INF/cocoon.xconf I use has the 

datasources

jdbc name=HWITCD

driver@database-driver@/driver

pool-controller min=1 max=10/

!--auto-commitfalse/auto-commit--

dburl@database-url@/dburl

user@database-user@/user

password@database-password@/password

/jdbc

/datasources

where in the database.properties 

database-driver=org.gjt.mm.mysql.Driver

database-url=jdbc:mysql://localhost:3306/WITCD

database-user=martin

database-password=martin



I'm using the 

http://www.worldserver.com/mm.mysql - http://mmmysql.sourceforge.net/

JDBC driver. And using Tomcat v4.0-b7 but usually is not a problem.

More later,

-Roger

- Original Message - 
From: Arda Balci [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 10, 2002 12:37 AM
Subject: Re: Try this Re: Can't connect to MySQL with Cocoon 2


 Hi Roger,
 
 I made a clean install and then did not be able to
 connect to mysql server. These are the related lines.
 What can be the reason of the error?
 
 This is the core.log error:
 
 WARN(2002-05-10) 07:24.46:708  
 [core.datasources.mysql_pool](/cocoon/kolon.html)
 HttpProcessor[8080][3]/LogKitLogger: Could not return
 Connection
 org.apache.avalon.excalibur.datasource.NoValidConnectionException:
 No valid JdbcConnection class available
 
 I copied only the necessary line. It says no valid
 connection, but in the DEBUG line the Classpath
 contains D:\Program Files\Apache Tomcat
 4.0\webapps\cocoon\WEB-INF\lib\mysql.jar;, which i
 downloaded yesterday.
 
 This is the web.xml section as stated in the userdocs:
 init-param
   param-nameload-class/param-name
   param-value
 org.gjt.mm.mysql.Driver
   /param-value
 /init-param
 
 This is the cocoon.xconf:
   datasources
 jdbc logger=core.datasources.mysql_pool
 name=mysql_pool
   pool-controller max=10 min=5/
   dburljdbc:mysql://localhost/test/dburl
   userarda/user
   passwordarda/password
 /jdbc
   /datasources
 
 This is the sitemap:
map:match pattern=kolon.html
 map:generate src=mysql/kolon.xml/
 map:transform type=sql
   map:parameter name=use-connection
 value=mysql_pool/
 /map:transform
  map:transform src=mysql/stylesheets/sql.xsl/
 map:serialize/
/map:match
 
 Thank you for your attention and your time.
 Arda
 
 
 __
 Do You Yahoo!?
 Yahoo! Shopping - Mother's Day is May 12th!
 http://shopping.yahoo.com
 
 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Try this Re: Can't connect to MySQL with Cocoon 2

2002-05-09 Thread Roger I Martin PhD

Hi,

I am a fellow applier of Cocoon and MySQL.  If you haven't solved it yet
perhaps you may want to attach you mysql connection files, excerpts from the
tomcat/logs.localhost*.txt for the error, versions, etc.  I can look at it
tomorrow morning.

I had originally modified Avalon Pool connection(still using it) to get it
to work with jvm 1.4 and MySQL.  I am in the middle of getting the latest
HEAD of Cocoon2 and avalon to work with the jvm and MySQL and trying to
determine the problem there so might as well look at more of the same:)

-Roger
- Original Message -
From: Arda Balci [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 11:02 AM
Subject: Re: Try this Re: Can't connect to MySQL with Cocoon 2


 I have a mysql connection problem:
 I configured cocoon.xconf, web.xml, and the xml
 content file, correctly as stated in the user docs,and
 as stated in the mailing list and double checked the
 files.

 But the page doesn't load, there is only a blank page,
 no error page coming, and there is no further change,
 browser tries to load, but stucks, the other cocoon
 pages are not effected, they are working properly.

 Why can this be?


 __
 Do You Yahoo!?
 Yahoo! Shopping - Mother's Day is May 12th!
 http://shopping.yahoo.com

 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Try this Re: Can't connect to MySQL with Cocoon 2

2002-05-09 Thread Arda Balci

Hi Roger,

I made a clean install and then did not be able to
connect to mysql server. These are the related lines.
What can be the reason of the error?

This is the core.log error:

WARN(2002-05-10) 07:24.46:708  
[core.datasources.mysql_pool](/cocoon/kolon.html)
HttpProcessor[8080][3]/LogKitLogger: Could not return
Connection
org.apache.avalon.excalibur.datasource.NoValidConnectionException:
No valid JdbcConnection class available

I copied only the necessary line. It says no valid
connection, but in the DEBUG line the Classpath
contains D:\Program Files\Apache Tomcat
4.0\webapps\cocoon\WEB-INF\lib\mysql.jar;, which i
downloaded yesterday.

This is the web.xml section as stated in the userdocs:
init-param
  param-nameload-class/param-name
  param-value
org.gjt.mm.mysql.Driver
  /param-value
/init-param

This is the cocoon.xconf:
  datasources
jdbc logger=core.datasources.mysql_pool
name=mysql_pool
  pool-controller max=10 min=5/
  dburljdbc:mysql://localhost/test/dburl
  userarda/user
  passwordarda/password
/jdbc
  /datasources

This is the sitemap:
   map:match pattern=kolon.html
map:generate src=mysql/kolon.xml/
map:transform type=sql
  map:parameter name=use-connection
value=mysql_pool/
/map:transform
 map:transform src=mysql/stylesheets/sql.xsl/
map:serialize/
   /map:match

Thank you for your attention and your time.
Arda


__
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Can't connect to MySQL with Cocoon 2

2002-05-06 Thread Vadim Gritsenko

 From: Daniel Vogelheim [mailto:[EMAIL PROTECTED]]
 
 Hello,
 
 You can install *headless X* (Xvfb) which is BTW faster than X.
 
 Yes, I had already discovered this in the FAQ, but had hoped to get
 away without. I'll first try the configuration that Conrad F. D'Cruz
 sent (btw, thanks Conrad!), to make sure I can't fix it in my
 configuration. If that doesn't work, I will install Xvfb. Either way,
 I think that problem is solved.
 
 Or you
 can just *not* install Batik (delete the batik jar and compile
cocoon).
 The samples may have to be tweaked not to use Batik, but it will
work.
 
 ... but I _want_ to use Batik. And MySQL. But not X!  ;-)

RTFM http://xml.apache.org/cocoon/installing/index.html: Headless UNIX
and PJA

Vadim

 
 Thanks.
 
 Sincerely,
 Daniel
 


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Try this Re: Can't connect to MySQL with Cocoon 2

2002-05-05 Thread Conrad F. D'Cruz

Daniel,

Maybe I don't understand using databases with Cocoon after all.  Are you
using
the database for logging?  If not why did you define it in the jdbc
block in the xconf
file that way (as a logger)?

Here is what I did to get it working (and I got these steps from the
userdocs)

1) I put the mysql.jar file (which contains the mysql jdbc driver) in the
tomcat4.01/lib directory.
I vaguely remember having trouble when it was in the
cocoon/WEB-INF/lib ... and once
it started working I did not complain or spend additional time
researching why it failed
down in the lower directory.

2) I created a jdbc block in the cocoon.xconf file as follows ...

   jdbc name=mysql_pool
 pool-controller min=5 max=10/
 dburljdbc:mysql://localhost/mydb/dburl
 userroot/user
 password/password
   /jdbc

where ... mydb is the (very creative) name I chose for the database.

3) In the webapps/cocoon/WEB-INF directory ... I put the following in
the web.xml file ...

init-param
  param-nameload-class/param-name
  param-value

!-- For MySQL on localhost--
org.gjt.mm.mysql.Driver

 !-- For JDBC-ODBC Bridge: --
sun.jdbc.odbc.JdbcOdbcDriver

!-- For parent ComponentManager sample:
org.apache.cocoon.samples.parentcm.Configurator  --
  /param-value
/init-param

4) Finally I use the mysql_pool, as follows

In  the sitemap ... within the map:pipelinethe transformer looks like
this

  map:transform type=sql
map:parameter name=use-connection value=mysql_pool/

5) In the content source file for the map:generator component I have
this code ...
(note there is more than just this code in the file.  In the interest of
space I am just
showing the sql stuff)

  execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
   query
select * from emp where name='Conrad'
   /query
  /execute-query

(of course there was a table named emp in mydb ... and it was set up
correctly and
I made sure there was data in that table -- I verified everything from the
mysql console)

... then I fired up Cocoon (and prayed for a miracle!!).  The C2 gods must
have
been pleased with me that day ... because ... it worked!!!

I, however, did not have a bottle of champagne when I saw the data in my
browser ...
but it worked!! and I was not going to complain about format etc etc.
That is the
topic for another bottle of champagne :)

Hope that helps
Conrad

[EMAIL PROTECTED] wrote:

 Hello all,

 I have a problem connecting to a MySQL database with Cocoon. When I
 try to access a page that goes through the SQLTransformer, the browser
 doesn't deliver any result. There's no error message, the browser just
 sits there and waits for data. The Coccon core.log file contains an
 error message No valid Jdbc Connection class available. (More
 details follow below.)

 I've checked Google, the mailing list archive, and the FAQs, but
 didn't find anything that seemed to help. I'm surely missing
 something; aynone out there can help me?

 Thanks,
 Daniel



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Can't connect to MySQL with Cocoon 2

2002-05-05 Thread Daniel Vogelheim

Hello Zack,

Apparently a lot of people have been having trouble getting mySQL+C2 to work
with the 1.4 JDK. I'd try 1.3 and see if that helps any. HTH.

Thanks; that solves it. With IBM's JDK 1.3 my setup worked right away.

The reason I used JDK 1.4 is because I don't run X. According to the
FAQ, only JDK 1.4 can run in 'headless' mode, and indeed with JDK 1.3
Cocoon doesn't start unless I also run X. So my problem is solved for
now, but I'm hoping for a better long-term solution (i.e., no X, and
still MySQL access).

Thanks everyone!

Sincerely,
Daniel


[original problem was:]
 I have a problem connecting to a MySQL database with Cocoon. When I
 try to access a page that goes through the SQLTransformer, the browser
 doesn't deliver any result. There's no error message, the browser just
 sits there and waits for data. The Coccon core.log file contains an
 error message No valid Jdbc Connection class available. (More
 details follow below.)
 
 I've checked Google, the mailing list archive, and the FAQs, but
 didn't find anything that seemed to help. I'm surely missing
 something; aynone out there can help me?
[snip]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Can't connect to MySQL with Cocoon 2

2002-05-05 Thread Andrew C. Oliver

You can install *headless X* (Xvfb) which is BTW faster than X.  Or you
can just *not* install Batik (delete the batik jar and compile cocoon). 
The samples may have to be tweaked not to use Batik, but it will work.

Lastly if you're really industrious you can use PJAbut I couldn't
get the sucker to work with jdk 1.3.1.

-Andy


On Sun, 2002-05-05 at 10:03, Daniel Vogelheim wrote:
 Hello Zack,
 
 Apparently a lot of people have been having trouble getting mySQL+C2 to work
 with the 1.4 JDK. I'd try 1.3 and see if that helps any. HTH.
 
 Thanks; that solves it. With IBM's JDK 1.3 my setup worked right away.
 
 The reason I used JDK 1.4 is because I don't run X. According to the
 FAQ, only JDK 1.4 can run in 'headless' mode, and indeed with JDK 1.3
 Cocoon doesn't start unless I also run X. So my problem is solved for
 now, but I'm hoping for a better long-term solution (i.e., no X, and
 still MySQL access).
 
 Thanks everyone!
 
 Sincerely,
 Daniel
 
 
 [original problem was:]
  I have a problem connecting to a MySQL database with Cocoon. When I
  try to access a page that goes through the SQLTransformer, the browser
  doesn't deliver any result. There's no error message, the browser just
  sits there and waits for data. The Coccon core.log file contains an
  error message No valid Jdbc Connection class available. (More
  details follow below.)
  
  I've checked Google, the mailing list archive, and the FAQs, but
  didn't find anything that seemed to help. I'm surely missing
  something; aynone out there can help me?
 [snip]
 
 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 
http://www.superlinksoftware.com - software solutions for business
http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in
Java
http://krysalis.sourceforge.net/centipede - the best build/project
structure
a guy/gal could have! - Make Ant simple on complex Projects!
The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Can't connect to MySQL with Cocoon 2

2002-05-05 Thread Daniel Vogelheim

Hello,

You can install *headless X* (Xvfb) which is BTW faster than X.  

Yes, I had already discovered this in the FAQ, but had hoped to get
away without. I'll first try the configuration that Conrad F. D'Cruz
sent (btw, thanks Conrad!), to make sure I can't fix it in my
configuration. If that doesn't work, I will install Xvfb. Either way,
I think that problem is solved. 

Or you
can just *not* install Batik (delete the batik jar and compile cocoon). 
The samples may have to be tweaked not to use Batik, but it will work.

... but I _want_ to use Batik. And MySQL. But not X!  ;-)

Thanks.

Sincerely,
Daniel

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Can't connect to MySQL with Cocoon 2

2002-05-04 Thread Zack Angelo

Daniel,

Apparently a lot of people have been having trouble getting mySQL+C2 to work
with the 1.4 JDK. I'd try 1.3 and see if that helps any. HTH.

-Zack

On 5/4/02 4:00 PM, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 Hello all,
 
 I have a problem connecting to a MySQL database with Cocoon. When I
 try to access a page that goes through the SQLTransformer, the browser
 doesn't deliver any result. There's no error message, the browser just
 sits there and waits for data. The Coccon core.log file contains an
 error message No valid Jdbc Connection class available. (More
 details follow below.)
 
 I've checked Google, the mailing list archive, and the FAQs, but
 didn't find anything that seemed to help. I'm surely missing
 something; aynone out there can help me?
 
 
 Thanks,
 Daniel
 
 
 Some more details:
 
 WEB-INF/logs/sitemap.log contains:
 
 DEBUG   (2002-05-01) 21:21.01:120
 [sitemap.transformer.sql](/cocoon/xxx/1.html)
 Thread-15/SQLTransformer: SQLTransformer executing query nr 0
 DEBUG   (2002-05-01) 21:21.01:124
 [sitemap.transformer.sql](/cocoon/xxx/1.html)
 Thread-15/SQLTransformer$Query: EXECUTING
  SELECT * FROM PERSONEN WHERE ID = 1
 DEBUG   (2002-05-01) 21:21.01:147
 [sitemap.transformer.sql](/cocoon/xxx/1.html)
 Thread-15/SQLTransformer$Query: SQLTransformer$Query: could no
 t acquire a Connection -- waiting 5000 ms to try again.
 
 The last message gets repeated over and over again. The query looks
 OK, but apparently something goes wrong, and Cocoon just tries again.
 That doesn't really make sense to me, since what ever is going wrong,
 will be just as wrong 5s later. Anyway... so something is wrong with
 the SQL connection. But what?
 
 
 WEB-INF/logs/core.log contains:
 
 WARN(2002-05-01) 21:55.23:219
 [core.datasources.stammbaum-mysql](/cocoon/xxx/1.html)
 Thread-15/LogKitLogger: Could not return Connection
 org.apache.avalon.excalibur.datasource.NoValidConnectionException: No
 valid Jdbc Connection class available
   at
 org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInsta
 nce(JdbcConnectionFactory.java:183)
   at
 org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(Res
 ourceLimitingPool.java:491)
 [...]
 
 The stack trace is much longer; I'm happy to send more if anyone can
 use this. Cocoon can't get Jdbc Connection class. What does that mean?
 
 
 Excerpt from sitemap.xmap
 
 The relevant pipeline definition looks like:
 (If you're wondering why I use an XML serializer on an *.html ending:
 That's just for debugging; shouldn't have anything to do with the
 problem, right?)
 
 map:pipeline
 map:match pattern=xxx/*.html
  map:generate src=xxx/person.xml/
  map:transform type=sql
   map:parameter name=use-connection value=xxx-mysql/
   map:parameter name=id value={1}/
  /map:transform
  map:serialize type=xml/
 /map:match
 /map:pipeline
 
 Excerpt from WEB-INF/cocoon.xconf
 ---
   jdbc logger=core.datasources.xxx-mysql name=xxx-mysql
 dburljdbc:mysql://localhost/xxx/dburl
 userdaniel/user
 password/
   /jdbc
 
 I can connect fine to the database using ODBC from Windows, and that
 parameter set. So I don't suspect anything wrong here.
 
 Excerpt from WEB-INF/web.xml
 --
 init-param
   param-nameload-class/param-name
   param-value
 [...snip ...]
 !-- MySQL JDBC driver --
 org.gjt.mm.mysql.Driver
   /param-value
 /init-param
 
 This loads the JDBC driver, right?
 
 
 System and Software versions
 --
 - Coccon 2.0.2
 - Tomcat 3.3.1
 - Sun Java JSDK 1.4, Linux
 - RedHat Linux 7.2
 - mm.mysql JDBC driver 2.0.13
 (copied into WEB-INF/libs)
 - MySQL 3.23.41 
 (running on same host)
 
 
 
 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]