[ http://jira.jboss.com/jira/browse/JBAS-1053?page=history ] Scott M Stark closed JBAS-1053: -------------------------------
Resolution: Cannot Reproduce Bug Reopen if this is still an issue as I can't reproduce it. > conf/web.xml gets truncated > --------------------------- > > Key: JBAS-1053 > URL: http://jira.jboss.com/jira/browse/JBAS-1053 > Project: JBoss Application Server > Type: Bug > Versions: JBossAS-3.2.6 Final > Reporter: SourceForge User > Assignee: Scott M Stark > > > SourceForge Submitter: bwallis42 . > OS: Gentoo Linux, (kernel 2.6.7 and glibc 2.3.3) > also on Solaris 8. > JDK: 1.4.2_05 and 1.4.2_01 > > When I start JBoss with the classpath including the conf > directory where the web.xml file is, the web.xml file gets > truncated. > > This didn't happen in JBoss 3.2.1 but does in 3.2.3. > > Workaround is to either write protect web.xml (and then > it works fine, no errors either) or remove the conf > directory from the classpath. > > See the thread in the forums for details, I've copied part > of that discussion here which describes the problem and > tries to point to where it might be occuring. > > http://jboss.org/index.html?module=bb&op=viewtopic&t=52741 > > -------------------------- > OK, found what it is in our configuration that causes > web.xml to be overwritten. > > For a reason that I cannot quite remember we have > always had the server conf directory on our classpath > when jboss starts up, something to do with using > ClassLoader.getResource() for properties I think, anyway > we don't use that anymore. Also when we changed from > 3.2.1 to 3.2.3 we also changed from jetty to tomcat. > > If I take the conf directory off the classpath then the > web.xml file is not truncated, although it's last modified > time is still updated. > > On a Solaris system I launched the JVM with truss and > then matched up the tracing in the JBoss log with the > truss output and found the following. (the first log shown > at the end is the jboss log followed with the truss log) > > The first JBoss timestamp at 2004-08-10 14:37:35,460 > corresponds to a time of 123.4634 in the truss log and > the last JBoss timestamp is a time of 123.5674 in the > truss log so the jboss tracing overlaps the two truss > entries shown. > > Notice that the second open call in the truss log has flags > O_CREATE|O_TRUNC which is going to do exactly that, > truncate the web.xml file. This second open call fits into > the time between the last two jboss log entries shown > which seem to be in the UnifiedClassLoader3. > > That's about as far as I can go as I don't know this area > of the JBoss code at all. > > Is this a bug I should report? The work around is simple, > don't put the conf dir on your classpath :-) > > > jboss log: > ====== > 2004-08-10 14:37:35,460 TRACE > [org.jboss.mx.loading.UnifiedClassLoader] > getResourceLocally([EMAIL PROTECTED] > url=file:/vobs/NotificationSer > vice_build/JAVA_dbg/run/NS_EFD/jboss/deploy/jbossweb-tomcat41.sar/ > ,addedOrder=11}), name=web.xml, > resURL:file:/vobs/NotificationService_build/JAVA_dbg/run/NS_EFD/jboss/co > nf/web.xml > 2004-08-10 14:37:35,464 TRACE > [org.jboss.mx.loading.UnifiedClassLoader3] attempt(1) > was: true for > :[EMAIL PROTECTED] > url=file:/vobs/Notific > ationService_build/JAVA_dbg/run/NS_EFD/jboss/deploy/jbossweb-tomcat41.sar/ > ,addedOrder=11} > 2004-08-10 14:37:35,465 TRACE > [org.jboss.mx.loading.LoadMgr3] registerLoaderThread, > [EMAIL PROTECTED] > url=file:/vobs/NotificationServic > e_build/JAVA_dbg/run/NS_EFD/jboss/deploy/jbossweb-tomcat41.sar/ > ,addedOrder=11}, t=Thread[main,5,jboss], prevT=null > 2004-08-10 14:37:35,467 TRACE > [org.jboss.mx.loading.LoadMgr3] Begin beginLoadTask, > [EMAIL PROTECTED]: > java.io.FileOutputStream, r > equestingThread: Thread[main,5,jboss], > requestingClassLoader: > [EMAIL PROTECTED] > url=file:/vobs/NotificationService_build/JAVA_dbg/run/NS_EF > D/jboss/deploy/jbossweb-tomcat41.sar/ > ,addedOrder=11}, loadedClass: null, loadOrder: > 2147483647, loadException: null, threadTaskCount: 0, > state: 0} > 2004-08-10 14:37:35,468 TRACE > [org.jboss.mx.loading.UnifiedClassLoader] > loadClassLocally, name=java.io.FileOutputStream > 2004-08-10 14:37:35,469 TRACE > [org.jboss.mx.loading.UnifiedLoaderRepository3] > cacheLoadedClass, classname: > java.io.FileOutputStream, class: class > java.io.FileOutputStream, > ucl: > [EMAIL PROTECTED] > url=file:/vobs/NotificationService_build/JAVA_dbg/run/NS_EFD/jboss/deploy/jbossweb-tomcat41.sar/ > > ,addedOrder=11} > 2004-08-10 14:37:35,470 TRACE > [org.jboss.mx.loading.LoadMgr3] End beginLoadTask, > loadClassFromClassLoader > 2004-08-10 14:37:35,472 TRACE > [org.jboss.mx.loading.LoadMgr3] Begin endLoadTask, > [EMAIL PROTECTED]: > java.io.FileOutputStream, req > uestingThread: Thread[main,5,jboss], > requestingClassLoader: > [EMAIL PROTECTED] > url=file:/vobs/NotificationService_build/JAVA_dbg/run/NS_EFD/ > jboss/deploy/jbossweb-tomcat41.sar/ ,addedOrder=11}, > loadedClass: class > [EMAIL PROTECTED]<CodeSource: null>, > loadOrder: 2147483647, loadException: null, thre > adTaskCount: 0, state: 4} > 2004-08-10 14:37:35,473 TRACE > [org.jboss.mx.loading.UnifiedClassLoader3] release(1) > for :[EMAIL PROTECTED] > url=file:/vobs/NotificationServi > ce_build/JAVA_dbg/run/NS_EFD/jboss/deploy/jbossweb-tomcat41.sar/ > ,addedOrder=11} > 2004-08-10 14:37:35,474 TRACE > [org.jboss.mx.loading.UnifiedClassLoader3] released, > holds: 0 > 2004-08-10 14:37:35,522 TRACE > [org.jboss.mx.loading.UnifiedClassLoader3] attempt(1) > was: true for > :[EMAIL PROTECTED] > url=file:/vobs/Notific > ationService_build/JAVA_dbg/run/NS_EFD/jboss/deploy/jbossweb-tomcat41.sar/ > ,addedOrder=11} > > > truss log: > ======= > > 19438: 123.5093 > open("/vobs/NotificationService_build/JAVA_dbg/run/NS_EFD/jboss/conf/web.xml", > > O_RDONLY|O_LARGEFILE) = 15 > 19438: 123.5644 > open("/vobs/NotificationService_build/JAVA_dbg/run/NS_EFD/jboss/conf/web.xml", > > O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = > 17 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development