Thursday Jan 23, 2014

Oracle released CMSDK as open source

As of January 16th, 2014, Oracle released the source code of CMSDK version to the public as open source under the BSD license agreement.

By making CMSDK available as open source code, Oracle gives its loyal partners the opportunity to offer a continuous support model to their customers. In addition, customers and partners can leverage their existing product knowledge and benefit from community fixes and other group’s enhancements to this product.

The official Statement of Direction for CMSDK has been published here:

Details of the BSD license agreement can be found here:

Please let me know your thoughts and comments.

Wednesday Dec 11, 2013

Disable JDBC object wrapping in GlassFish

As outlined in my previous blog entry, if you run CMSDK on middleware such as Oracle WebLogic Sever or Oracle GlassFish, you need to disable the JDBC object wrapping first. Otherwise you might be seeing this exception during the startup of a CMSDK Node in GlassFish:

oracle.ifs.core.agents.InboundQueueListenerAgent [39] WARNING: Error while processing incoming message.
oracle.ifs.common.IfsException: IFS-13001: Unable to dequeue message
java.lang.ClassCastException: com.sun.gjc.spi.jdbc40.ConnectionWrapper40 cannot be cast to oracle.jdbc.OracleConnection

How to Disable JDBC Object Wrapping in GlassFish

It is required to disable JDBC object wrapping when using a data source for CMSDK These instructions are for GlassFish 3.1.1 or above, as we don’t support earlier versions of GlassFish with CMSDK.

To disable wrapping of JDBC objects using the Administration Console:

  1. In the Domain Structure tree, expand Resources, then expand JDBC.
  2. Select JDBC Connection Pool in the tree structure.
  3. On the Summary of JDBC Connection Pool page, click the connection pool name that your data source is based on.
  4. Select the Advanced: Edit JDBC Connection Pool Advanced Attributes tab.
  5. In Wrap JDBC Objects, deselect the checkbox to disable wrapping.
  6. Click Save.

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

In Oracle GlassFish Server this property can also be modified in the domain.xml file or via asadmin command.

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(

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


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
  • 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 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.

Wednesday Nov 20, 2013

How-To: Deploy CMSDK on Tomcat

Although there are ways to run CMSDK in a standalone JVM, when you need to use the WebDAV protocol to access documents in the CMSDK repository you can’t avoid deploying it into at least a web container.

WebLogic Server or GlassFish Server are one choice, but even Tomcat can be used to host the CMSDK Node that provides the CMSDK protocol servers along with other processes.

When you need to set up a data source on Tomcat the official documentation gives an example like this:

<Resource name="jdbc/OracleDS" auth="Container"
  username="cmsdk" password="****" maxActive="20" maxIdle="10"

Unfortunately, when using this data source definition you will see the following exception and the Node won’t come up.

java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.DelegatingCallableStatement cannot be cast to oracle.jdbc.OracleCallableStatement

Whereas in other container configurations (such as in WLS and GlassFish) we can specifically disable the JDBC data type wrapping, this isn’t the case in Tomcat. In Tomcat we need to change the definition of the data source to this, to get the Node started and the defaults overwritten:

<Resource name="jdbc/OracleDS" auth="Container"
  user="cmsdk" password="****"
  maxIdle="10" maxwait="-1"/>

In addition to the above, you need to change the data source name attribute in the web.xml of the cmsdk.ear file, as Tomcat places all configured entries and resources in the java:comp/env portion of the JNDI namespace which is different from what most other containers are doing.
The modified data source name in the CMSDK web.xml for Tomcat should look like this:

  <description>The name of the DataSource for the CMSDK repository</description>

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 with Oracle WebLogic Server (WLS).

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

(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
(failover_mode = (type=select)(method=basic))

CMSDK 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 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.


Latest news, best practices, examples and product updates for CMSDK.


« July 2016