Friday Dec 06, 2013

Disable JDBC data type wrapping in WLS

I've now seen this problem several times in customer environments. During startup of a CMSDK Node you see a ClassCastExceptions related to weblogic.jdbc.wrapper.

If something like this shows up in your log file:

...
oracle.ifs.common.IfsException: IFS-45206: Unable to get credential
oracle.ifs.common.IfsException: IFS-10184: Unable to get token
oracle.ifs.common.IfsException: IFS-10191: Unable to make token credential persistent
java.lang.ClassCastException: weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB
    at oracle.ifs.server.S_LibrarySession.getTokenCredentialBlob(S_LibrarySession.java:23888)
...

you have probably not disabled the JDBC data type object wrapping that is enabled by default in WebLogic Server (WLS).

Background

Some JDBC objects from a driver that are returned from WLS are wrapped by default. Wrapping data source objects provides WLS the ability to:

  • Generate debugging output from all method calls.
  • Track connection utilization so that connections can be timed out appropriately.
  • Provide transparent automatic transaction enlistment and security authorization.

WLS provides the ability to disable wrapping which provides the following benefits:

  • Although WLS generates a dynamic proxy for vendor methods that implement an interface to show through the wrapper, some data types do not implement an interface. For example, Oracle data types Array, Blob, Clob, NClob, Ref, SQLXML, and Struct are classes that do not implement interfaces. Disabling wrapping allows applications to use native driver objects directly.
  • Eliminating wrapping overhead can provide a significant performance improvement.

When wrapping is disabled (the wrap-types element is false), the following data types are not wrapped:

  • Array
  • Blob
  • Clob
  • NClob
  • Ref
  • SQLXML
  • Struct
  • ParameterMetaData
    • No connection testing performed.
  • ResultSetMetaData
    • No connection testing performed.
    • No result set testing performed.
    • No JDBC MT profiling performed.

How to Disable Wrapping

It is required to disable JDBC data type wrapping when using a data source with CMSDK 9.0.4.6. This only works in WLS 10.3.4 or above. Since there is no way to change it for WLS versions earlier than 10.3.4, we don’t support those WLS versions with CMSDK.

To disable wrapping of JDBC data type objects using the Administration Console:

  1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit.
  2. In the Domain Structure tree, expand Services, then select Data Sources.
  3. On the Summary of Data Sources page, click the data source name.
  4. Select the Configuration: Connection Pool tab.
  5. Scroll down and click Advanced to show the advanced connection pool options.
  6. In Wrap Data Types, deselect the checkbox to disable wrapping.
  7. Click Save.
  8. To activate these changes, in the Change Center of the Administration Console, click Activate Changes.

    This change does not take effect immediately—it requires that the data source be redeployed or the server be restarted.

After that you should not see the ClassCastException anymore and your CMSDK Node should start without errors.

Tuesday Oct 29, 2013

How-To: Run CMSDK against a RAC cluster

Using CMSDK in a production environment often requires a robust, reliable and failover enabled repository. When using Oracle Real Application Cluster (RAC) with your CMSDK repository you need to have a specific configuration in place to support such a setup. This post will explain the configuration steps required when running CMSDK 9.0.4.6 with Oracle WebLogic Server (WLS).

In the previous CMSDK 9.0.4.2 version a RAC enabled connect string looked like this:

(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
(LOAD_BALANCE = NO)
(FAILOVER = ON)
(CONNECT_DATA =
(SERVICE_NAME = rac)
(failover_mode = (type=select)(method=basic))
)

CMSDK 9.0.4.6 makes use of data sources to connect to the underlying database. These data sources are configured inside your Application Server, such as Oracle WebLogic Server.
In Oracle WebLogic Server 10.3.4, a single data source implementation has been introduced to support an RAC cluster. It responds to Fast Application Notification (FAN) events to provide Fast Connection Failover (FCF), Runtime Connection Load-Balancing (RCLB), and RAC instance graceful shutdown. XA affinity is supported at the global transaction Id level. The new feature is called WebLogic Active GridLink for RAC; which is implemented as the GridLink data source within WebLogic Server.
This GridLink data source also works with Oracle Single Client Access Name (SCAN). SCAN is a feature used in RAC environments that provides a single name for clients to access any Oracle Database running in a cluster. You can think of SCAN as a cluster alias for databases in the cluster. The benefit is that the client’s connect information does not need to change if you add or remove nodes or databases in the cluster.

The CMSDK 9.0.4.6 documentation describes how to create a regular JDBC data source named jdbc/OracleDS. Please refer to the following document which describes in detail how to create a GridLink data source in WLS.

Friday Aug 16, 2013

Still on CMSDK 9.0.4.2 ?

CMSDK version 9.0.4.2 was released back in January 2005. This and every subsequent 9.0.4.2.x CMSDK version requires Oracle Application Server 10gR2 (10.1.2.0.2) for its run-time environment. This version of Oracle Application Server and the Java version it depends on (JDK 1.4) have already reached its end-of-life on Extended Support. See Oracle Application Server 10g certification information for more information.

So what now?

Let me explain to you how you can move your existing CMSDK environment to the latest Oracle stack.

In March 2012 we released a new version of CMSDK (version 9.0.4.6.3), which corrects two major issues that existed in CMSDK version 9.0.4.2:

  • Removing the dependency on Oracle Application Server 10g.
  • Making CMSDK compatible with the latest Java versions.

Since then, we have released a new CMSDK 9.0.4.6.x patch every four months. The most recent one, version 9.0.4.6.7, has been released to My Oracle Support as Patch 16465003 in July 2013. This patch includes a number of bug fixes that have been found by customers and partners during their testing of the earlier CMSDK 9.0.4.6.x versions. The Readme that is bundled with the patch contains the list of bugs fixed as well as the installation and upgrade instructions and the list of deprecated features.

CMSDK 9.0.4.6 is certified on current middleware products such as Oracle WebLogic Server or Oracle GlassFish Server and is available for download on My Oracle Support.

The following documents contain some further general information about CMSDK 9.0.4.6:

About

My name is Frank Closheim. I lead Development for CMSDK at Oracle and want to share the latest news, best practices, examples and product updates about CMSDK with the Blogsphere.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today