That IllegalStateException means that  (new
File("/mnt/mynfsserver_img", "/img")).isDirectory()  returned false.

In other words, the likely cause is that the path was not readable at
the time of the check.

Replacing PostResources by PreResources and vise versa will have no
effect on this.


2014-11-21 17:45 GMT+03:00  <phi...@free.fr>:
>
> I have solved the problem by replacing PostResources by PreResources (cf. 
> http://mikusa.blogspot.fr/2014/07/tips-on-migrating-to-tomat-8-resources.html).
>
> Now I need to figure out how to use the webAppMount. Any suggestions?
>
> Philippe
>
>
>
> ----- Mail original -----
> De: phi...@free.fr
> À: users@tomcat.apache.org
> Envoyé: Vendredi 21 Novembre 2014 15:38:57
> Objet: Problem with base directory in Resource
>
>
> Hello,
>
> in my Apache 8 context.xml file, I have created the following resource:
>
> <Resources>
>                 <PreResources
>                         
> className="org.apache.catalina.webresources.DirResourceSet"
>                         base="/mnt/mynfsserver_img/"
>                         webAppMount="/img"
>                         internalPath="/img" />
> </Resources>
>
> where /mnt/mynfsserver_img is a mounted volume containing thousands of photos 
> in sub-directories.
>
> When I start Tomcat 8, I get the following error message:
>
> -------------------------------------
> Caused by: org.apache.catalina.LifecycleException: Failed to initialize 
> component [org.apache.catalina.webresources.DirResourceSet@6649bfd3]
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
>         at 
> org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:647)
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
>         ... 14 more
> Caused by: java.lang.IllegalArgumentException: TODO-i18n: base/internalPath 
> is not a directory
>         at 
> org.apache.catalina.webresources.DirResourceSet.checkType(DirResourceSet.java:247)
>         at 
> org.apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.java:134)
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
>         ... 16 more
> --------------------------------------------
>
> What am I doing wrong?
>
> Many thanks.
>
> Cheers,
>
> Philippe
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to