You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Pål Wester <pa...@never.no> on 2001/02/14 17:00:54 UTC
esql connection defined in cocoon.properties [mm.mysql] and getting nullpointerException
I want to rewrite my esql-connetion to use a connetion
in cocoon.properties couse that would make use of
turbine. I can't get to work... how do I attack the situation??
I have cocoon 1.8.1-dev..
I have written this in cocoon.properties:
# These are your database settings, look in the
# org.apache.turbine.util.db.pool.* package for more information.
processor.xsp.pool.database.quart.driver=org.gjt.mm.mysql.Driver
processor.xsp.pool.database.quart.url=jdbc:mysql://localhost:3306/quart
processor.xsp.pool.database.quart.username=quartuser
processor.xsp.pool.database.quart.password=quartpasswd
processor.xsp.pool.database.quart.maxConnections=10
processor.xsp.pool.database.quart.expiryTime=3600000
# These are the supported jdbc-drivers and their adaptors.
# These properties are used by the DBFactory.
processor.xsp.pool.database.adaptor=DBMM
processor.xsp.pool.database.adaptor.DBMM=org.gjt.mm.mysql.Driver
1. would this work, does it look sane??
In all my xml pages I have:
<esql:connection>
<esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
<esql:dburl>jdbc:mysql://localhost:3306/quart</esql:dburl>
<esql:username>quartuser</esql:username>
<esql:password>quartpasswd</esql:password>
I've changed this to:
<esql:connection>
<esql:pool>quart</esql:pool>
But I get a nullpointerException:
java.lang.NullPointerException:
at _home._www._xml._quart._input._artist.populateDocument(_artist.java:560)
at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:502)
at org.apache.cocoon.Engine.handle(Engine.java:366)
at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:475)
mvh:
Pål Wester, programmerer
never.no as, stortingsgt 30, 0161 Oslo
tlf: 22 01 66 20, fax: 22 01 66 21
direkte: 22 01 66 34, 906 900 62
http://never.no - icq:103476059
~ f u cn rd ts u prb a gk ~
Re: esql connection defined in cocoon.properties [mm.mysql] and getting
nullpointerException
Posted by Matthias Brunner <mb...@blumenstrasse.vol.at>.
Pål Wester wrote:
>
> # These are your database settings, look in the
> # org.apache.turbine.util.db.pool.* package for more information.
> processor.xsp.pool.database.quart.driver=org.gjt.mm.mysql.Driver
> processor.xsp.pool.database.quart.url=jdbc:mysql://localhost:3306/quart
> processor.xsp.pool.database.quart.username=quartuser
> processor.xsp.pool.database.quart.password=quartpasswd
> processor.xsp.pool.database.quart.maxConnections=10
> processor.xsp.pool.database.quart.expiryTime=3600000
>
> # These are the supported jdbc-drivers and their adaptors.
> # These properties are used by the DBFactory.
> processor.xsp.pool.database.adaptor=DBMM
> processor.xsp.pool.database.adaptor.DBMM=org.gjt.mm.mysql.Driver
>
> 1. would this work, does it look sane??
>
> In all my xml pages I have:
> <esql:connection>
> <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
> <esql:dburl>jdbc:mysql://localhost:3306/quart</esql:dburl>
> <esql:username>quartuser</esql:username>
> <esql:password>quartpasswd</esql:password>
>
> I've changed this to:
> <esql:connection>
> <esql:pool>quart</esql:pool>
I can confirm similar to work in Coccon 1.8.2 (Apache Jserv 1.1.2,
mm.mysql-2.0.4, mySQL 3.23.27-beta, IBM JDK 1.3)
Maybe the pool log gives you more information, uncomment the
processor.xsp.pool.logfile directive in cocoon.properties.
Best regards!
--
Matthias Brunner <mb...@blumenstrasse.vol.at>
PGP FP 7862 32B3 3B75 292A F76F 5042 8587 21AB 5B89 D501
Check out http://blumenstrasse.vol.at/~mb/gpgkey.asc
Re: esql connection defined in cocoon.properties [mm.mysql] and getting nullpointerException
Posted by Matthew Cordes <mc...@maine.edu>.
you just do
<esql:connection>
<esql:pool>MY_POOL</esql:pool>
<esql:execute-query>
...
</esql:execute-query>
</esql:connection>
-matt
On Wed, Feb 14, 2001 at 05:00:54PM +0100, P?l Wester wrote:
> I want to rewrite my esql-connetion to use a connetion
> in cocoon.properties couse that would make use of
> turbine. I can't get to work... how do I attack the situation??
>
> I have cocoon 1.8.1-dev..
>
> I have written this in cocoon.properties:
>
> # These are your database settings, look in the
> # org.apache.turbine.util.db.pool.* package for more information.
> processor.xsp.pool.database.quart.driver=org.gjt.mm.mysql.Driver
> processor.xsp.pool.database.quart.url=jdbc:mysql://localhost:3306/quart
> processor.xsp.pool.database.quart.username=quartuser
> processor.xsp.pool.database.quart.password=quartpasswd
> processor.xsp.pool.database.quart.maxConnections=10
> processor.xsp.pool.database.quart.expiryTime=3600000
>
> # These are the supported jdbc-drivers and their adaptors.
> # These properties are used by the DBFactory.
> processor.xsp.pool.database.adaptor=DBMM
> processor.xsp.pool.database.adaptor.DBMM=org.gjt.mm.mysql.Driver
>
> 1. would this work, does it look sane??
>
> In all my xml pages I have:
> <esql:connection>
> <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
> <esql:dburl>jdbc:mysql://localhost:3306/quart</esql:dburl>
> <esql:username>quartuser</esql:username>
> <esql:password>quartpasswd</esql:password>
>
> I've changed this to:
> <esql:connection>
> <esql:pool>quart</esql:pool>
>
> But I get a nullpointerException:
> java.lang.NullPointerException:
> at _home._www._xml._quart._input._artist.populateDocument(_artist.java:560)
> at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
> at
> org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:502)
> at org.apache.cocoon.Engine.handle(Engine.java:366)
> at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> at org.apache.tomcat.core.Handler.service(Handler.java:286)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
> org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
> (Ajp13ConnectionHandler.java:160)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:475)
>
> mvh:
> P�l Wester, programmerer
> never.no as, stortingsgt 30, 0161 Oslo
> tlf: 22 01 66 20, fax: 22 01 66 21
> direkte: 22 01 66 34, 906 900 62
> http://never.no - icq:103476059
> ~ f u cn rd ts u prb a gk ~
>
>
> ---------------------------------------------------------------------
> 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>
>