Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

When I start the JBoss server to run my JSP page, it gives the error as:

Failed to create directory structure: C:\Program Files\jboss-4.2.2.GA\server\default\log

and then a pop-up appears saying

Starting JBoss v4.2 at localhost has encountered a problem.
Server JBoss v4.2 at localhost failed to start.

Please tell me what to do?

share|improve this question

2 Answers 2

When starting for the first time for a certain configuration (here being default, if they are not already present, JBoss creates the directories:

  • $JBOSS_HOME\server\default\data
  • $JBOSS_HOME\server\default\log
  • $JBOSS_HOME\server\default\tmp
  • $JBOSS_HOME\server\default\work

These are used to store and write logs, temporary files and other various files generated.

There is obviously an error when it tries to create the log folder and this is most likely because it does not have permissions to write and create folders. ( Though you would get this every time since JBoss likes to write a lot of logs all the time ).

In Windows Vista/7, the Program Files folder is not (usually) write-able, so an application started by the user cannot create or modify anything there. You could run JBoss as Administrator but DON'T, it's a bad idea. All files which need to be created/modified by an application should usually be stored in the user's folder, Application Data or somewhere else on the hard drive.

Possible solutions:

  • Either install your JBoss server somewhere else where you have write access. ( It needs this also when running normally like for storing logs )
  • Configure JBoss to store logs and other files in different directories, outside of your normal Program Files one. For example to specify a different directory for logs you can set the JVM startup property jboss.server.log.dir ( Specify it at startup by using java -Djboss.server.log.dir=C:/I_can_write_here/. You can find the properties for other directories (and a lot more) at http://community.jboss.org/wiki/JBossProperties
share|improve this answer

The obvious thing to check is which, if any, of the directories in the quoted path are missing:

C:\Program Files\jboss-4.2.2.GA\server\default\log

Obviously, you have bigger problems than just this if C:\Program Files\ is missing, but you may have other directories missing.

You may need to run an initialize step to validate your configuration and create the directories.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.7.1.2693\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Stack Overflow works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </nosc"], "copyright__copyright__copyright": ["C:\\Program Files\\jboss-4.2.2.GA\\server\\default\\log\n\nObviously, you have bigger problems than just this if C:\\Program Files\\ is missing, but you may have other directories missing.\n\nYou may need to run an initialize step to validate your configuration and create the directories.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}