Saturday, November 20, 2010

"cannot open shared object file" when installing Oracle Database 10g on Oracle Enterprise Linux 5.5

Problem:

When installing Oracle Database 10g (10.2.0) on Oracle Enterprise Linux 5.5 or Red Hat Enterprise Linux 5.5, you may receive the following error:
oracle@oradev:/u01/app/install_software/database> ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-5, SuSE-9, redhat-4, UnitedLinux-1.0, asi
Passed

All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-11-14_11-35-24PM. P
all_software/database> Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraI
b/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
The database install file used was 10201_database_linux32.zip.

Additional Notes:

Note that out-of-the-box, Oracle Database 10g does not recognize OEL 5.5 as a valid operating system. There are 3 different options to work around this:

1. Update the installation file database/install/oraparam.ini and replace all occurences of "redhat-3" to "redhat-5".

2. Update the /etc/redhat-release file to trick the installer.

3. Follow Metalink Note ID 564174.1.

Solution:

As for the error above, simply mount Disk 3 of the OEL 5.5 media, and apply the following RPM:
rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
Rerun the installer and you should be fine.

Applicable Versions:
  • Oracle Enterprise Linux 5.5 32-bit
  • Oracle Database 10g (10.2.0.1) 32-bit

References:

http://www.puschitz.com/InstallingOracle10g.shtml
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=564174.1

XML-22045 when running composite in SOA Suite 11g

Problem:

We deployed a custom developed XPath function to SOA Suite 11g. However, when executing the composite that uses the XPath function, we received the following error:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <env:Fault>
         <faultcode>env:Server</faultcode>
         <faultstring>XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is ora:processXSLT('xsl/transform2.xsl',bpws:getVariableData('inputVariable','payload')).
The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: &lt;Line 4, Column 80>: XML-22045: (Error) Extension function error: Class not found '

      Missing class: customFunctions.utilDateTime.getFullDateTime

    Dependent class: oracle.xml.xpath.XSLExtFunctions
             Loader: sun.misc.Launcher$AppClassLoader@1523237480
        Code-Source: /u01/app/oracle/middleware/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar
      Configuration: /u01/app/oracle/middleware/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar

This load was initiated at default.composite.AhmedDomainID.soa_14c55a6c-c0b4-408b-80d3-8279a546dae1:1.0 using the loadClass() method.
'.
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.</faultstring>
         <faultactor/>
         <detail>
            <exception/>
         </detail>
      </env:Fault>
   </env:Body>
</env:Envelope>
Solution:

The following file is updated when configuring your custom XPath:
$ORACLE_HOME/soa/modules/oracle.soa.ext_11.1.1/classes/META-INF/ext-soa-xpath-functions-config.xml
This XPath function was migrated from 10g to 11g, but we recreated the Java classes. Thus, our namespace prefix was no longer the same.

Our original namespace prefix:
xmlns:utl="http://www.oracle.com/XSL/Transform/java/customFunctions.utilDateTime.getFullDateTime"
The updated, and working, prefix (conforming better to Oracle's standard):
xmlns:utl="http://www.oracle.com/XSL/Transform/java/com.collaxa.cube.xml.xpath.dom.functions.getDateTimeWithMilliseconds"
After this modification, we bounced, re-ran, and all worked fine.

Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)

Deploying custom XPath to SOA Suite 11g

This post describes how to deploy a custom XPath function you may have written in Java to Oracle SOA Suite 11g.

1. Edit the following file:
$MW_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/classes/META-INF/ext-soa-xpath-functions-config.xml
2. Add both the following. Here, you are adding the namespace prefix and function declaration.
<soa-xpath-functions xmlns="http://xmlns.oracle.com/soa/config/xpath"
                     xmlns:aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.xpath.AIAFunctions"
                     xmlns:utl="http://www.oracle.com/XSL/Transform/java/com.collaxa.cube.xml.xpath.dom.functions.getDateTimeWithMilliseconds">

  <function name="utl:getDateTimeWithMilliseconds">
    <className>com.collaxa.cube.xml.xpath.dom.functions.getDateTimeWithMilliseconds</className>
    <return type="string"/>
    <params>
      <param name="formatString" type="string"/>
    </params>
  </function>
3. Copy your following JAR (e.g., customDateFunction.jar) to:
$MW_HOME/user_projects/domains/soa_domain/lib
4. In your code (e.g., transformation or assigns), the function may be called as followed:
utl:getDateTimeWithMilliseconds('')
You will have to use the same namespace prefix defined above:
xmlns:utl="http://www.oracle.com/XSL/Transform/java/com.collaxa.cube.xml.xpath.dom.functions.getDateTimeWithMilliseconds"
The way we have defined and configured it above makes the function available to all SOA components, such as BPEL and Mediator. Refer to the Oracle documentation to find out how you can make the function specific to a particular component.

Thursday, November 18, 2010

Connecting to the Oracle Database Listener is extremely slow

This note really applies to any version of the Oracle Database on Linux.

Problem:

Any connection through the database listener is extremely slow. It works fine, but it is not unusual for connection to take over a minute.

I try to start the listener as follows:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> lsnrctl start
It starts up after several minutes, instead of a few seconds.

Once it's up, I try to ping the listener as follows:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> tnsping orcl
The response is over 60 seconds.

When I try to sqlplus into the database through the listener, it takes over 60 to 70 seconds:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> sqlplus system/manager@orcl
Trying to sqlplus to the database directly (i.e., bypassing the listener) is fine:
oracle@soa11gdev:/u01/app/oracle/product/11.2.0/db_1> sqlplus system/manager
The thing is, the listener works and is not misconfigured. But connecting is exceptionally slow.

Investigation:

Check your $ORACLE_HOME/network/admin/sqlnet.ora configuration file and ensure that the TNSNAMES is specified first as follows:
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
In my case, the database was installed on Oracle Enterprise Linux 5.5.

My hostname was set to the fully qualified name of "oradev.ipnweb.com" and my /etc/hosts had the following entry:
192.168.1.55    oradev.ipnweb.com    oradev
Solution:

The problem is that /etc/resolv.conf had an incorrectly configured search domain.

Original /etc/resolv.conf:
nameserver 192.168.1.2
search localdomain
Corrected /etc/resolv.conf:
nameserver 192.168.1.2
Once this was corrected, problem was solved.

Applicable Versions:
  • Oracle Database 11g (11.2.0) 32-bit and 64-bit
  • Oracle Enterprise Linux 5.5 32-bit and 64-bit

MDS-00515 and XML-20201 when deploying artifacts to the MDS

Oracle SOA Suite 11g provides an ANT target to import artifacts such as WSDLs, schemas, fault policies, and configuration files to the MDS.

Problem:

When using ANT to deploy artifacts to the MDS, you may get the following error:
deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/tmp/AhmedMetaData/AhmedMetaData_mds.zip
[deployComposite] created temp dir =/tmp/deploy_client_1290133613336
[deployComposite] Adding shared data file - /tmp/deploy_client_1290133613336/AhmedMetaData_mds.jar
[deployComposite] Creating HTTP connection to host:soa11gdev, port:8001
[deployComposite] Enter username and password for realm 'default' on host soa11gdev:8001
[deployComposite] Authentication Scheme: Basic
[deployComposite] Username:
weblogic
[deployComposite] Password:

[deployComposite] Received HTTP response from the server, response code=500
[deployComposite] ---->response code=500, error:Error during deployment: Data transfer error in MDS.:
[deployComposite] MDS-00001: exception in Metadata Services layer
[deployComposite] MDS-00515: failure to create document /apps/AhmedMetaData/Order/Order.wsdl in the metadata repository
[deployComposite] <Line 25, Column 7>: XML-20201: (Fatal Error) Expected name instead of <.
[deployComposite] .

BUILD SUCCESSFUL
Total time: 25 seconds
Solution:

To avoid MDS errors when importing artifacts, check the following:
  • Make sure that the you have enough disk space in your temporary directory. Every time you run ANT, a new JAR file is created (but never cleaned up).
  • You cannot import any type of file to the MDS. For example, .doc and .html files are not allowed.
  • All files must be valid (i.e., no malformed XML).
If you have a single error, it will impact the entire import.

As for the error above, the MDS-00515 error, which is caused by the XML-20201 error, is very misleading.

What I was trying to do was import numerous WSDLs and XSDs into the MDS. However, within those subfolders, I had some .html files. Recall that .html files are not allowed in the MDS. As a result, I made sure to delete all .html files, reran ANT and everything worked fine.

Now you see why the error is misleading?

A correct execution would look like the following:
deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/tmp/AhmedMetaData/AhmedMetaData_mds.zip
[deployComposite] created temp dir =/tmp/deploy_client_1290133969195
[deployComposite] Adding shared data file - /tmp/deploy_client_1290133969195/AhmedMetaData_mds.jar
[deployComposite] Creating HTTP connection to host:soa11gdev, port:8001
[deployComposite] Enter username and password for realm 'default' on host soa11gdev:8001
[deployComposite] Authentication Scheme: Basic
[deployComposite] Username:
weblogic
[deployComposite] Password:

[deployComposite] Received HTTP response from the server, response code=200
[deployComposite] clean up temp dir: /tmp/deploy_client_1290133969195
[deployComposite] ---->Deploying composite success.

BUILD SUCCESSFUL
Total time: 17 seconds
Applicable Versions:
  • Oracle SOA Suite 11g (11.1.1.x)

Sunday, November 14, 2010

Fix slow SSH login

Problem:

SSH'ing into my Oracle Enterprise Linux server is extremely slow, often taking over a minute.

Solution:

1. Edit /etc/sshd/sshd_config and make sure that the following parameter is set as follows:
UseDNS no
2. Restart SSH as follows:
/etc/rc.d/init.d/sshd restart
Applicable Versions:
  • Oracle Enterprise Linux 4/5
References:

http://www.netadmintools.com/art605.html

Disable 'root' login to SSH

As a good security practice, you want to disable the ability to SSH directly to your server as 'root'.

To do this:

1. Edit /etc/ssh/sshd_config

2. Make sure the following parameter is set as follows:
PermitRootLogin no
3. Restart SSH as follows:
/etc/rc.d/init.d/sshd restart

Friday, November 12, 2010

Sensors not showing up in Oracle Fusion Middleware 11g Control Console

You may wonder why, when you log in to the Oracle Fusion Middleware 11g Control Console and view your composite instance, even though your BPEL process has sensors, it never shows up under the sensor tab.

1. BPEL sensors pushed to a custom JMS queue will not show up on the console.

2. Composite sensors show up on the console (composite sensors are saved to the database by default, and you have no ability to modify that).

3. Database sensor actions show up on the console.

Referring to section 17.3 in the Oracle Fusion Middleware Developer's Guide, it states:
Only sensors with an associated database sensor action are displayed in Oracle Enterprise Manager Fusion Middleware Control Console. Sensors associated with a JMS queue, JMS topic, remote JMS, or custom sensor action are not displayed
That is the reason some of your sensors don't show up in the console.

References:

http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bp_sensors.htm#CIHJGHAC

Thursday, November 11, 2010

"The connection was reset" when remotely accessing VMware Server 2.0 Console

Problem:

I'm running the following:
  • VMware Server 2.0.2 and VMware Infrastructure Web Access 2.0.0 (on Oracle Enterprise Linux 5.5 x86_64)
  • Firefox 3.6.12 (on Windows XP SP3)
When I connect to the VMware console on http://myhost:8222 from the server, it works fine. But when I connect remotely, I receive the following error:
The connection was reset
The connection to the server was reset while the page was loading.
This despite the fact that I opened up the firewall on ports 8222, 8333, and 902.

Solution:

1.  Open Firefox, and in the URL, enter about:config and press ENTER

2. In the Filter, type security.enable_ssl2

3. Set the value to true (just double-click on the entry)

4. On your server, navigate to your VMware console page at https://myhost:8333

5. Click on Tools --> Page Info --> Security --> View Certificate --> Details --> Export

6. Export the certificate in X.509 Certificate format, and transfer it to your desktop

7. In Firefox on your desktop, click on Tools --> Options --> Advanced --> Encryption --> View Certificates --> Import

8. Import the certificate file

9. Make sure that your server firewall is open on ports 8222 and 8333

Applicable Versions:
  • VMware Server 2.0.2 and VMware Infrastructure Web Access 2.0.0 (on Oracle Enterprise Linux 5.5 x86_64)
  • Firefox 3.6.12 (on Windows XP SP3)
References:

http://tuxnetworks.blogspot.com/2010/03/vmware-server-console-connection-was.html

Monday, November 8, 2010

XMLParseException when deploying BPEL 10g project

Problem

While deploying a BPEL 10g project, the log returns the following error:
[deployESBSuitcase] oracle.xml.parser.v2.XMLParseException: Whitespace required.
Solution

Check all XSLT transformations for missing required white spaces.

Incorrect:
<oracle-xsl-mapper<!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
Correct:
<oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
Applicable Versions
  • Oracle JDeveloper 10g (10.1.3)
  • Oracle SOA Suite 10g (10.1.3)

getDomainId() no longer working in SOA Suite 11g

The BPEL XPath extension function ora:getDomainId() returned the domain name in SOA Suite 10g, however, in SOA Suite 11g, it returns NULL.

The function is documented and supported in 11g as shown here:
http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bp_appx_functs.htm
The concept of BPEL domains no longer exists in 11g, and Oracle apparently has kept the function (although it does nothing) in order not to break migrated code.

If you are looking for a function that will return the WebLogic domain or the partition name, you are out of luck.

Wednesday, November 3, 2010

ORABPEL-05250 deploying to Oracle SOA Suite 11g

Problem:

When deploying a composite directly from JDeveloper 11g, I received the following error:
[03:54:05 PM] Error deploying archive sca_HelloWorld_rev1.0.jar to partition "default" on server soa_server1 [oradev.ipnweb.inc:8001]
[03:54:05 PM] HTTP error code returned [500]
[03:54:05 PM] Error message from server:
Error during deployment: Error occurred during deployment of component: HelloWorld to service engine: implementation.bpel, for composite: HelloWorld: ORABPEL-05250
Error deploying BPEL suitcase.error while attempting to deploy the BPEL component file "/u01/app/oracle/middleware/user_projects/domains/soa_domain/deployed-composites/Helloworld_rev1.0/sca_HelloWorld_rev1.0/soa_e402b66f-a3f3-453d-b523-a9547206f05b"; the exception reported is: java.lang.NoClassDefFoundError: Could not initialize class com.collaxa.cube.xml.xpath.BPELXPathFunctionNameResolver

This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).
.
[03:54:05 PM] Check server log for more details.
[03:54:05 PM] Error deploying archive sca_HelloWorld_rev1.0.jar to partition "default" on server soa_server1 [oradev.ipnweb.inc:8001]
[03:54:05 PM] #### Deployment incomplete. ####
[03:54:05 PM] Error deploying archive file:/C:/HelloWorld/deploy/sca_HelloWorld_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)

Solution:

This was directly related to a recent configuration change we made to the following file:
$MW_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/classes/META-INF/ext-soa-xpath-functions-config.xml
We edited this file to add a new custom xpath function that we wrote.

Basically, we added the function name and parameters, but we forgot to add the namespace prefix to the first entry of the file (highlighted in bold below):
<?xml version="1.0" encoding="UTF-8"?>
<soa-xpath-functions xmlns="http://xmlns.oracle.com/soa/config/xpath"
                     xmlns:aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.xpath.AIAFunctions"
                     xmlns:utl="http://www.oracle.com/XSL/Transform/java/com.util.getAge">
Once we added this and bounced the server, our code deployments now worked.

Applicable Versions:

Oracle SOA Suite 11g (11.1.1.3)