The following sections provide suggestions on troubleshooting common problems encountered when developing Java CAPS Projects. If you have any questions or problems, see the Java CAPS web site at http://goldstar.stc.com/support.
This topic covers the following subtopics:
The following error messages are occasionally encountered when designing Projects in Java CAPS.
OutOfMemory
Out-of-memory errors occurring during Project design are most frequently overcome by increasing the heap size of the editor you are using, or of the NetBeans IDE itself. Try increasing the heap size in increments of 50 MB, starting with the appropriate editor.
If you experience out-of-memory errors when using an XSD OTD having a file size in excess of 1 MB, try increasing the heap size of both the NetBeans IDE and the OTD Tester. If the errors still occur, you may need to increase the permanent generation memory size, as specified in the following file:
<Sun_JavaCAPS_install_dir>\netbeans\etc\netbeans.conf |
Refer to the NetBeans documentation at http://www.netbeans.org/.
Operations … cannot be exposed to external web services
If you are building a Web Service Definition that will be exposed externally as a web service through a SOAP/HTTP interaction, you must base all Operations containing input/output messages on XSD Objects created in the XML Schema Editor. Operations based on OTDs will not support SOAP/HTTP. See Building a Web Service Definition in the eGate Integrator User's Guide for 5.1.3 for additional information.
The XSD OTD … is missing target namespace
All XSD OTDs that are used in SOAP-callable Java-based Collaboration Definitions (JCDs) must be derived from XML Schema Definitions that have explicitly declared target namespaces. If you receive this validation error, you should relaunch the OTD using an XML Schema Definition that has a declared target namespace. See To redefine an existing XSD OTD in the eGate Integrator User's Guide for 5.1.3 for additional information.
The WSDL … is out of date …
The WSDL in a SOAP-callable Java-based Collaboration Definition (JCD) is generated when the JCD is created and persisted. If the XSD OTDs used in the JCD are changed following the creation of the JCD, the WSDL will be out of date and the application file will not be built. When this situation occurs, you must refresh the WSDL by opening the property dialog for the JCD and clicking the OK button (without changing anything in the dialog). See Editing Collaboration Definition Properties in the eGate Integrator User's Guide for 5.1.3 for additional information.
The following exceptions have to do with Java methods and how they are used in Java CAPS.
System.getProperties() Causes Exception
Projects developed prior to release 5.1.1 were allowed to use the System.getProperties() method. In release 5.1.1, this method was replaced with System.getProperty(String propertyName). If you are want to run a Project developed in eGate Integrator 5.0.X that incorporates the System.getProperties() method, you have two options:
Change all instances of System.getProperties() to System.getProperty(String propertyName).
Change the security policy of the application server to allow the use of System.getProperties().
The following topics have to do with erroneous behavior in Java CAPS.
Node Names Change when Relaunching XSD OTDs
If the names of existing XSD OTD nodes change when relaunching the OTD, you need to change the algorithm used for the Relaunch feature. This is particularly true if your XSD contains choice, sequence, any, or all node types. To enable the alternate algorithm, you must modify the following file:
<Sun_JavaCAPS_install_dir>\netbeans\etc\netbeans.conf |
Simply locate the parameter
-J-DXsdOtdRelaunch.enabled |
and set it to -true (it is near the end of the file, and is -false by default). Using this functionality, you can delete, insert, or move an OTD node anywhere in the OTD structure, as long as you do not break the parent-child relationship of existing OTD nodes.
The Build Process Fails on JDK 5
A web application project that includes web service libraries built with JDK 6 fails to build when NetBeans is started with the latest JDK 1.5.0 release. The following (incorrect) error message is given:
/root/ProjectHome/nbproject/jaxws-build.xml:24: Requires JDK 5.0 or later. Please download it from http://java.sun.com/j2se/1.5/ BUILD FAILED |
To recompile a web services project that includes libraries build with JDK 6, remove the libraries that were compiled with JDK 6 and replace them with libraries compiled with JDK 5. You should then be able to recompile the libraries using JDK 5.
If you do not have the necessary libraries compiled with JDK 5, you can start NetBeans with JDK 6 and then recompile the project using JDK 5.