Eric,
When registering the Namespace service dynamically via a STAF SERVICE ADD
request, if an error occurs you should get a non-zero return code and the
result string contains any additional information provided. So, check
these when you get an error. For example, if you are registering the
Namespace service via a request submitted via a Java program, you could
print out result.rc and result.result if an error occurred as follows:
STAFHandle handle = new STAFHandle("MyApplication");
String machine = "local";
String service = "SERVICE";
String namespaceServiceName = "Namespace";
String request = "ADD SERVICE " + namespaceServiceName +
" LIBRARY JSTAF EXECUTE
{STAF/Config/STAFRoot}/services/namespace/Namespace.jar";
STAFResult result = handle.submit2(machine, service, request);
if (result.rc != STAFResult.Ok)
{
System.out.println(
"ERROR: STAF " + machine + " " + service + " " + request +
" failed. RC: " + result.rc + ", Result: " + result.result);
}
Note that you shouldn't have any errors in the Namespaces.xml file though
if you're using the NAMESPACE service's SET VAR request to set variables
in a namespace.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
"Eric Kadison" <ekadi...@istor.com>
08/17/2009 05:07 PM
To
<staf-users@lists.sourceforge.net>
cc
Subject
[staf-users] Namespace error display
When a Namespace service is created as part of STAF startup (i.e. the
Namespace service is created within the STAF.cfg file), and there is an
error in the Namespaces.xml file, then error information is printed in the
"terminal" window showing the line where the error was detected, which is
quite helpful. The application we've written makes heavy use of the
Namespace service and we commonly use 5 Namespace services in a test run.
I recently changed our code to create the Namespace services dynamically
rather than in the STAF.cfg file, and this is working fine. Is there a
way to get the error information, if any, when creating the service in
this way? We are using Windows (XP and Server 2Kx) and STAF 3.3.3 without
STAX.
Thanks,
Eric
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users