how to delete log files (not append) ?
Hi, Hopefully this is an easy one... I'm running tomcat 4.1.31 and would like to have the log files delete each time I restart tomcat. Currently it's just appending to the log files. Here's a snippet of my server.xml is that helps: Any ideas? Thanks, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.util.zip.ZipException: invalid block type
I'm not deploying wars. I'm just pointing to a directory. I've tried cleaning and redeploying this. The weird thing is that this is happening to the other developer on the project as well. On 6/30/05, David Delbecq <[EMAIL PROTECTED]> wrote: > Redeploy your wars i'll say > Le Jeudi 30 Juin 2005 18:43, Ben Anderson a écrit : > >Hi all, > >I'm having trouble starting tomcat. This happened after I deleted the > >temp and work directories. I recreated the temp directory because it > >seemed this was a problem. Now I'm getting this stack trace: > >Apache Tomcat/4.1.31 > > > >java.util.zip.ZipException: invalid block type > > > > at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140) > > > > at java.io.DataInputStream.readFully(DataInputStream.java:266) > > > > at java.util.jar.JarFile.getBytes(JarFile.java:339) > > > > at java.util.jar.JarFile.getManifest(JarFile.java:157) > > > > at > > org.apache.catalina.loader.WebappClassLoader.addJar(WebappClassLoader.java: > >654) > > > > at > > org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:1 > >020) > > > > at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:618) > > > > at > > org.apache.catalina.core.StandardContext.start(StandardContext.java:3486) > > > > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) > > > > at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) > > > > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) > > > > at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316) > > > > at > > org.apache.catalina.core.StandardService.start(StandardService.java:450) > > > > at > > org.apache.catalina.core.StandardServer.start(StandardServer.java:2143) > > > > at org.apache.catalina.startup.Catalina.start(Catalina.java:463) > > > > at org.apache.catalina.startup.Catalina.execute(Catalina.java:350) > > > > at org.apache.catalina.startup.Catalina.process(Catalina.java:129) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 > >9) > > > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp > >l.java:25) > > > > at java.lang.reflect.Method.invoke(Method.java:324) > > > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) > > > >Exception during startup processing > > > >java.lang.reflect.InvocationTargetException > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 > >9) > > > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp > >l.java:25) > > > > at java.lang.reflect.Method.invoke(Method.java:324) > > > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) > > > >Caused by: java.lang.InternalError: jzentry == 0, > > jzfile = 118335776, > > total = 2482, > > name = tools\tomcat\4.1.31\temp\jar_cache53708.tmp, > > i = 34, > > message = invalid LOC header (bad signature) > > > > at java.util.zip.ZipFile$2.nextElement(ZipFile.java:320) > > > > at java.util.jar.JarFile$1.nextElement(JarFile.java:211) > > > > at > > org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:850 > >) > > > > at > > org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:809) > > > > at > > org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:587) > > > > at > > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java > >:181) > > > > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppo > >rt.java:119) > > > > at > > org.apache.catalina.core.StandardContext.start(StandardContext.java:3523) > > > > at > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) > > > > at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) > > > > at > > org.apache.catalina.core.Con
java.util.zip.ZipException: invalid block type
Hi all, I'm having trouble starting tomcat. This happened after I deleted the temp and work directories. I recreated the temp directory because it seemed this was a problem. Now I'm getting this stack trace: Apache Tomcat/4.1.31 java.util.zip.ZipException: invalid block type at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140) at java.io.DataInputStream.readFully(DataInputStream.java:266) at java.util.jar.JarFile.getBytes(JarFile.java:339) at java.util.jar.JarFile.getManifest(JarFile.java:157) at org.apache.catalina.loader.WebappClassLoader.addJar(WebappClassLoader.java:654) at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:1020) at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:618) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3486) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143) at org.apache.catalina.startup.Catalina.start(Catalina.java:463) at org.apache.catalina.startup.Catalina.execute(Catalina.java:350) at org.apache.catalina.startup.Catalina.process(Catalina.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) Exception during startup processing java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) Caused by: java.lang.InternalError: jzentry == 0, jzfile = 118335776, total = 2482, name = tools\tomcat\4.1.31\temp\jar_cache53708.tmp, i = 34, message = invalid LOC header (bad signature) at java.util.zip.ZipFile$2.nextElement(ZipFile.java:320) at java.util.jar.JarFile$1.nextElement(JarFile.java:211) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:850) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:809) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:587) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3523) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143) at org.apache.catalina.startup.Catalina.start(Catalina.java:463) at org.apache.catalina.startup.Catalina.execute(Catalina.java:350) at org.apache.catalina.startup.Catalina.process(Catalina.java:129) ... 5 more So, first impulse is to say that there's a bad jar file in there somewhere. Only this isn't the case. I've deleted jars and it just fails on the next one. I'm guessing this has something to do with me deleting the temp and work directories. I did this because we're checking tomcat into our svn repository. Any ideas what's going on here? Thanks, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TLD's case sensitive
Hello, I'm moving a Struts webapp from Weblogic to Tomcat. The problem I'm now having is that it seems like Tomcat enforces case sensitivity for the TLD tags. For instance in the api for these tags, it should actually be maxlength and not maxLength. weblogic doesn't care, but tomcat does. It would be a big chore to have to change all of these tags because our app is already done. Is there anyway to shut this off in Tomcat? Thanks, Ben _ Need more e-mail storage? Get 10MB with Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot load JDBC driver class 'null'
I moved the and tags to myApp.xml and put it in the webapps folder(with the war). I'm still getting the exact same errors. From: Phillip Qin <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: 'Tomcat Users List' <[EMAIL PROTECTED]> Subject: RE: Cannot load JDBC driver class 'null' Date: Thu, 11 Sep 2003 10:32:47 -0400 My advice: 1. Never put jdbc in your classpath. It is in $CATALINA_HOME/common/lib/classes12.jar. Tomcat classloader handles it. 2. If you want to do a compile, use ant and put it in your ant script. Below is my setup driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@myoracleserver.com:1521:PROD username *** password *** maxActive 20 maxIdle 10 minIdle 10 maxWait 15000 removeAbandoned true logAbandoned true validationQuery SELECT SYSDATE FROM DUAL testOnBorrow true minEvictableIdleTimeMillis -1 timeBetweenEvictionRunsMillis 30 numTestsPerEvictionRun 1 testWhileIdle true In web.xml: Oracle Datasource jdbc/myapp javax.sql.DataSource Container -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: September 11, 2003 8:17 AM To: [EMAIL PROTECTED] Subject: Cannot load JDBC driver class 'null' Ok, I know this topic has been posted many times, but I can't find anything to help. I have OracleDriver in [$CATALINA_HOME]/common/lib here's my server.xml .. validationQuery select user from dual; url jdbc:oracle:thin:myMachine:1521:myDBName username hris password maxActive 4 maxWait 5000 driverClassName oracle.jdbc.driver.OracleDriver maxIdle 2 and my web.xml: jdbc/fsaDS javax.sql.DataSource Container Shareable in the administrative tool: the top level Resources->DataSources looks ok as MyDS is listed there but the /my_context->Resources->Datasources gives: org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName' and the localhost_log.xxx.txt (when it tries to use myDS): java.sql.SQLException: Cannot load JDBC driver class 'null Any help would be great - I've been trying everything - reloading with different configurations about 50 times - looking through books, mailing lists/archives. Thanks, Ben _ Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Use custom emotions -- try MSN Messenger 6.0! http://www.msnmessenger-download.com/tracking/reach_emoticon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot load JDBC driver class 'null' and org.apache.jasper.Ja sperException:
whoops - the myDS and fsaDS was a copy and paste error on my part. Attempting to not include "private" info, I try to change everything to mySomething. This is not my problem - sorry about the mixup. I will try the myApp.xml solution. Thanks, Ben From: "Wynkoop, Robert M" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Subject: RE: Cannot load JDBC driver class 'null' and org.apache.jasper.Ja sperException: Exception retrieving attribute 'driverClassName' Date: Thu, 11 Sep 2003 10:06:12 -0400 I don't see your comments about myDS and fsaDS. Can you echo them again. :) Thanks, Robert Wynkoop -Original Message- From: Kevin Passey [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 8:55 AM To: 'Tomcat Users List' Subject: RE: Cannot load JDBC driver class 'null' and org.apache.jasper.Ja sperException: Exception retrieving attribute 'driverClassName' No the xml file should be called myapp.xml in webapps along with your war file Did you note my other comment about myDS and fsaDS that looks like it's more your problem. Leave it how you had it and just change that - stop and start tomcat and see if that flies. Regards Kevin -Original Message- From: Wynkoop, Robert M [mailto:[EMAIL PROTECTED] Sent: 11 September 2003 14:54 To: 'Tomcat Users List' Subject: RE: Cannot load JDBC driver class 'null' and org.apache.jasper.Ja sperException: Exception retrieving attribute 'driverClassName' I thought about this and then went into the Tomcat admin. Under service/localhost/context When I click Datasource(under my apps context) I get the error: org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName' at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) in my browser window. My app is at p:.../somename/web/WEB-INF/. So are you telling me I need to create a file called web.xml. Can't do that. I already have my real web.xml there. Where can I find more information on this config file in the tomcat docs? Later, Robert Wynkoop -Original Message- From: Kevin Passey [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 8:26 AM To: 'Tomcat Users List' Subject: RE: Cannot load JDBC driver class 'null' Rather than changing your server XML create an xml file in your webapps directory with the same name as your app directory. Here is an example:- - crossContext="false" reloadable="false" mapperClass="org.apache.catalina.core.StandardContextMapper" useNaming="true" debug="0" swallowOutput="false" privileged="false" displayName="Shilton" wrapperClass="org.apache.catalina.core.StandardWrapper" docBase="C:/Tomcat4.1/webapps/shilton" cookies="true" path="/shilton" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper"> auth="Container" description="Resource reference to a factory for javax.mail.Session instances that may be used for sending electronic mail messages, preconfigured to connect to the appropriate SMTP server." /> type="javax.sql.DataSource" /> - - factory org.apache.commons.dbcp.BasicDataSourceFactory - maxActive 100 - maxIdle 5 - maxWait 100 - username INTERNET - password ** - driverClassName com.ibm.as400.access.AS400JDBCDriver - url jdbc:as400://REX Stop and re-start Tomcat and hey presto!! OK I mine is for DB2 on an iSeries - by hey it works !! Anyway shouldn't your Web XML file have myDS not fsaDS. Good luck Kevin -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: 11 September 2003 13:17 To: [EMAIL PROTECTED] Subject: Cannot load JDBC driver class 'null' Ok, I know this topic has been posted many times, but I can't find anything to help. I have OracleDriver in [$CATALINA_HOME]/common/lib here's my server.xml .. validationQuery select user from dual; url jdbc:oracle:thin:myMachine:1521:myDBName username hris password maxActive 4 maxWait 5000 driverClassName oracle.jdbc.driver.OracleDriver maxIdle 2 and my web.xml: jdbc/fsaDS javax.sql.DataSource Container Shareable in the administrative tool: the top level Resources->DataSources looks ok as MyDS is listed there but the /my_context
RE: Cannot load JDBC driver class 'null'
I have the jar in $CATALINA_HOME/common/lib here's my info: Server Information Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture Apache Tomcat/4.1.24 1.4.1_02-b06 Sun Microsystems Inc. Windows 2000 5.0 x86 -Ben From: "Wynkoop, Robert M" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Subject: RE: Cannot load JDBC driver class 'null' Date: Thu, 11 Sep 2003 08:57:35 -0400 I meant to say I can't delete the ../common/lib/classes12.jar when TomCat is running. Blip, Robert Wynkoop -Original Message- From: Wynkoop, Robert M Sent: Thursday, September 11, 2003 7:54 AM To: 'Tomcat Users List' Subject: RE: Cannot load JDBC driver class 'null' I'm having the same problem. From what I read the most common problem is that you jdbc driver jar is not in /common/lib dir. Apparently if its only the the web apps ../WEB-INF/lib the tomcat runtime does not have access to it. But, I still have the same problem. I know the jar file is getting used from ../common/lib because I can delete it when Tomkitty is fired up. What version of Tomcat are you using. I'm using V4.1.27LE(No sax parser included.) JDK 1.3. I'm currently doing a new install of tomcat LE. If that does not work I'm trying Tomcat standard from http://www.tux.org/pub/net/apache/dist/jakarta/tomcat-4/ Later, Rober Wynkoop -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 7:17 AM To: [EMAIL PROTECTED] Subject: Cannot load JDBC driver class 'null' Ok, I know this topic has been posted many times, but I can't find anything to help. I have OracleDriver in [$CATALINA_HOME]/common/lib here's my server.xml .. validationQuery select user from dual; url jdbc:oracle:thin:myMachine:1521:myDBName username hris password maxActive 4 maxWait 5000 driverClassName oracle.jdbc.driver.OracleDriver maxIdle 2 and my web.xml: jdbc/fsaDS javax.sql.DataSource Container Shareable in the administrative tool: the top level Resources->DataSources looks ok as MyDS is listed there but the /my_context->Resources->Datasources gives: org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName' and the localhost_log.xxx.txt (when it tries to use myDS): java.sql.SQLException: Cannot load JDBC driver class 'null Any help would be great - I've been trying everything - reloading with different configurations about 50 times - looking through books, mailing lists/archives. Thanks, Ben _ Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Fast, faster, fastest: Upgrade to Cable or DSL today! https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot load JDBC driver class 'null'
Ok, I know this topic has been posted many times, but I can't find anything to help. I have OracleDriver in [$CATALINA_HOME]/common/lib here's my server.xml .. validationQuery select user from dual; url jdbc:oracle:thin:myMachine:1521:myDBName username hris password maxActive 4 maxWait 5000 driverClassName oracle.jdbc.driver.OracleDriver maxIdle 2 and my web.xml: jdbc/fsaDS javax.sql.DataSource Container Shareable in the administrative tool: the top level Resources->DataSources looks ok as MyDS is listed there but the /my_context->Resources->Datasources gives: org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName' and the localhost_log.xxx.txt (when it tries to use myDS): java.sql.SQLException: Cannot load JDBC driver class 'null Any help would be great - I've been trying everything - reloading with different configurations about 50 times - looking through books, mailing lists/archives. Thanks, Ben _ Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]