Author |
Message
|
hasselb |
Posted: Fri Apr 27, 2007 12:36 am Post subject: Problem with MBService in Java Compute Node |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 6
|
I have a Java Compute Node where i want to read something from a file. You possible exceptions i use the MBService class.
try {
inputStream = new BufferedReader(new FileReader(configFile));
} catch (FileNotFoundException e) {
logErrorGenerateException(this, methodName, Wait_JavaComputeMessages.MESSAGE_SOURCE,
Wait_JavaComputeMessages.CONFIG_FILE_NOT_FOUND,
configFile, new String[] {configFile});
}
The last argument should be an insert. The Message looks like :
CONFIG_FILE_NOT_FOUND, "The configuration file %1 was not founddd" },
As you can see, the %1 should be exchanged with configfile (name of configuration file). When i then get this exception i see this message in the event og, but with %1 in it and not with the name of the configfile.
For this i used the sample code and cannot see any differnces. I work with Message Broker Toolkit V. 6.02.
Any ideas ?? |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Fri Apr 27, 2007 12:41 am Post subject: Re: Problem with MBService in Java Compute Node |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
What is a value of configFile ?
Put
Code: |
System.out.println("configFile ="+configFile ); |
before try block. _________________ Marcin |
|
Back to top |
|
 |
hasselb |
Posted: Fri Apr 27, 2007 12:51 am Post subject: |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 6
|
The value of configfile is simply "PerfTestConfig.txt" as name of a file |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Fri Apr 27, 2007 12:53 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Where this file is placed ? _________________ Marcin |
|
Back to top |
|
 |
hasselb |
Posted: Fri Apr 27, 2007 12:59 am Post subject: |
|
|
Newbie
Joined: 26 Apr 2007 Posts: 6
|
The problem is not the file itself, the problem is that the MBService class dos'nt exchange the value %1 with the string in configFile. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 27, 2007 4:21 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
MBService expects a Java resource bundle. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|