Openfire cocould not locate home

Source: Internet
Author: User

the openfire development environment is prone to cocould not locate home exceptions, mainly caused by xmppserver. Code in Java:

Private void initialize () filenotfoundexception {<br/> locateopenfire (); <br/> ...... <br/>}</P> <p> private void locateopenfire () throws filenotfoundexception {<br/> string jiveconfigname = "conf" + file. separator + "openfire. XML "; <br/> // first, try to load it openfirehome as a system property. <br/> If (openfirehome = NULL) {<br/> string homeproperty = system. getproperty ("openfirehome"); <br/> Try {<br/> If (homeproperty! = NULL) {<br/> openfirehome = verifyhome (homeproperty, jiveconfigname); <br/>}< br/> catch (filenotfoundexception Fe) {<br/> // ignore. <br/>}</P> <p> // if we still don't have home, let's assume this is standalone <br/> // and just look for home in a standard sub-Dir location and verify <br/> // by looking for the config file <br/> If (openfirehome = NULL) {<br/> try {<br/> openfirehome = verifyhome (".. ", jiveconfigname ). getcanonicalfile (); <br/>}< br/> catch (filenotfoundexception Fe) {<br/> // ignore. <br/>}< br/> catch (ioexception IE) {<br/> // ignore. <br/>}</P> <p> ..... </P> <p >}</P> <p>
Here we mainly look for the start directory of openfire based on the system configuration.

If the preceding error is found:

1. Check whether ant is used to compile openfire. Make sure that all compilation results are in the target \ openfire directory in the source code path.

2. check that the configuration value of arguments --> VM arguments in the configuration of DEBUG configuration/run configuration is-dopenfirehome =$ {workspace_loc: openfire_src/target/openfire}. Only this parameter is configured.System. getproperty ("openfirehome ")No null occurs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.