[ 
https://issues.apache.org/jira/browse/MEECROWAVE-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16555211#comment-16555211
 ] 

Mark Struberg commented on MEECROWAVE-130:
------------------------------------------

[https://github.com/apache/meecrowave/blob/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java#L467]

 

we currently *always* create the whole directory structure in MEECROWAVE_BASE: 
lib, logs, temp, work, webapps

Do we really use any of those directories?

* lib is *not* required in MEECROWAVE_BASE. Only in MEECROWAVE_HOME - if any. 
Because if you use meecrowave-runner.jar then we do not require lib, right? And 
in any other case it gets created by the distribution.

* logs: This is a bit special. It is only required if there is no special 
MEECROWAVE_OUT set _and_ if people stick with the default logging. In case they 
overwrite it to use ConsoleLogger or another location (/var/log/..) then this 
directory is unused. 
 
* temp: is this really used in Meecrowave? It should only get created if 
MEECROWAVE_TMPDIR is not explicitly set to some other directory. 

* work: is this also really used? I think this is only used in Tomcat to store 
stuff like the compiled JSP files. Since we don't ship JSP at all we probably 
could leave this off?

* webapps: hmmm only needed if we deploy WAR files, right? If we use 
meecrowave:bundle with just a jar, then this is not required imo. But this 
directory is probably a hard nut.

> IOException if MEECROWAVE_OUT is different than MEECROWAVE_HOME
> ---------------------------------------------------------------
>
>                 Key: MEECROWAVE-130
>                 URL: https://issues.apache.org/jira/browse/MEECROWAVE-130
>             Project: Meecrowave
>          Issue Type: Bug
>    Affects Versions: 1.2.3
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>            Priority: Major
>             Fix For: 1.2.4
>
>
> In my project I have the MEECROWAVE_OUT and MEECROWAVE_BASE is set to 
> separated places.
> MEECROWAVE_BASE is in /opt/myapp
> and
> MEECROWAVE_OUT is in /var/log/myapp.log
> Since mw-1.2.2 I now get the following Exception:
> {noformat}
> Exception in thread "main" java.lang.IllegalStateException: /opt/myapp/logs 
> can't be created
>         at org.apache.meecrowave.io.IO.mkdirs(IO.java:89)
>         at 
> org.apache.meecrowave.Meecrowave.createDirectory(Meecrowave.java:1047)
>         at org.apache.meecrowave.Meecrowave.start(Meecrowave.java:469)
>         at org.apache.meecrowave.runner.Cli.run(Cli.java:80)
>         at org.apache.meecrowave.runner.Cli.main(Cli.java:109)
>         Suppressed: java.lang.IllegalStateException: Unable to create the 
> directory [/tomcat.8080] to use as the base directory
>                 at 
> org.apache.catalina.startup.Tomcat.initBaseDir(Tomcat.java:725)
>                 at 
> org.apache.catalina.startup.Tomcat.getServer(Tomcat.java:540)
>                 at org.apache.meecrowave.Meecrowave.close(Meecrowave.java:941)
>                 at org.apache.meecrowave.runner.Cli.run(Cli.java:87)
> {noformat}
> Likely due to /opt/myapp is mounted as readonly filesystem.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to