You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ossipetz <os...@myrealbox.com> on 2003/03/07 18:21:20 UTC
tomcat 4.1.18 on linux not loading mysql-driver for a connection-pool?
greetings
i am just the next beginner so be patient :-)
i started with a small jsp/servlet application that connects to a mysql
database. the connection pool is configured in a context.xml.
running the app under windwos (xp) with tomcat 4.1.18 the thing works fine!
copying/installing the war file to tomcat 4.1.18 on a linux machine it seems
as the mysql driver is not loaded. (exceptions all over)
using the windows version and connectiong to the linux-database works! so
its not a mysql problem.
in the /admin servlet the connection pool is present in the application
context. only the class-name (mysql driver) is surronded in a yellow box.
that means its a problem i guess?
so after reading the
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html and other sites everything is supposed to work. but well mr linux
doesnt want to agree!
i attached context.xml and web.xml. in web.xml i had to comment the part
out:
<!--
<resource-ref>
<description>MySQL Database for POST Parameters</description>
<res-ref-name>jdbc/NokiaDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
-->
for some org.xml.sax.SAXParseException:
/// ContextListener.init(): here we go! :-)
07.03.2003 18:13:42 org.apache.commons.digester.Digester error
SCHWERWIEGEND: Parse Error at line 27 column 11: The content of element type
"web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
in ch.fhso.formgenerator.httpserver.ContextListener the database is
initialized and closed. but as "resource-ref*" is a valid tag i dont get
why. the lines come from the mentioned howto.
i am using a ant-built script to install the .war file into tomcat.
the version of JConnector is 3.06 but the version 2.x didnt show any
difference.
so if someone could come-up with a miracle :) i just dont see why the
application runs under windows and not under linux (same .war file, same
versions)
HELP!
thanks a lot!
op
AW: tomcat 4.1.18 on linux not loading mysql-driver for a connection-pool?
Posted by Gerlinde Fischer <ge...@wiai.uni-bamberg.de>.
Hi,
I think the ";" in the query is wrong. Be sure that the query is excute and
you get one row back.
If you get no row back you have a problem.
Regards Gerlinde
> -----Ursprüngliche Nachricht-----
> Von: ossipetz [mailto:ossipetz@myrealbox.com]
> Gesendet: Freitag, 7. März 2003 18:21
> An: tomcat-user@jakarta.apache.org
> Betreff: tomcat 4.1.18 on linux not loading mysql-driver for a
> connection-pool?
>
>
> greetings
>
> i am just the next beginner so be patient :-)
>
> i started with a small jsp/servlet application that connects to a mysql
> database. the connection pool is configured in a context.xml.
> running the app under windwos (xp) with tomcat 4.1.18 the thing
> works fine!
>
> copying/installing the war file to tomcat 4.1.18 on a linux
> machine it seems
> as the mysql driver is not loaded. (exceptions all over)
>
> using the windows version and connectiong to the linux-database works! so
> its not a mysql problem.
>
> in the /admin servlet the connection pool is present in the application
> context. only the class-name (mysql driver) is surronded in a yellow box.
> that means its a problem i guess?
>
> so after reading the
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-ex
amples-how
to.html and other sites everything is supposed to work. but well mr linux
doesnt want to agree!
i attached context.xml and web.xml. in web.xml i had to comment the part
out:
<!--
<resource-ref>
<description>MySQL Database for POST Parameters</description>
<res-ref-name>jdbc/NokiaDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
-->
for some org.xml.sax.SAXParseException:
/// ContextListener.init(): here we go! :-)
07.03.2003 18:13:42 org.apache.commons.digester.Digester error
SCHWERWIEGEND: Parse Error at line 27 column 11: The content of element type
"web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*)".
in ch.fhso.formgenerator.httpserver.ContextListener the database is
initialized and closed. but as "resource-ref*" is a valid tag i dont get
why. the lines come from the mentioned howto.
i am using a ant-built script to install the .war file into tomcat.
the version of JConnector is 3.06 but the version 2.x didnt show any
difference.
so if someone could come-up with a miracle :) i just dont see why the
application runs under windows and not under linux (same .war file, same
versions)
HELP!
thanks a lot!
op
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org