dev@glassfish.java.net

Re: [Fwd: Startup errors related to FileNotFoundException tlcCache.ser]

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Mon, 26 Feb 2007 17:26:23 -0800

Hi Bhakti,

Bhakti Mehta wrote On 02/26/07 03:20 PM,:

> Hi,
> Has anyone noticed similar problems?


This is now fixed.

Please update your ws with these files:

/cvs/glassfish/appserv-core/src/java/com/sun/enterprise/web/EmbeddedWebContainer.java
/cvs/glassfish/appserv-core/src/java/com/sun/enterprise/web/WebContainer.java

Following is an explanation of what caused the
java.io.FileNotFoundException:

During startup, every webapp creates its own work directory:

  ${com.sun.aas.instanceRoot}/generated/jsp/j2ee-modules/<module-name>

All of the parent directories of a webapp's work directory are shared
across all webapps.

While some of the shared parent directories, such as

  ${com.sun.aas.instanceRoot}

already exist before startup, others, such as

 ${com.sun.aas.instanceRoot}/generated/jsp/j2ee-modules

and

 ${com.sun.aas.instanceRoot}/generated/jsp/j2ee-apps

are created during the startup of a webapp (unless they already exist),
using java.io.File.mkdirs().

Now that webapps are started concurrently, we've started seeing
concurrency issues around java.io.File.mkdirs(), preventing some
webapps from creating their own work directory and "tldCache.ser"
resource in it, causing the java.io.FileNotFoundException you've seen.

The fix is to create any shared parent directories before starting the
webapps concurrently, thus avoiding any concurrency issues around
.java.io.File.mkdirs() without adding the need for synchronization.

Thanks,

Jan

> Regards,
> Bhakti
>
> ------------------------------------------------------------------------
>
> Subject:
> Startup errors related to FileNotFoundException tlcCache.ser
> From:
> Bhakti Mehta <Bhakti.Mehta_at_sun.com>
> Date:
> Mon, 26 Feb 2007 15:13:17 -0800
> To:
> Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>, Mike.Grogan_at_Sun.COM,
> Dinesh Patil <Dinesh.Patil_at_Sun.COM>
>
> To:
> Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>, Mike.Grogan_at_Sun.COM,
> Dinesh Patil <Dinesh.Patil_at_Sun.COM>
>
>
> Hi all,
> I did maven checkout
> maven bootstrap-all build
> maven configure-runtime
> On starting GF I get this error related to tldCache.ser and scratchDir
> is unusable?
> Please can you suggest?
> Regards,
> Bhakti
>
> [#|2007-02-26T15:09:19.500-0800|WARNING|sun-appserver9.1|javax.enterprise.syste
>
> .stream.err|_ThreadID=12;_ThreadName=pool-1-thread-6;_RequestID=dfe77e63-9aaf-4
>
> 49-8751-fe3c48cb7ffe;|java.io.FileNotFoundException:
> C:\publish\glassfish\domai
> s\domain1\generated\jsp\j2ee-modules\__default-web-module-server\tldCache.ser
> (
> he system cannot find the path specified)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> at
> org.apache.catalina.startup.TldConfig.execute(TldConfig.java:426)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:
> 053)
> at com.sun.enterprise.web.WebModule.start(WebModule.java:304)
> at
> com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:
> 5)
> at
> com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBa
> e.java:283)
> at
> com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.j
> va:317)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:4
> 7)
> at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExe
> utor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecuto
> .java:675)
> at java.lang.Thread.run(Thread.java:595)
> |#]
>
> [#|2007-02-26T15:09:19.546-0800|WARNING|sun-appserver9.1|javax.enterprise.syste
>
> .stream.err|_ThreadID=13;_ThreadName=pool-1-thread-3;_RequestID=9d49f734-5260-4
>
> 71-a6da-0856a5beb2f1;|
> java.io.FileNotFoundException:
> C:\publish\glassfish\domains\domain1\generated\j
> p\j2ee-modules\adminapp\tldCache.ser (The system cannot find the path
> specified
>
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> at
> org.apache.catalina.startup.TldConfig.execute(TldConfig.java:426)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:
> 053)
> at com.sun.enterprise.web.WebModule.start(WebModule.java:304)
> at
> com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:
> 5)
> at
> com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBa
> e.java:283)
> at
> com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.j
> va:317)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:4
> 7)
> at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExe
> utor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecuto
> .java:675)
> at java.lang.Thread.run(Thread.java:595)
> |#]
>
> [#|2007-02-26T15:09:19.625-0800|SEVERE|sun-appserver9.1|org.apache.jasper.Embed
>
> edServletOptions|_ThreadID=12;_ThreadName=pool-1-thread-6;_RequestID=dfe77e63-9
>
> af-4449-8751-fe3c48cb7ffe;|PWC5963: The scratchDir you specified:
> C:\publish\gl
> ssfish\domains\domain1\generated\jsp\j2ee-modules\__default-web-module-server
> i
> unusable.|#]
>
> [#|2007-02-26T15:09:19.625-0800|SEVERE|sun-appserver9.1|org.apache.jasper.Embed
>
> edServletOptions|_ThreadID=13;_ThreadName=pool-1-thread-3;_RequestID=9d49f734-5
>
> 60-4371-a6da-0856a5beb2f1;|PWC5963: The scratchDir you specified:
> C:\publish\gl
> ssfish\domains\domain1\generated\jsp\j2ee-modules\adminapp is
> unusable.|#]
>
> [#|2007-02-26T15:09:20.281-0800|INFO|sun-appserver9.1|javax.enterprise.resource
>
> webcontainer.jsf.config|_ThreadID=14;_ThreadName=pool-1-thread-7;;|Initializing
>
> Sun's JavaServer Faces implementation (1.2_03-b09-FCS) for context ''|#]
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>