ASF Bugzilla – Attachment 24918 Details for
Bug 48179
After startup seeing java.io.FileNotFoundException:<file path>/tldcache.ser (No such file or directory)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for TC 5.5
2010-02-03_tc55_bug48179.patch (text/plain), 4.52 KB, created by
Konstantin Kolinko
on 2010-02-03 01:23:22 UTC
(
hide
)
Description:
patch for TC 5.5
Filename:
MIME Type:
Creator:
Konstantin Kolinko
Created:
2010-02-03 01:23:22 UTC
Size:
4.52 KB
patch
obsolete
>Index: container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties >=================================================================== >--- container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties (revision 905877) >+++ container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties (working copy) >@@ -91,7 +91,9 @@ > hostConfig.undeploy.error=Error undeploying web application at context path {0} > hostConfig.undeploying=Undeploying deployed web applications > tldConfig.cce=Lifecycle event data object {0} is not a Context >-tldConfig.execute=Error processing TLD files for context path {0} >+tldConfig.execute=Error processing TLD files for context path [{0}] >+tldConfig.cache.read=Error trying to read a TLD cache file for context path [{0}] >+tldConfig.cache.write=Error trying to write a TLD cache file for context path [{0}] > userConfig.database=Exception loading user database > userConfig.deploy=Deploying web application for user {0} > userConfig.deploying=Deploying user web applications >Index: container/catalina/src/share/org/apache/catalina/startup/TldConfig.java >=================================================================== >--- container/catalina/src/share/org/apache/catalina/startup/TldConfig.java (revision 905877) >+++ container/catalina/src/share/org/apache/catalina/startup/TldConfig.java (working copy) >@@ -274,8 +274,8 @@ > // find the cache > if( tldCache!= null && tldCache.exists()) { > // just read it... >- processCache(tldCache); >- return; >+ if (processCache(tldCache)) >+ return; > } > } > >@@ -290,8 +290,8 @@ > if (tldCache != null && tldCache.exists()) { > long lastModified = getLastModified(resourcePaths, jarPaths); > if (lastModified < tldCache.lastModified()) { >- processCache(tldCache); >- return; >+ if (processCache(tldCache)) >+ return; > } > } > >@@ -316,13 +316,29 @@ > > if( tldCache!= null ) { > log.debug( "Saving tld cache: " + tldCache + " " + list.length); >+ FileOutputStream out = null; > try { >- FileOutputStream out=new FileOutputStream(tldCache); >+ out=new FileOutputStream(tldCache); > ObjectOutputStream oos=new ObjectOutputStream( out ); > oos.writeObject( list ); > oos.close(); >+ out = null; > } catch( IOException ex ) { >- ex.printStackTrace(); >+ log.warn(sm.getString("tldConfig.cache.write", context >+ .getPath()), ex); >+ } finally { >+ if (out != null) { >+ try { >+ out.close(); >+ } catch (Exception ignored) { >+ // Do nothing >+ } >+ try { >+ tldCache.delete(); >+ } catch (Exception ignored) { >+ // Do nothing >+ } >+ } > } > } > >@@ -385,10 +401,11 @@ > return lastModified; > } > >- private void processCache(File tldCache ) throws IOException { >+ private boolean processCache(File tldCache ) throws IOException { > // read the cache and return; >+ FileInputStream in = null; > try { >- FileInputStream in=new FileInputStream(tldCache); >+ in =new FileInputStream(tldCache); > ObjectInputStream ois=new ObjectInputStream( in ); > String list[]=(String [])ois.readObject(); > if( log.isDebugEnabled() ) >@@ -397,8 +414,25 @@ > context.addApplicationListener(list[i]); > } > ois.close(); >- } catch( ClassNotFoundException ex ) { >- ex.printStackTrace(); >+ in = null; >+ return true; >+ } catch( Exception ex ) { >+ log.warn(sm.getString("tldConfig.cache.read", context >+ .getPath()), ex); >+ return false; >+ } finally { >+ if (in != null) { >+ try { >+ in.close(); >+ } catch (Exception ignored) { >+ // Do nothing >+ } >+ try { >+ tldCache.delete(); >+ } catch (Exception ignored) { >+ // Do nothing >+ } >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48179
: 24918 |
24919