You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anthony Roque Adriano <th...@inetworx.com.ph> on 2003/03/18 12:52:36 UTC

TOMCAT + MYSQL need help

Hi,

I've been searching the mailist but can't seem to find a problem similar to what i'm encountering.

First here's a background of my setup

MySQL server = mysql-server-3.23.54a-3
TomCat = jakarta-tomcat-4.1.18
ODBC = Connector/J 3.0.6-stable
Base OS = RedHat Linux 7.3
JSDK = j2sdk1.4.1_02
$JAVA_HOME = /path/to/j2sdk1.4.1_02
$CATALINA_HOME = /path/to/jakarta-tomcat-4.1.18

Im making a program which will need to get the data from MySQL, All TOMCAT documents i've read all said to put my ODBC Connector (mysql-connector-java-3.0.6-stable-bin.jar) under $CATALINA_HOME/common/lib, but if I put the file there, TOMCAT is not starting, don't even have anything on the logfile. I also tried putting the connector/j on my application lib ($CATALINA_HOME/webapps/MYAPPLIC/WEB-INF/lib), Tomcat runs but my application is not. I also tried playing with $CLASSPATH to no avail.

Anyone experienced this ? or am i just missing something ?

Thanks,
Mark

Re: TOMCAT + MYSQL need help

Posted by Martin Jacobson <ma...@libero.it>.
Anthony Roque Adriano wrote:
> Sorry,  i meant JDBC,  all my configuration is default except for the
> polling i've added at server.xml and set debug level to 9.
> 
> anyway here a sniff of the log file when i place the connector/j under my
> APPLICATION/WEB-INF/lib directory or at $CATALINA_HOME/common/lib or at
> CATALINA_HOME/shared/lib
> 
> java.util.zip.ZipException: invalid END header (bad central directory
> offset)
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:112)
>         at java.util.jar.JarFile.<init>(JarFile.java:117)
>         at java.util.jar.JarFile.<init>(JarFile.java:55)
>         at
> org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
> dClassLoader.java:1082)
>         at
> org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.ja
> va:221)
>         at
> org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
> Factory.java:204)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:155)
> Bootstrap: Class loader creation threw exception
<snip...>

Well, from here it looks like you have a corrupt jar file. You could see 
whether the jar command can read it (jar tvf your_jar_file.jar) - my 
guess is that it can't. If so, get a new copy.

HTH,
Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: TOMCAT + MYSQL need help

Posted by Anthony Roque Adriano <th...@inetworx.com.ph>.
Sorry,  i meant JDBC,  all my configuration is default except for the
polling i've added at server.xml and set debug level to 9.

anyway here a sniff of the log file when i place the connector/j under my
APPLICATION/WEB-INF/lib directory or at $CATALINA_HOME/common/lib or at
CATALINA_HOME/shared/lib

java.util.zip.ZipException: invalid END header (bad central directory
offset)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:112)
        at java.util.jar.JarFile.<init>(JarFile.java:117)
        at java.util.jar.JarFile.<init>(JarFile.java:55)
        at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1082)
        at
org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.ja
va:221)
        at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:204)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:155)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: invalid END header (bad central directory
offset)
        at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar
dClassLoader.java:1110)
        at
org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.ja
va:221)
        at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader
Factory.java:204)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:155)


Mark
----- Original Message -----
From: "Martin Jacobson" <ma...@libero.it>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, March 18, 2003 9:51 PM
Subject: Re: TOMCAT + MYSQL need help


> Anthony Roque Adriano wrote:
> > Hi,
> >
> > I've been searching the mailist but can't seem to find a problem similar
to what i'm encountering.
> >
> > First here's a background of my setup
> >
> > MySQL server = mysql-server-3.23.54a-3
> > TomCat = jakarta-tomcat-4.1.18
> > ODBC = Connector/J 3.0.6-stable
> > Base OS = RedHat Linux 7.3
> > JSDK = j2sdk1.4.1_02
> > $JAVA_HOME = /path/to/j2sdk1.4.1_02
> > $CATALINA_HOME = /path/to/jakarta-tomcat-4.1.18
> >
> > Im making a program which will need to get the data from MySQL, All
TOMCAT documents i've read all said to put my ODBC Connector
(mysql-connector-java-3.0.6-stable-bin.jar) under $CATALINA_HOME/common/lib,
but if I put the file there, TOMCAT is not starting, don't even have
anything on the logfile. I also tried putting the connector/j on my
application lib ($CATALINA_HOME/webapps/MYAPPLIC/WEB-INF/lib), Tomcat runs
but my application is not. I also tried playing with $CLASSPATH to no avail.
> >
> > Anyone experienced this ? or am i just missing something ?
> >
>
> ODBC? Are you sure you mean ODBC, and not JDBC? How do you connect to
> the db? Via JNDI, or programmatically in the servlet? What DEBUG level
> do you have set in server.xml & elsewhere? Are you sure the logs are
empty?
>
> You need to post LOTS more information before we can help you!
>
> Martin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: TOMCAT + MYSQL need help

Posted by Martin Jacobson <ma...@libero.it>.
Anthony Roque Adriano wrote:
> Hi,
> 
> I've been searching the mailist but can't seem to find a problem similar to what i'm encountering.
> 
> First here's a background of my setup
> 
> MySQL server = mysql-server-3.23.54a-3
> TomCat = jakarta-tomcat-4.1.18
> ODBC = Connector/J 3.0.6-stable
> Base OS = RedHat Linux 7.3
> JSDK = j2sdk1.4.1_02
> $JAVA_HOME = /path/to/j2sdk1.4.1_02
> $CATALINA_HOME = /path/to/jakarta-tomcat-4.1.18
> 
> Im making a program which will need to get the data from MySQL, All TOMCAT documents i've read all said to put my ODBC Connector (mysql-connector-java-3.0.6-stable-bin.jar) under $CATALINA_HOME/common/lib, but if I put the file there, TOMCAT is not starting, don't even have anything on the logfile. I also tried putting the connector/j on my application lib ($CATALINA_HOME/webapps/MYAPPLIC/WEB-INF/lib), Tomcat runs but my application is not. I also tried playing with $CLASSPATH to no avail.
> 
> Anyone experienced this ? or am i just missing something ?
> 

ODBC? Are you sure you mean ODBC, and not JDBC? How do you connect to 
the db? Via JNDI, or programmatically in the servlet? What DEBUG level 
do you have set in server.xml & elsewhere? Are you sure the logs are empty?

You need to post LOTS more information before we can help you!

Martin



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org