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


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844621#3844621

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844621


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to