![]() |
Sun ONE Connector Builder 2.0 Developer's Guide |
Trouble ShootingThis module includes a description of common error messages and workarounds. The topics include:
- Development Time
- Sun ONE Application Server 7.0
- Web Server
- J2EE 1.3 Reference Implementation (J2EE RI)
- Logging
- Samples
- SOAP
Development Time
Warning Message: 'Could not install some modules: Sun ONE Connector Builder' while starting IDE.
Check if all the modules used by Sun ONE Connector Builder have been enabled and installed properly. The warning message displays the names of the modules that are required by Sun ONE Connector Builder. The modules used by Sun ONE Connector Builder can have dependencies on other modules. After enabling all the dependencies, restart the IDE and then enable Sun ONE Connector Builder module. For more details on enabling and disabling modules refer To Sun ONE Studio guide.
Error Message: java.lang.OutOfMemoryError while using Sun ONE Connector Builder module in Sun ONE Studio.
Check the run time memory settings of Sun ONE Studio. Increase the maximum (Xmx---m) and minimum (Xms---m) values for memory allocation. These settings need to be provided in ide.cfg file that is located in <Sun_ONE_Studio_Installation>\bin directory. For more details refer to the Sun ONE Studio guide.
Sun ONE Application Server 7.0
Problem: Unable to access deployed adapter using SOAP on Application Server 7.0.
Check if all the SOAP services of the adapter have been deployed properly. For more details refer to "Adding SOAP Services to the Resource Adapter" in this guide.
The deployed adapter must be added to the Application Server's classpath in order to use SOAP services. This is necessary because a resource adapter is deployed as an enterprise application and is added to the application container's classpath where as Apache SOAP is deployed as a web application and runs in the web container. The application containers classes are not accessible from the web container. Adding adapter classes in the application server's classpath enables the web container to access them.
To Add the Adapter in the Application Server's Classpath
- Start the web based admin console of the application server. You can access the Console by typing http://<hostname>:4848 (this is the default port provided during the application server installation). Login using the user id and password set during installation.
- Select 'App Server Instances, <server instance>, JVM Settings, Path Settings.
- Add the deployed adapter in the Classpath Suffix. For example for COTS adapter add <ApplicationServer_Root>\appserv\domains\domain1\server1\ applications\j2ee-modules\COTS_1.
Web Server
Resource Adapter developed using Sun ONE Connector Builder throws 'javax/resource/ResourceException' exception while running in iPlanet Web Server 6.0
The iPlanet Web Server comes with 1.2.2 java runtime. The web application needs to get the adapter context to perform the necessary task. The required classes that do the above operation are bundled along with java virtual machine 1.3 and above. Therefore if java.lang.NoClassDefFoundError (javax/resource/ResourceException) exception is encountered while running adapters in iPlanet Web Server6.0 you must update the Java Virtual Machine of the Web server to v1.3.x or later. For more information on changing the virtual machine settings in iPlanet Web Server 6.0 refer Appendix C in the Sun ONE Connector Builder Developer's Guide.
Error Message: Using Deploy and Un-deploy options in Apache SOAP web based Administration console on iPlanet Web Server 6.0.
If an http 404 error is displayed on the administration console when deploy or un-deploy options are selected, update the java virtual machine of the Web Server to JDK 1.3.x or later. For more information on changing the virtual machine settings in iPlanet Web Server 6.0 refer Appendix C in the Sun ONE Connector Builder Developer's Guide.
Exception Message: Cannot create web application context path = /soap' exception in iPlanet Web Server while using Apache SOAP.
The above exception occurs when the soap.war file being used has been modified. Usually this happens when soap.war has been deployed in iPlanet Application Server 6.5 using its deployment tool. The application server's deployment tool modifies the war file for its deployment to go through and saves the modifications in it. This can be solved by undeploying soap from the web server and then deploying a freshly downloaded soap.war file.
J2EE 1.3 Reference Implementation (J2EE RI)
Exception Message: violates loader constraints' in J2EE RI server logs while running Connector Builder test client or resource adapters.
This exception is encountered when resource adapters or EJB's don't have class loader permission. J2EE RI's server.policy (<J2EE_RI_ROOT>/lib/security) has to include the permissions for allowing the resource adapters and the EJB's to load class files using class loader. The modifications for providing full permissions are:
- Under additional permissions for EJBs section add the line
permission java.security.AllPermission;
The modified section is shown in the following:
// additional permissions for EJBs
grant codeBase "file:${com.sun.enterprise.home}/ejb_impls/-" {
permission java.lang.RuntimePermission "queuePrintJob";
permission java.io.FilePermission
"${com.sun.enterprise.home}${/}repository${/}-", "read";
permission java.security.AllPermission;
};
- Under additional permissions for standalone resource adapters
permission java.security.AllPermission;
The modified section is shown in the following:
// additional permissions for standalone resource adapters
grant codeBase "file:${com.sun.enterprise.home}/connector/adapters/-" {
permission javax.security.auth.PrivateCredentialPermission "* *
\"*\"", "read";
permission java.io.FilePermission
"${com.sun.enterprise.home}${/}logs${/}-", "read,write";
permission java.security.AllPermission;
};
Logging
Adapter log file not being created while using FileHandler option in <Adapter_Name>log.properties file (on Windows platform)
Check the value specified to icon.logging.FileHandler.basedir parameter. On windows double slashes (//) should be used as the path separators. For example
icon.logging.FileHandler.basedir=C://adapter//logs//COTS_1
Samples
Error Message: Getting the exception 'javax.resource.spi.EISSystemException: Error in getting the physical connection' while running DBMS adapter.
DBMS adapter connects to a database for performing the necessary operations. If this exception is thrown while running the DBMS adapter, place the JDBC driver (of the database that is being used) in the classpath of the server in which DBMS is deployed.
SOAP
Error Message: `Error saving services registry: DeployedServices.ds' while deploying SOAP Services of a generated adapter. (On Unix or Linux platform)
Make sure the server has write permissions for the directory under which the DeployedServices.ds file resides.