You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "von Schwerdtner, Thomas (GXS, FPI)" <Th...@gxs.ge.com> on 2002/03/27 19:44:35 UTC

RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Do esn't Work (for me) - any ideas

I don't know about your compile problems, but I do know that JDBC
connections are fairly problematic with jdk1.4 since they changed some
things.  I had no problems building the CVS a few weeks ago, but the ESQL
samples didnt work for me and I could not get the PostgreSQL jdbc driver to
work either (despite comments that it would work with 1.4).  I had to switch
back to 1.3 to get everything I needed to work.

HTH,
-Tom


> -----Original Message-----
> From: Christopher Watson [mailto:cwatson@taraserv.demon.co.uk]
> Sent: Wednesday, March 27, 2002 11:46 AM
> To: Cocoon-Users (E-mail)
> Subject: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling
> Doesn't Work (for me) - any ideas
> 
> 
> Hopefully someone can help me ?
> 
> Followed the advice in cocoon-2.0.2\docs\installing\index.html, i.e.
> created the endorsed directory, copied xerces xalan and xml-apis
> 
> Build clean then build installwar
> 
> Compile falls over EsqlConnection, saying it should be 
> declared abstract due
> to missing methods.
> Discovered some commented-out methods which seem to implement 
> the missing
> methods - e.g. setSavePoint, setHoldability
> Uncommented those lines
> Also noticed a line which read /*  */ between setLimitMetod and
> createStatement - wondered about this, whether I should 
> comment out some
> lines as well as uncommenting those I just mentioned, but 
> could see clearly
> what I should do so I left it ??!!
> 
> Build installwar now worked
> Tomcat now runs cocoon mostly OK, but ESQL example doesn't work.
> 
> Specifically it's POOLING that doesn't work !
> 
> http://localhost:8080/cocoon/xsp/esql results in
> 
> java.lang.RuntimeException: Could not get the datasource
> org.apache.avalon.excalibur.datasource.NoValidConnectionExcept
> ion: No valid
> JdbcConnection class available
> at
> org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
> cocoon.docs.sa
> mples.xsp.esql_xsp.generate(X:\jakarta-tomcat-4.0.4b1\work\loc
> alhost\cocoon\
> cocoon-files\org/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0
> _4b1/webapps/c
> ocoon/docs/samples/xsp\esql_xsp.java:341)
> at
> org.apache.cocoon.generation.ServerPagesGenerator.generate(Ser
> verPagesGenera
> tor.java:260)
> at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.pro
> cess(CachingEv
> entPipeline.java:251)
> at
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.pr
> ocess(CachingS
> treamPipeline.java:399)
> at
> org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
> cocoon.sitemap
> _xmap.matchN400552(X:\jakarta-tomcat-4.0.4b1\work\localhost\co
> coon\cocoon-fi
> les\org/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/weba
> pps/cocoon\sit
> emap_xmap.java:6975)
> at
> org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
> cocoon.sitemap
> _xmap.process(X:\jakarta-tomcat-4.0.4b1\work\localhost\cocoon\
> cocoon-files\o
> rg/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/webapps/c
> ocoon\sitemap_
> xmap.java:3003)
> at
> org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
> cocoon.sitemap
> _xmap.process(X:\jakarta-tomcat-4.0.4b1\work\localhost\cocoon\
> cocoon-files\o
> rg/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/webapps/c
> ocoon\sitemap_
> xmap.java:2489)
> at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
> at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
> at 
> org.apache.cocoon.sitemap.SitemapManager.process(SitemapManage
> r.java:154)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
> at 
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
> java:998)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
> etc
> 
> If I replace the <esql:pool> with ...
> 
> <!--     <esql:pool>personnel</esql:pool>-->
> <esql:driver>org.hsqldb.jdbcDriver</esql:driver>
> <esql:dburl>jdbc:hsqldb:hsql://localhost:9002</esql:dburl>
> <esql:username>sa</esql:username>
> <esql:password></esql:password>
> 
> ... then the example works.
> 
> Can anyone help me to get pooing to work ?
> 
> Is it something I did/didn't do to EsqlConnection.java ?? 
> Something to do
> with the limitMethod stuff ??
> 
> Thanks,
> 
> Christopher
> 
> 
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
> 

RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection PoolingDoesn't Work (for me) - any ideas

Posted by Torsten Curdt <tc...@dff.st>.
On Thu, 28 Mar 2002, Carsten Ziegeler wrote:

> BTW, I found this in the EsqlConnection class:
>
>     public java.sql.PreparedStatement prepareStatement(String sql,
>                                         int[] columnIndexes)
>         throws SQLException
>     {
>         return prepareStatement(sql, columnIndexes);
>     }
>
>     public java.sql.PreparedStatement prepareStatement(String sql,
>                                         String[] columnNames)
>         throws SQLException
>     {
>         return prepareStatement(sql, columnNames);
>     }
>
> I'm I wrong or are this infinite loops?

:-/

I'll have a look..

thanks
--
Torsten


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


RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection PoolingDoesn't Work (for me) - any ideas

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
It seems that the build script for the distribution does not simply
copy the sources as is but it also replaces the keywords defined by ant.
As the dists are build using JDK 1.3.1, the keywords were replaced by a
comment.
We have to fix the build script, then. Thanks.

BTW, I found this in the EsqlConnection class:

    public java.sql.PreparedStatement prepareStatement(String sql,
                                        int[] columnIndexes)
        throws SQLException
    {
        return prepareStatement(sql, columnIndexes);
    }

    public java.sql.PreparedStatement prepareStatement(String sql,
                                        String[] columnNames)
        throws SQLException
    {
        return prepareStatement(sql, columnNames);
    }

I'm I wrong or are this infinite loops?

Carsten

> -----Original Message-----
> From: Enke Michael [mailto:Michael.Enke@wincor-nixdorf.com]
> Sent: Thursday, March 28, 2002 3:57 PM
> To: cocoon-dev@xml.apache.org
> Subject: Re: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection
> PoolingDoesn't Work (for me) - any ideas
>
>
> Did you ever unpack 2.0.2.tar.gz? It seems no.
> If I unpack the 2.0.2.tar.gz there is not @JDBC3_START@ in, there
> is a comment /* in.
>
> Michael
>
>
> Torsten Curdt wrote:
> >
> > On Thu, 28 Mar 2002, Christopher Watson wrote:
> >
> > > RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection
> Pooling Doesn't Work
> > > (for me) - any ideasThanks, Tom
> > >
> > > I suspect the problems are not only with cocoon, but excalibur too !
> > >
> > > COCOON
> > > =======
> > > The comment lines in the CVS EsqlConnection have @JDBC3_START@ and
> > > @JDBC3_END@
> > > which the ant task comments out if it FAILS to detect jdbc3 present.
> > >
> > > In the cocoon dist version, these lines are commented out by /* and */
> > > (it's the same in both the src.tar.gz and the src.zip) - so
> you have to
> > > remove them manually to get a clean jdk1.4 compile
> >
> > What is commented out? At least in HEAD everything looks fine...
> >
> >
> http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/
cocoon/components/language/markup/xsp/EsqlConnection.java
>
> The tricky part is that ant might fail to detect that jdbc3 is present.
> I remember Stefano has solved this...
>
> Stefano, could you please put this into the FAQ. Seems people are hitting
> this wall over and over again...
>
> Thanks
> --
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

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


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


Re: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection PoolingDoesn't Work (for me) - any ideas

Posted by Torsten Curdt <tc...@dff.st>.
On Thu, 28 Mar 2002, Enke Michael wrote:
> Did you ever unpack 2.0.2.tar.gz? It seems no.

true - we only use HEAD from CVS :)

> If I unpack the 2.0.2.tar.gz there is not @JDBC3_START@ in, there is a comment /* in.

Well, then we have a problem - Carsten, do you have an idea how this could have happened?
--
Torsten

> Torsten Curdt wrote:
> >
> > On Thu, 28 Mar 2002, Christopher Watson wrote:
> >
> > > RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work
> > > (for me) - any ideasThanks, Tom
> > >
> > > I suspect the problems are not only with cocoon, but excalibur too !
> > >
> > > COCOON
> > > =======
> > > The comment lines in the CVS EsqlConnection have @JDBC3_START@ and
> > > @JDBC3_END@
> > > which the ant task comments out if it FAILS to detect jdbc3 present.
> > >
> > > In the cocoon dist version, these lines are commented out by /* and */
> > > (it's the same in both the src.tar.gz and the src.zip) - so you have to
> > > remove them manually to get a clean jdk1.4 compile
> >
> > What is commented out? At least in HEAD everything looks fine...
> >
> > http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/EsqlConnection.java
> >
> > The tricky part is that ant might fail to detect that jdbc3 is present.
> > I remember Stefano has solved this...
> >
> > Stefano, could you please put this into the FAQ. Seems people are hitting
> > this wall over and over again...
> >
> > Thanks


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


Re: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection PoolingDoesn't Work (for me) - any ideas

Posted by Enke Michael <Mi...@wincor-nixdorf.com>.
Christopher Watson wrote:
> ...
> I've just extracted EsqlConnection.java again this minute from the
> 2.0.2.tar.gz I downloaded then - it is attached to this message.
> 
> I'm loath to download it again, at 56kbps (UK's not really grasped broadband
> yet!).
> Would it have changed since I downloaded it?
> The timestamp on my one is 11:30 (GMT) 26mar2002
> ...

The timestamp on my one is 26mar2002 08:27, 10331 byte

Michael

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


Re: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection PoolingDoesn't Work (for me) - any ideas

Posted by Enke Michael <Mi...@wincor-nixdorf.com>.
With the shipped excalibur we have no chance to get pooling running (under jdk1.4).
I download excalibur4.1 and compiled it:
(build.sh missing, may be other files too? Berin is checking this)
But with this, Cocoon is not started!
So I got the daily build from excalibur (avalon-framework is also required),
cocoon starts again, but pooling have the same problem.

Happy easter!

Michael

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


RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection PoolingDoesn't Work (for me) - any ideas

Posted by Christopher Watson <cw...@taraserv.demon.co.uk>.
Michael, et al

I've just noticed a few more recent messages about this, but I'm going to
reply anyway.

Christopher
> -----Original Message-----
> From: Enke Michael [mailto:Michael.Enke@wincor-nixdorf.com]
> Sent: 28 March 2002 14:57
> To: cocoon-dev@xml.apache.org
> Subject: Re: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection
> PoolingDoesn't Work (for me) - any ideas
>
>
> Did you ever unpack 2.0.2.tar.gz? It seems no.
> If I unpack the 2.0.2.tar.gz there is not @JDBC3_START@ in,
> there is a comment /* in.
>
> Michael
>

I downloaded the 2.0.2.tar.gz from http://xml.apache.org/dist/cocoon
(or was it http://xml.apache.org/cocoon/dist - I'm guessing they're
effectively the same thing?)
very soon after the release, before the src.zip appeared !

I've just extracted EsqlConnection.java again this minute from the
2.0.2.tar.gz I downloaded then - it is attached to this message.

I'm loath to download it again, at 56kbps (UK's not really grasped broadband
yet!).
Would it have changed since I downloaded it?
The timestamp on my one is 11:30 (GMT) 26mar2002


I confirm the one via viewcvs.cgi has @JDBC3_START@ etc

>
> Torsten Curdt wrote:
> >
> > On Thu, 28 Mar 2002, Christopher Watson wrote:
> >
> > > RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection
> Pooling Doesn't Work
> > > (for me) - any ideasThanks, Tom
> > >
> > > I suspect the problems are not only with cocoon, but
> excalibur too !
> > >
> > > COCOON
> > > =======
> > > The comment lines in the CVS EsqlConnection have @JDBC3_START@ and
> > > @JDBC3_END@
> > > which the ant task comments out if it FAILS to detect
> jdbc3 present.
> > >
> > > In the cocoon dist version, these lines are commented out
> by /* and */
> > > (it's the same in both the src.tar.gz and the src.zip) -
> so you have to
> > > remove them manually to get a clean jdk1.4 compile
> >
> > What is commented out? At least in HEAD everything looks fine...
> >

Torsten
Please see attached to see what is commented out

> >
> http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apa
> che/cocoon/components/language/markup/xsp/EsqlConnection.java
> >
> > The tricky part is that ant might fail to detect that jdbc3
> is present.
> > I remember Stefano has solved this...
> >
> > Stefano, could you please put this into the FAQ. Seems
> people are hitting
> > this wall over and over again...


I'm pretty sure it's detecting jdbc3.present, as I've put <echo>'s into the
build.xml as per someone else's recent cocoon-users mailing list message
I think Stefano's thing was for someone to go back to use 1.3.1 when their
1.4 had been inadvertently left in winnt\system32

I WANT 1.4 and I seem to be getting it in that I have to UNCOMMENT the lines
to get it to compile !

But then I get the failure is at runtime

> >
> > Thanks
> > --
> > Torsten
> >
> >

What I'm wondering is if the dist source build is done using the ant task,
which perhaps does the commenting out then.
But then I take Michael's word for it.

But can I ask again - should esql:pool work with jdk1.4 ?

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

Re: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection PoolingDoesn't Work (for me) - any ideas

Posted by Enke Michael <Mi...@wincor-nixdorf.com>.
Did you ever unpack 2.0.2.tar.gz? It seems no.
If I unpack the 2.0.2.tar.gz there is not @JDBC3_START@ in, there is a comment /* in.

Michael


Torsten Curdt wrote:
> 
> On Thu, 28 Mar 2002, Christopher Watson wrote:
> 
> > RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work
> > (for me) - any ideasThanks, Tom
> >
> > I suspect the problems are not only with cocoon, but excalibur too !
> >
> > COCOON
> > =======
> > The comment lines in the CVS EsqlConnection have @JDBC3_START@ and
> > @JDBC3_END@
> > which the ant task comments out if it FAILS to detect jdbc3 present.
> >
> > In the cocoon dist version, these lines are commented out by /* and */
> > (it's the same in both the src.tar.gz and the src.zip) - so you have to
> > remove them manually to get a clean jdk1.4 compile
> 
> What is commented out? At least in HEAD everything looks fine...
> 
> http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/EsqlConnection.java
> 
> The tricky part is that ant might fail to detect that jdbc3 is present.
> I remember Stefano has solved this...
> 
> Stefano, could you please put this into the FAQ. Seems people are hitting
> this wall over and over again...
> 
> Thanks
> --
> Torsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

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


RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work (for me) - any ideas

Posted by Torsten Curdt <tc...@dff.st>.
On Thu, 28 Mar 2002, Christopher Watson wrote:

> RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work
> (for me) - any ideasThanks, Tom
>
> I suspect the problems are not only with cocoon, but excalibur too !
>
> COCOON
> =======
> The comment lines in the CVS EsqlConnection have @JDBC3_START@ and
> @JDBC3_END@
> which the ant task comments out if it FAILS to detect jdbc3 present.
>
> In the cocoon dist version, these lines are commented out by /* and */
> (it's the same in both the src.tar.gz and the src.zip) - so you have to
> remove them manually to get a clean jdk1.4 compile

What is commented out? At least in HEAD everything looks fine...

http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/EsqlConnection.java

The tricky part is that ant might fail to detect that jdbc3 is present.
I remember Stefano has solved this...

Stefano, could you please put this into the FAQ. Seems people are hitting
this wall over and over again...

Thanks
--
Torsten


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


RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work (for me) - any ideas

Posted by Christopher Watson <cw...@taraserv.demon.co.uk>.
RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work
(for me) - any ideasThanks, Tom

I suspect the problems are not only with cocoon, but excalibur too !

COCOON
=======
The comment lines in the CVS EsqlConnection have @JDBC3_START@ and
@JDBC3_END@
which the ant task comments out if it FAILS to detect jdbc3 present.

In the cocoon dist version, these lines are commented out by /* and */
(it's the same in both the src.tar.gz and the src.zip) - so you have to
remove them manually to get a clean jdk1.4 compile

EXCALIBUR
=========
I noticed one Michael Enke on cocoon-dev asking about recompiling excalibur
under jdk1.4 ...

There are similar @JDBC3_START@ lines in JdbcConnection and
AbstractJdbcConnection in org.apache.avalon.excalibur.datasource

I tried myself recompiling the latest excalibur source dist (excluding the
scratchpad stuff),
having corrected a couple of typos in the parameter resulSetType [sic]
on lines 237, 251, 265 of
Jdbc3Connection.java

but even with that library,  http://localhost:8080/cocoon/xsp/esql still
doesn't work

I now get
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not get
the datasource
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException:
org.apache.avalon.excalibur.datasource.Jdbc3Connection
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:272)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:251)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:399)
at
org.apache.cocoon.www.sitemap_xmap.matchN400552(X:\jakarta-tomcat-4.0.4b1\wo
rk\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:697
5)
at
org.apache.cocoon.www.sitemap_xmap.process(X:\jakarta-tomcat-4.0.4b1\work\lo
calhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3003)
at
org.apache.cocoon.www.sitemap_xmap.process(X:\jakarta-tomcat-4.0.4b1\work\lo
calhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:2489)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

--------------------------


Whereas if I use <esql:driver> etc instead of <esql:pool> everything works
OK as before

Interestingly enough, my firewall monitor show port numbers open
corresponding to what I would expect
if the jdbc connections I've set in cocoon.xconf were active - cocoon just
can't seem to get hold of the correct connection objects ?!

COCOON-DEV GUYS
================
I'm perhaps cheekily putting this out to cocoon-dev also - sorry to trouble
you guys.

Am I right in thinking that jdk1.4 ESQL compatibility will be a while yet?

Any ideas how long ?

I was encouraged to try jdk1.4 by reading the installing/index.html document
which seemed optimistic about jdk1.4 and tomcat4.0.4b1.
Having already been to jdk1.4, then back to jdk1.3 and now jdk1.4 again,
with all the other hoop-jumping that involves, I'm inclined to stay here -
fortunately I have another machine with jdk1.3 !

Yours, hopefully

Christopher Watson

 -----Original Message-----
From: von Schwerdtner, Thomas (GXS, FPI)
[mailto:Thomas.vonSchwerdtner@gxs.ge.com]
Sent: 27 March 2002 18:45
To: 'cocoon-users@xml.apache.org'
Subject: RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling
Doesn't Work (for me) - any ideas


  I don't know about your compile problems, but I do know that JDBC
connections are fairly problematic with jdk1.4 since they changed some
things.  I had no problems building the CVS a few weeks ago, but the ESQL
samples didnt work for me and I could not get the PostgreSQL jdbc driver to
work either (despite comments that it would work with 1.4).  I had to switch
back to 1.3 to get everything I needed to work.

  HTH,
  -Tom



  > -----Original Message-----
  > From: Christopher Watson [mailto:cwatson@taraserv.demon.co.uk]
  > Sent: Wednesday, March 27, 2002 11:46 AM
  > To: Cocoon-Users (E-mail)
  > Subject: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling
  > Doesn't Work (for me) - any ideas
  >
  >
  > Hopefully someone can help me ?
  >
  > Followed the advice in cocoon-2.0.2\docs\installing\index.html, i.e.
  > created the endorsed directory, copied xerces xalan and xml-apis
  >
  > Build clean then build installwar
  >
  > Compile falls over EsqlConnection, saying it should be
  > declared abstract due
  > to missing methods.
  > Discovered some commented-out methods which seem to implement
  > the missing
  > methods - e.g. setSavePoint, setHoldability
  > Uncommented those lines
  > Also noticed a line which read /*  */ between setLimitMetod and
  > createStatement - wondered about this, whether I should
  > comment out some
  > lines as well as uncommenting those I just mentioned, but
  > could see clearly
  > what I should do so I left it ??!!
  >
  > Build installwar now worked
  > Tomcat now runs cocoon mostly OK, but ESQL example doesn't work.
  >
  > Specifically it's POOLING that doesn't work !
  >
  > http://localhost:8080/cocoon/xsp/esql results in
  >
  > java.lang.RuntimeException: Could not get the datasource
  > org.apache.avalon.excalibur.datasource.NoValidConnectionExcept
  > ion: No valid
  > JdbcConnection class available
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.docs.sa
  > mples.xsp.esql_xsp.generate(X:\jakarta-tomcat-4.0.4b1\work\loc
  > alhost\cocoon\
  > cocoon-files\org/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0
  > _4b1/webapps/c
  > ocoon/docs/samples/xsp\esql_xsp.java:341)
  > at
  > org.apache.cocoon.generation.ServerPagesGenerator.generate(Ser
  > verPagesGenera
  > tor.java:260)
  > at
  > org.apache.cocoon.components.pipeline.CachingEventPipeline.pro
  > cess(CachingEv
  > entPipeline.java:251)
  > at
  > org.apache.cocoon.components.pipeline.CachingStreamPipeline.pr
  > ocess(CachingS
  > treamPipeline.java:399)
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.sitemap
  > _xmap.matchN400552(X:\jakarta-tomcat-4.0.4b1\work\localhost\co
  > coon\cocoon-fi
  > les\org/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/weba
  > pps/cocoon\sit
  > emap_xmap.java:6975)
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.sitemap
  > _xmap.process(X:\jakarta-tomcat-4.0.4b1\work\localhost\cocoon\
  > cocoon-files\o
  > rg/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/webapps/c
  > ocoon\sitemap_
  > xmap.java:3003)
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.sitemap
  > _xmap.process(X:\jakarta-tomcat-4.0.4b1\work\localhost\cocoon\
  > cocoon-files\o
  > rg/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/webapps/c
  > ocoon\sitemap_
  > xmap.java:2489)
  > at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
  > at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
  > at
  > org.apache.cocoon.sitemap.SitemapManager.process(SitemapManage
  > r.java:154)
  > at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
  > at
  > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
  > java:998)
  > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  >
  > etc
  >
  > If I replace the <esql:pool> with ...
  >
  > <!--     <esql:pool>personnel</esql:pool>-->
  > <esql:driver>org.hsqldb.jdbcDriver</esql:driver>
  > <esql:dburl>jdbc:hsqldb:hsql://localhost:9002</esql:dburl>
  > <esql:username>sa</esql:username>
  > <esql:password></esql:password>
  >
  > ... then the example works.
  >
  > Can anyone help me to get pooing to work ?
  >
  > Is it something I did/didn't do to EsqlConnection.java ??
  > Something to do
  > with the limitMethod stuff ??
  >
  > Thanks,
  >
  > Christopher
  >
  >
  > ---------------------------------------------------------------------
  > 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: <co...@xml.apache.org>
  > For additional commands, e-mail: <co...@xml.apache.org>
  >


RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work (for me) - any ideas

Posted by Christopher Watson <cw...@taraserv.demon.co.uk>.
RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling Doesn't Work
(for me) - any ideasThanks, Tom

I suspect the problems are not only with cocoon, but excalibur too !

COCOON
=======
The comment lines in the CVS EsqlConnection have @JDBC3_START@ and
@JDBC3_END@
which the ant task comments out if it FAILS to detect jdbc3 present.

In the cocoon dist version, these lines are commented out by /* and */
(it's the same in both the src.tar.gz and the src.zip) - so you have to
remove them manually to get a clean jdk1.4 compile

EXCALIBUR
=========
I noticed one Michael Enke on cocoon-dev asking about recompiling excalibur
under jdk1.4 ...

There are similar @JDBC3_START@ lines in JdbcConnection and
AbstractJdbcConnection in org.apache.avalon.excalibur.datasource

I tried myself recompiling the latest excalibur source dist (excluding the
scratchpad stuff),
having corrected a couple of typos in the parameter resulSetType [sic]
on lines 237, 251, 265 of
Jdbc3Connection.java

but even with that library,  http://localhost:8080/cocoon/xsp/esql still
doesn't work

I now get
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not get
the datasource
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException:
org.apache.avalon.excalibur.datasource.Jdbc3Connection
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:272)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:251)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:399)
at
org.apache.cocoon.www.sitemap_xmap.matchN400552(X:\jakarta-tomcat-4.0.4b1\wo
rk\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:697
5)
at
org.apache.cocoon.www.sitemap_xmap.process(X:\jakarta-tomcat-4.0.4b1\work\lo
calhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3003)
at
org.apache.cocoon.www.sitemap_xmap.process(X:\jakarta-tomcat-4.0.4b1\work\lo
calhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:2489)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

--------------------------


Whereas if I use <esql:driver> etc instead of <esql:pool> everything works
OK as before

Interestingly enough, my firewall monitor show port numbers open
corresponding to what I would expect
if the jdbc connections I've set in cocoon.xconf were active - cocoon just
can't seem to get hold of the correct connection objects ?!

COCOON-DEV GUYS
================
I'm perhaps cheekily putting this out to cocoon-dev also - sorry to trouble
you guys.

Am I right in thinking that jdk1.4 ESQL compatibility will be a while yet?

Any ideas how long ?

I was encouraged to try jdk1.4 by reading the installing/index.html document
which seemed optimistic about jdk1.4 and tomcat4.0.4b1.
Having already been to jdk1.4, then back to jdk1.3 and now jdk1.4 again,
with all the other hoop-jumping that involves, I'm inclined to stay here -
fortunately I have another machine with jdk1.3 !

Yours, hopefully

Christopher Watson

 -----Original Message-----
From: von Schwerdtner, Thomas (GXS, FPI)
[mailto:Thomas.vonSchwerdtner@gxs.ge.com]
Sent: 27 March 2002 18:45
To: 'cocoon-users@xml.apache.org'
Subject: RE: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling
Doesn't Work (for me) - any ideas


  I don't know about your compile problems, but I do know that JDBC
connections are fairly problematic with jdk1.4 since they changed some
things.  I had no problems building the CVS a few weeks ago, but the ESQL
samples didnt work for me and I could not get the PostgreSQL jdbc driver to
work either (despite comments that it would work with 1.4).  I had to switch
back to 1.3 to get everything I needed to work.

  HTH,
  -Tom



  > -----Original Message-----
  > From: Christopher Watson [mailto:cwatson@taraserv.demon.co.uk]
  > Sent: Wednesday, March 27, 2002 11:46 AM
  > To: Cocoon-Users (E-mail)
  > Subject: Cocoon 2.0.2 JDK1.4 Tomcat 4.0.4b1 JDBC Connection Pooling
  > Doesn't Work (for me) - any ideas
  >
  >
  > Hopefully someone can help me ?
  >
  > Followed the advice in cocoon-2.0.2\docs\installing\index.html, i.e.
  > created the endorsed directory, copied xerces xalan and xml-apis
  >
  > Build clean then build installwar
  >
  > Compile falls over EsqlConnection, saying it should be
  > declared abstract due
  > to missing methods.
  > Discovered some commented-out methods which seem to implement
  > the missing
  > methods - e.g. setSavePoint, setHoldability
  > Uncommented those lines
  > Also noticed a line which read /*  */ between setLimitMetod and
  > createStatement - wondered about this, whether I should
  > comment out some
  > lines as well as uncommenting those I just mentioned, but
  > could see clearly
  > what I should do so I left it ??!!
  >
  > Build installwar now worked
  > Tomcat now runs cocoon mostly OK, but ESQL example doesn't work.
  >
  > Specifically it's POOLING that doesn't work !
  >
  > http://localhost:8080/cocoon/xsp/esql results in
  >
  > java.lang.RuntimeException: Could not get the datasource
  > org.apache.avalon.excalibur.datasource.NoValidConnectionExcept
  > ion: No valid
  > JdbcConnection class available
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.docs.sa
  > mples.xsp.esql_xsp.generate(X:\jakarta-tomcat-4.0.4b1\work\loc
  > alhost\cocoon\
  > cocoon-files\org/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0
  > _4b1/webapps/c
  > ocoon/docs/samples/xsp\esql_xsp.java:341)
  > at
  > org.apache.cocoon.generation.ServerPagesGenerator.generate(Ser
  > verPagesGenera
  > tor.java:260)
  > at
  > org.apache.cocoon.components.pipeline.CachingEventPipeline.pro
  > cess(CachingEv
  > entPipeline.java:251)
  > at
  > org.apache.cocoon.components.pipeline.CachingStreamPipeline.pr
  > ocess(CachingS
  > treamPipeline.java:399)
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.sitemap
  > _xmap.matchN400552(X:\jakarta-tomcat-4.0.4b1\work\localhost\co
  > coon\cocoon-fi
  > les\org/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/weba
  > pps/cocoon\sit
  > emap_xmap.java:6975)
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.sitemap
  > _xmap.process(X:\jakarta-tomcat-4.0.4b1\work\localhost\cocoon\
  > cocoon-files\o
  > rg/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/webapps/c
  > ocoon\sitemap_
  > xmap.java:3003)
  > at
  > org.apache.cocoon.www.file_.X_.jakarta_tomcat_4_0_4b1.webapps.
  > cocoon.sitemap
  > _xmap.process(X:\jakarta-tomcat-4.0.4b1\work\localhost\cocoon\
  > cocoon-files\o
  > rg/apache/cocoon/www/file_/X_/jakarta_tomcat_4_0_4b1/webapps/c
  > ocoon\sitemap_
  > xmap.java:2489)
  > at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
  > at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
  > at
  > org.apache.cocoon.sitemap.SitemapManager.process(SitemapManage
  > r.java:154)
  > at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
  > at
  > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
  > java:998)
  > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  >
  > etc
  >
  > If I replace the <esql:pool> with ...
  >
  > <!--     <esql:pool>personnel</esql:pool>-->
  > <esql:driver>org.hsqldb.jdbcDriver</esql:driver>
  > <esql:dburl>jdbc:hsqldb:hsql://localhost:9002</esql:dburl>
  > <esql:username>sa</esql:username>
  > <esql:password></esql:password>
  >
  > ... then the example works.
  >
  > Can anyone help me to get pooing to work ?
  >
  > Is it something I did/didn't do to EsqlConnection.java ??
  > Something to do
  > with the limitMethod stuff ??
  >
  > Thanks,
  >
  > Christopher
  >
  >
  > ---------------------------------------------------------------------
  > 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: <co...@xml.apache.org>
  > For additional commands, e-mail: <co...@xml.apache.org>
  >