tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Problem with base directory in Resource
Date Fri, 21 Nov 2014 23:20:22 GMT
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  <phiroc@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: phiroc@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message