-
1. Re: External directory in classpath
prasad.deshpande Mar 13, 2012 6:44 PM (in response to colective)22:32:46,051 ERROR [stderr] (http--10.0.0.5-8080-1) #####################################################################
22:32:46,052 ERROR [stderr] (http--10.0.0.5-8080-1) WARNING: no properties file found! This warning can be ignored
22:32:46,053 ERROR [stderr] (http--10.0.0.5-8080-1) for applets. A file file called "jacorb.properties" or
22:32:46,053 ERROR [stderr] (http--10.0.0.5-8080-1) ".jacorb_properties" should be present in the classpath,
22:32:46,054 ERROR [stderr] (http--10.0.0.5-8080-1) the home directory (/root), the current directory (.) or
22:32:46,055 ERROR [stderr] (http--10.0.0.5-8080-1) in Javas lib directory (/usr/java/jdk1.6.0_31/jre)
22:32:46,055 ERROR [stderr] (http--10.0.0.5-8080-1) #####################################################################
22:32:46,056 ERROR [stderr] (http--10.0.0.5-8080-1)
If it's also looking in current directory (.) you can simply put jacorb.properties in the directory from where you run run.sh or you can simply pass -Duser.dir=<path_to_directory_containing_properties> to VM as argument.. & that will become current woring directory (.) & then it shoud find that properties file.
-
2. Re: External directory in classpath
colective Mar 13, 2012 6:47 PM (in response to prasad.deshpande)Hi,
yes i know that, i can put in all default classpath like /home, . / java path, in jboss...
configuration and custom properties are one separate directory which is in /opt/appconfig/ and we cannot spread files on multiple locations.. it must stay in this config dir..
any other sugestion?
thanks
t.
-
3. Re: External directory in classpath
tepih78 Mar 14, 2012 9:02 AM (in response to colective)Tomo,
you can define custom module if that's an option... this is for AS 7
for instance go to jboss modules directory
create sub directory custom/myconfig/main for example
there add your property files
create module.xml file .. you will chose module name... for instnace custom.myconfig
<module xmlns="urn:jboss:module:1.1" name="custom.myconfig">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="."/>
<!-- Insert resources here -->
</resources>
<dependencies>
</dependencies>
</module>
In your jboss-deployment-structure.xml include this module to your app
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="custom.myconfig/>
</dependencies>
<resources>
</resources>
</deployment>
<sub-deployment name="My_WAR.war">
<dependencies>
<module name="custom.myconfig" />
</dependencies>
</sub-deployment>
Didn't had luck creating resource-root path="some path along my filesystem". Only . worked and then it loaded a property file from custom module directory.