Appendix C. FAQ

C.1. Frequently asked questions
C.1.1. Where is the perform document from OGSA-DAI 2.2?
C.1.2. Where are the server-side logs?
C.1.3. How can I avoid specifing lots of properties for ANT targets at the command-line?
C.1.4. How do I use Tomcat 5.5 with OGSA-DAI Axis?
C.1.5. How can I generate my own client-side stubs for OGSA-DAI services?
C.1.6. How do I get a resource properties document?
C.1.7. How do I execute an SQL query across multiple resources?
C.1.8. How do I change the Tomcat heap size
C.1.9. When using the client toolkit I get an error about an unconnected pipe
C.1.10. I get a server-side error concerning an unknown resource that I don't recognise
C.1.11. When using a client I get an error concerning an unknown resource
C.1.12. When using a client I get an error concerning an unknown activity
C.1.13. I get an error concerning a server error and the server logs cite an activity class not being found
C.1.14. When using a client I get an error concerning a server error
C.1.15. When using a client I get an error concerning an unknown resource but I know the resource is available and correctly configured
C.1.16. Why do I get "Exception in thread "main" java.lang.IllegalAccessError: tried to access field..."?
C.1.17. I get an AxisFault when deplying OGSA-DAI Axis
C.1.18. I get [axis-admin] log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle). warnings when deploying OGSA-DAI Axis services
C.1.19. I get Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled." warnings
C.1.20. Does OGSA-DAI provide registry services?
C.1.21. What do I need in my CLASSPATH to be able to run OGSA-DAI clients or compile OGSA-DAI client examples?
C.1.22. What happens if the client times out during a synchronous request?

C.1. Frequently asked questions

C.1.1. Where is the perform document from OGSA-DAI 2.2?

Please see Section N.2.1, “Perform documents and requests”.

C.1.2. Where are the server-side logs?

Please see Section 16.1.7, “Logging”.

C.1.3. How can I avoid specifing lots of properties for ANT targets at the command-line?

ANT property files can be used to save having to provide arguments to OGSA-DAI ANT targets at the command line. If the command is of form:

$ ant myCommand -Darg1=value1 -Darg2=value2

Then you can create a property file (my.properties for example) with the contents:

arv1=value1
arg2=value2

And then run:

$ ant -propertyfile my.properties myCommand

Note that properties can still be provided to ANT via the command-line and these take precedence over the ones in the property file, so for example you could run:

$ ant -propertyfile my.properties -Dargv1=myValue
$ ant -propertyfile my.properties -Dargv1=myOtherValue

C.1.4. How do I use Tomcat 5.5 with OGSA-DAI Axis?

Tomcat 5.5 uses a different form of JNDI file (a type of configuration file that OGSA-DAI Axis uses) from the Tomcat 5.0-compliant file bundled in OGSA-DAI Axis.

The OGSA-DAI Axis JNDI configuration file is on deploy/war-context.xml. To make this compatible with Tomcat 5.5 you need to change replace the Resource and ResourceParams elements of this file with the Tomcat 5.5 type of Resource elements.

Entries of form:

<Resource name="NAME"
          type="TYPE"/>
<ResourceParams name="NAME">
  <parameter>
    <name>factory</name>
    <value>FACTORY</value>
  </parameter>
</ResourceParams>

Are replaced by entries of form:

<Resource name="NAME"
          type="TYPE"
          factory="FACTORY"/>

For example:

<Resource name="ogsadai/uk.org.ogsadai.PERSISTENCE_MANAGER"
          type="uk.org.ogsadai.persistence.file.ContextFilePersistenceManager"/>
<ResourceParams name="ogsadai/uk.org.ogsadai.PERSISTENCE_MANAGER">
  <parameter>
    <name>factory</name>
    <value>org.apache.naming.factory.BeanFactory</value>
  </parameter>
</ResourceParams>

Would be replaced by:

<Resource name="ogsadai/uk.org.ogsadai.PERSISTENCE_MANAGER"
          type="uk.org.ogsadai.persistence.file.ContextFilePersistenceManager"
          factory="org.apache.naming.factory.BeanFactory"/>

C.1.5. How can I generate my own client-side stubs for OGSA-DAI services?

You can use Apache Axis WSDL2Java. This can be run as follows:

$ setenv.sh
$ java org.apache.axis.wsdl.WSDL2Java -W URL

Where URL is the URL of the OGSA-DAI service. Please note that the -W flag is vital. This ensures that any stubs conform to the document/literal rather than wrapped/literal encoding. Both Globus and ourselves recommend document/literal. Inter-operability problems can arise between clients using wrapped/literal and OGSA-DAI services otherwise.

For more information on WSDL2Java see http://ws.apache.org/axis/java/reference.html

C.1.6. How do I get a resource properties document?

Resource properties documents aren't currently supported for OGSA-DAI Axis.

C.1.7.  How do I execute an SQL query across multiple resources?

Refer to Section 7.3, “ Targetting an SQL query at multiple data resources using a resource group ” which explains how to run a query across multiple databases using resource groups.

C.1.8. How do I change the Tomcat heap size

If manipulating large sets of data the Java Virtual Machine may run out of memory. This can be alleviated by increasing the maximum memory heap size for the virtual machine using the XMxSIZE flag. For example:

$ java -Xmx70M ...

specifies a heap size of 70M. A similar XMsSIZE flag sets the initial heap size.

C.1.9. When using the client toolkit I get an error about an unconnected pipe

If you get an unconnected pipe error when trying to submit a workflow created using the client toolkit this is likely because you have created your activity objects and connected their outputs but have not added one or more of the activities to the workflow object.

C.1.10. I get a server-side error concerning an unknown resource that I don't recognise

OGSA-DAI's default file-based resource persistence components assume that all files in the resource files configuration directory (see Section 17.2.4.1, “Resource files name and location”) are resource configuration files. If you have temporary files created by a text editor in this directory (e.g. someFile~ or #someFile#) then these too will be considered as resource configuration files even if they are not intended to be.

When this occurs you will typically see an error similar to the following in the server-side logs:

There is a problem with the content of persistence file 
/home/michaelj/tomcat/webapps/dai/WEB-INF/etc/dai/resources/FileResource~.

Note that such errors do not prevent OGSA-DAI from initialising but if concerned you should just remove the unwanted files from the directory.

C.1.11. When using a client I get an error concerning an unknown resource

If a resource has been configured incorrectly then clients may be informed by the OGSA-DAI server that the resource is unknown. The OGSA-DAI server logs will provide information about why the configuration is incorrect. For example if the creationTime has value zonk then the logs will display an error message similar to:

#1185803462588:5# There is a problem with the content of persistence file /home/michaelj/test/tomcatAxis14/webapps/dai/WEB-INF/etc/dai/resources/Zonk.
#1185803462588:5# zonk is an illegal value.
#1185803462588:5# java.lang.NumberFormatException: For input string: "aaa"

If the data resource class cannot be found then the logs will display an error message similar to:

#1185803652710:2# There was a problem creating resource Zonk of type uk.org.ogsadai.DATA_RESOURCE.
#1185803652710:2# uk.org.ogsadai.resource.dataresource.file.FileDataResourc is an illegal value.
#1185803652710:2# Cannot find Java class uk.org.ogsadai.resource.dataresource.file.FileDataResourceNonExistantClass

Alternatively errors in resource configuration may only be realised when a request is submitted that contains activities that use the resource. e.g. if a file data resource configuration omits the dai.data.resource.path required by file resources then the server-side logs will contain an error of form:

2007-07-30 15:11:04,918 WARN  event.LoggingActivityListener [pool-1-thread-2,warnExceptionAndChildren:?] #1185804664917:5# An unchecked exception was caught during activity processing.
2007-07-30 15:11:04,918 WARN  event.LoggingActivityListener [pool-1-thread-2,warnExceptionAndChildren:?] #1185804664917:5# Expected dai.data.resource.path but could not be found.

This will be manifested client-side in the request status e.g.:

A problem has occured...
[1185804665299:2] uk.org.ogsadai.client.toolkit.REQUEST_COMPLETED_WITH_ERROR : ogsadai-114177657b5

The actual request execution status will contain more information in the entry for the activity that tried to use the resource.

C.1.12. When using a client I get an error concerning an unknown activity

Problems with activity configurations are manifested at the client-side as follows. For example:

[1185805382056:3] uk.org.ogsadai.client.toolkit.REQUEST_ERROR : ogsadai-11417822efa
[1185805382057:4] uk.org.ogsadai.GENERAL_REQUEST_USER_EXCEPTION
[1185805382057:5] uk.org.ogsadai.GENERAL_ACTIVITY_USER_EXCEPTION
[1185805382057:6] uk.org.ogsadai.UNSUPPORTED_ACTIVITY : uk.org.ogsadai.ListDirectoryX, FileResource

On the server this is manifested in the logs as follows. For example:

#1185805381799:4# A user problem has occurred during request processing.
#1185805381799:4# A user problem has occured during activity processing.
#1185805381799:4# An activity named uk.org.ogsadai.ListDirectoryX is not supported by the resource FileResource

There are two possible causes for this.

C.1.13. I get an error concerning a server error and the server logs cite an activity class not being found

This error may be manifested in the server logs as follows:

#1185805812851:2# A problem has occurred during request processing.
#1185805812851:2# There was a problem creating the activity instance (activity name uk.org.ogsadai.ListDirectory, instance name uk.org.ogsadai.ListDirectory-ogsadai-1141788bcad).
#1185805812851:2# java.lang.ClassNotFoundException: uk.org.ogsadai.activity.file.ListDirectoryActivityXXX

This means that the activity configuration specifies an activity class name that does not exist or cannot be found by the OGSA-DAI server.

C.1.14. When using a client I get an error concerning a server error

This may be manifested client-side as follows:

[1185805813092:1] uk.org.ogsadai.client.toolkit.REQUEST_ERROR : ogsadai-1141788c349
[1185805813092:2] uk.org.ogsadai.SERVER_ERROR_WITH_HOST : 1185805812851:2, coal.epcc.ed.ac.uk

This means there is a problem on the OGSA-DAI server and you (or the OGSA-DAI server administrator) should check the OGSA-DAI server logs for the error with the given ID.

C.1.15. When using a client I get an error concerning an unknown resource but I know the resource is available and correctly configured

This might be evidenced as follows when when invoking operations on OGSA-DAI Axis services:

 
{http://ogsadai.org.uk/namespaces/2007/04/service/execution}resourceUnknownFault:
<ns2:id xmlns:ns2="http://ogsadai.org.uk/namespaces/2007/04/service/faults">
  uk.org.ogsadai.RESOURCE_UNKNOWN_ERROR
</ns2:id>
<ns3:msg xmlns:ns3="http://ogsadai.org.uk/namespaces/2007/04/service/faults">
  [1179491427865:0] uk.org.ogsadai.RESOURCE_UNKNOWN_ERROR : null
</ns3:msg>
<ns4:parameter xmlns:ns4="http://ogsadai.org.uk/namespaces/2007/04/service/faults">
null
</ns4:parameter>

The most common cause of this is not having the file client-config.wsdd in a directory that is in your client's CLASSPATH

C.1.16.  Why do I get "Exception in thread "main" java.lang.IllegalAccessError: tried to access field..."?

If you get an error from your client or in your logs:

Exception in thread "main" java.lang.IllegalAccessError: tried to access
field org.apache.xpath.compiler.FunctionTable.m_functions from class
org.apache.xml.security.Init at ...

then this is probably due to an incompatibility between the version of the xalan.jar shipped with the Globus Toolkit and the particular version of Java you are using.

To find out the version of Java you are using, run:

$ java -version

ensuiring that you run the same Java version as referenced by your JAVA_HOME environment variable.

Some builds of Java version 1.4.2_05 are known to cause this error. Versions of the Java 1.4 up to and including 1.4.2_04 are known to be okay. It is believed that a change of a variable from public to private in Java versions since 1.4.2_05 has caused this problem.

To fix this problem, you can use a newer version of xalan.jar. See the information on the "Endorsed Standards Override Mechanism" explained in the Xalan FAQ: http://xml.apache.org/xalan-j/faq.html#faq-N100CC.

Essentially, you need to download the latest version of Xalan and copy the xalan.jar, xercesImpl.jar and xml-apis.jar files to a directory called JRE_HOME/lib/endorsed where JRE_HOME is the base directory of your JRE installation.

Alternatively, switching to an earlier Java version (1.4.2_05 and previous) should solve this problem.

For more information on this bug take a look at:

If using a Macintosh that has a built-in Java 1.4.2_09 release then you should use Xalan 2.6.0.

C.1.17. I get an AxisFault when deplying OGSA-DAI Axis

If you get the following when running buildDeployWARAndServices:

[echo]   Checking URL https://garnet.epcc.ed.ac.uk:18433/index.jsp
[echo] Tomcat is running!
[echo] Deploying services...
[axis-admin] Processing file /home/michaelj/ogsa-dai-cvs/releases/axis/build/ogsadai-3.0-axis-1.4-src/build/ogsadai-3.0-axis-1.4-bin/build/deploy/ws-addressing.wsdd
[axis-admin] AxisFault
[axis-admin]  faultCode: {http://xml.apache.org/axis/}HTTP
[axis-admin]  faultSubcode: 
[axis-admin]  faultString: (404)/dai/services/AdminService
[axis-admin]  faultActor: 
[axis-admin]  faultNode: 
[axis-admin]  faultDetail: 
[axis-admin]    {}:return code:  404
..

This arises as the installer drops an OGSA-DAI WAR file into Tomcat, waits for Tomcat to unpack the WAR file then attempts to deploy OGSA-DAI services. If running on a slow host Tomcat might not have enough time to unpack the WAR. You can just run deployServices using the same arguments as buildDeployWARAndServices to deploy the services.

C.1.18.  I get [axis-admin] log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle). warnings when deploying OGSA-DAI Axis services

This is a warning message that can safely be ignored.

C.1.19. I get Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled." warnings

This is a warning message that can safely be ignored. It is displayed when Apache Axis cannot find this optional JAR. Please refer to the Apache Axis documentation for more details.

C.1.20. Does OGSA-DAI provide registry services?

OGSA-DAI does not provide any specific registry services.

C.1.21.  What do I need in my CLASSPATH to be able to run OGSA-DAI clients or compile OGSA-DAI client examples?

You need to have the following in your CLASSPATH:

  • All JARs in lib. If compiling or running only clients then the only JARs you need are:
    • ogsadai-3.0-common.jar
    • ogsadai-3.0-clientserver.jar
    • ogsadai-3.0-*-client.jar
    • ogsadai-3.0-*-stubs.jar
  • All JARs in thirdparty/lib
  • For OGSA-DAI Axis all JARs in thirdparty/axis/WEB-INF/lib
  • The file deploy/client-config.wsdd. This can be achieved by ensuring that deploy is in the CLASSPATH.

C.1.22.  What happens if the client times out during a synchronous request?

If a synchronous request takes a long time then the client connection to the OGSA-DAI server (via the data request execution service) may time out. In such circumstances, the OGSA-DAI server will continue to execute the workflow submitted by the client. There is however no way for the client to access their data since there is no means of getting the ID of the request (as known to the server) back to the client. This is a further argument in favour of the use of asynchronous requests for workflows that may have long execution times.