axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Muller <pmul...@gfi.fr>
Subject Re: Axis2 with Properties
Date Thu, 24 Jul 2008 12:29:46 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I had about the same problem : my database.properties file had to be
put in the same folder as the .aar : webapps/axis2/WEB-INF/services.<br>
I guess Axis can't allow FileInputStream to fetch the file from within
the .aar .<br>
<br>
Three days ago I asked here how to specify to Axis2 the directory to
use for relative file paths used in a service : Keith Chapman suggested
to add it to the classpath and then load it off the classpath.<br>
<br>
Regards<br>
Pierre<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:joern.albinger@gmx.de">joern.albinger@gmx.de</a>
a &eacute;crit&nbsp;:
<blockquote cite="mid:20080724103654.F168272495A@athena.apache.org"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.6000.16674" name="GENERATOR">
  <div><font face="Arial" size="2"><span class="937073510-24072008">Hello,</span></font></div>
  <div><font face="Arial" size="2"><span class="937073510-24072008"></span></font>&nbsp;</div>
  <div><font face="Arial" size="2"><span class="937073510-24072008">I
have a problem with my properties class. After archiving my service my
database controller can't locate or read the properties data.</span></font></div>
  <div><font face="Arial" size="2"><span class="937073510-24072008">In
the data are the settings for the database connection like treiber ,
username&nbsp;url .</span></font></div>
  <div><font face="Arial" size="2"><span class="937073510-24072008">Where
do I have to place the properties for the right reading and&nbsp;is it
possible to use a normal properties like this:</span></font></div>
  <div><font face="Arial" size="2"><span class="937073510-24072008"></span></font>&nbsp;</div>
  <font><span class="937073510-24072008"><b><font color="#7f0055"></font></b>
  <p align="left"><b><font color="#7f0055"><font face="Arial" size="2">private</font></font></b><font
 color="#7f0055"><font face="Arial"><font size="2"> <b><font
 color="#7f0055">boolean</font></b></font></font><font face="Arial"
 size="2"> loadProperties() {</font></font></p>
  <p align="left"><font color="#7f0055"><b><font color="#7f0055"><font
 face="Arial" size="2">boolean</font></font></b><font face="Arial"><font
 size="2"> data = <b><font color="#7f0055">false</font></b></font></font><font
 face="Arial" size="2">;</font></font></p>
  <p align="left"><font color="#7f0055"><b><font color="#7f0055"><font
 face="Arial" size="2">try</font></font></b><font face="Arial" size="2">
{</font></font></p>
  <p align="left"><font color="#7f0055"><i><font color="#0000c0"><font
 face="Arial" size="2">properties</font></font></i><font face="Arial"><font
 size="2">.load(<b><font color="#7f0055">new</font></b></font></font><font
 size="2"><font face="Arial"> FileInputStream(<font color="#0000c0">config</font></font><font
 face="Arial">));</font></font></font></p>
  <p align="left"><font color="#7f0055"><font size="2"><font
 face="Arial">data = </font><b><font color="#7f0055"><font face="Arial">true</font></font></b></font><font
 face="Arial" size="2">;</font></font></p>
  <p align="left"><font color="#7f0055"><font size="2"><font
 face="Arial">} </font><b><font color="#7f0055"><font face="Arial">catch</font></font></b></font><font
 face="Arial"><font size="2"> (<b><font color="#7f0055">final</font></b></font></font><font
 face="Arial" size="2"> FileNotFoundException e) {</font></font></p>
  <p align="left"><font color="#7f0055"><font size="2"><font
 face="Arial">System.</font><i><font color="#0000c0"><font face="Arial">out</font></font></i></font><font
 size="2"><font face="Arial">.println(<font color="#2a00ff">"Config
File konnte nicht gefunden weren oder existiert nicht."</font></font><font
 face="Arial">);</font></font></font></p>
  <p align="left"><font color="#7f0055"><font size="2"><font
 face="Arial">data = </font><b><font color="#7f0055"><font face="Arial">false</font></font></b></font><font
 face="Arial" size="2">;</font></font></p>
  <p align="left"><font color="#7f0055"><font face="Arial" size="2">e.printStackTrace();</font></font></p>
  <p align="left"><font color="#7f0055"><font size="2"><font
 face="Arial">} </font><b><font color="#7f0055"><font face="Arial">catch</font></font></b></font><font
 face="Arial"><font size="2"> (<b><font color="#7f0055">final</font></b></font></font><font
 face="Arial" size="2"> IOException e) {</font></font></p>
  <p align="left"><font color="#7f0055"><font size="2"><font
 face="Arial">System.</font><i><font color="#0000c0"><font face="Arial">out</font></font></i></font><font
 size="2"><font face="Arial">.println(<font color="#2a00ff">"Es ist ein
Fehler beim Lesen der Config Datei aufgetreten."</font></font><font
 face="Arial">);</font></font></font></p>
  <p align="left"><font color="#7f0055"><font size="2"><font
 face="Arial">data = </font><b><font color="#7f0055"><font face="Arial">false</font></font></b></font><font
 face="Arial" size="2">;</font></font></p>
  <p align="left"><font color="#7f0055"><font face="Arial" size="2">e.printStackTrace();</font></font></p>
  <p align="left"><font color="#7f0055"><font face="Arial" size="2">}</font></font></p>
  <p align="left"><font color="#7f0055"><b><font color="#7f0055"><font
 face="Arial" size="2">return</font></font></b><font face="Arial"
 size="2"> data;</font></font></p>
  <p><font color="#7f0055"><font face="Arial" size="2">}</font><font
 color="#3f7f5f"><font face="Arial" size="2">// end of load Properties</font></font></font></p>
  <div><font color="#7f0055">&nbsp;</font></div>
  <div><font color="#7f0055">&nbsp;</font></div>
  <div><font color="#7f0055"><font face="Arial"><font size="2"><span
 class="937073510-24072008"><font color="#3f7f5f">I hope , that someone
can help with this problem.</font></span></font></font></font></div>
  <div><font color="#7f0055"><font face="Arial"><font size="2"><span
 class="937073510-24072008"></span></font></font>&nbsp;</font></div>
  <div><font color="#7f0055"><font face="Arial"><font size="2"><span
 class="937073510-24072008"></span></font></font>&nbsp;</font></div>
  <div><font color="#7f0055"><font><span class="937073510-24072008"></span><font
 face="Arial"><font size="2"><span class="937073510-24072008"><font
 color="#3f7f5f">Best regards</font></span></font></font></font></font></div>
  <div><font color="#7f0055"><font><font><span
 class="937073510-24072008"></span><font face="Arial"><font size="2"><span
 class="937073510-24072008"><font color="#3f7f5f">J&ouml;rn</font></span>&nbsp;</font></font></font></font></font></div>
  </span></font></blockquote>
<br>**************************<br>
Si vous n'êtes pas le destinataire désigné de ce message ou une personne autorisée à
l'utiliser, toute distribution, copie, publication ou usage à quelques fins que ce soit des
informations dans ce message sont interdits. Merci d'informer immédiatement l'expéditeur
par messagerie, et, de détruire ce message.<br>
This e-mail is confidential. If you are not the addressee or an authorized recipient of this
message, any distribution, copying, publication or use of this information for any purpose
is prohibited. Please notify the sender immediately by e-mail and then delete this message.<br>
**************************<br>
<br>
<br>
</body>
</html>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message