Bugs item #1008396, was opened at 2004-08-13 10:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1008396&group_id=22866

Category: None
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Brian Wallis (bwallis42)
Assigned to: Nobody/Anonymous (nobody)
Summary: conf/web.xml gets truncated   

Initial Comment:
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  
 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1008396&group_id=22866


-------------------------------------------------------
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-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to