IronJacamar
  1. IronJacamar
  2. JBJCA-943

Failure to set "SetBigStringTryClob=true" ConnectionProperties in xa-datasource-property

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 1.0.13.Final, 1.1.0.Beta3
    • Fix Version/s: 1.0.14.Final, 1.1.0.Beta4
    • Component/s: JDBC
    • Labels:
    • Environment:
      Red Hat Enterprise Linux Server release 5.7, JDK 7, Oracle 10g
    • Similar Issues:
      Show 10 results 

      Description

      I found that when the following is set in the standalone.xml of JBoss-7.1.1.Final, it will have a fatal error:

      <xa-datasource....>
      ....
      <xa-datasource-property name="ConnectionProperties">SetBigStringTryClob=true</xa-datasource-property>
      ....
      </xa-datasource>

      The error is:

      Caused by: javax.resource.ResourceException: No property editor found for type: class java.util.Properties
      at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:601)
      at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:430)

      When I don't define the SetBigStringTryClob setting, all is fine. However, the SetBigStringTryClob is really important for the application to work correctly. Hope there's at least a workaround.

      This worked without problems in JBoss 4.2.3.

        Activity

        Hide
        John Mazzitelli
        added a comment -

        This is also an issue with the RHQ/JON products.

        This sounds related to https://issues.jboss.org/browse/AS7-5336 - sounds like a java.util.Properties property editor is not registered in the system.

        If you look at that JIRA link, I had a workaround.

        There is a Properties property editor in the commons-core AS library which can be used, I think.

        Show
        John Mazzitelli
        added a comment - This is also an issue with the RHQ/JON products. This sounds related to https://issues.jboss.org/browse/AS7-5336 - sounds like a java.util.Properties property editor is not registered in the system. If you look at that JIRA link, I had a workaround. There is a Properties property editor in the commons-core AS library which can be used, I think.
        Hide
        John Mazzitelli
        added a comment -

        This is from:

        http://docs.jboss.org/ironjacamar/userguide/1.0/en-US/html/deployment.html#deployingds_descriptor

        "Table 5.14. xa-datasource elements", element "xa-datasource-property":

        "Specifies a property to assign to the XADataSource implementation class. Each property is identified by the name attribute and the property value is given by the xa-datasource-property element content. The property is mapped onto the XADataSource implementation by looking for a JavaBeans style getter method for the property name. If found, the value of the property is set using the JavaBeans setter with the element text translated to the true property type using the java.beans.PropertyEditor for the type"

        So, it appears this ConnectionProperties property is mapped to Properties but there is no JavaBeans PropertyEditor installed for that type "Properties". There is one available in commons-core (org.jboss.util.propertyeditor.PropertiesEditor). I think AS7 needs to register it somehow, or as a workaround some custom extension a user writes needs to do it at startup (via a call to "java.beans.PropertyEditorManager.registerEditor(java.util.Properties.class, org.jboss.util.propertyeditor.PropertiesEditor.class);").

        I don't know any other workaround.

        Show
        John Mazzitelli
        added a comment - This is from: http://docs.jboss.org/ironjacamar/userguide/1.0/en-US/html/deployment.html#deployingds_descriptor "Table 5.14. xa-datasource elements", element "xa-datasource-property": "Specifies a property to assign to the XADataSource implementation class. Each property is identified by the name attribute and the property value is given by the xa-datasource-property element content. The property is mapped onto the XADataSource implementation by looking for a JavaBeans style getter method for the property name. If found, the value of the property is set using the JavaBeans setter with the element text translated to the true property type using the java.beans.PropertyEditor for the type" So, it appears this ConnectionProperties property is mapped to Properties but there is no JavaBeans PropertyEditor installed for that type "Properties". There is one available in commons-core (org.jboss.util.propertyeditor.PropertiesEditor). I think AS7 needs to register it somehow, or as a workaround some custom extension a user writes needs to do it at startup (via a call to "java.beans.PropertyEditorManager.registerEditor(java.util.Properties.class, org.jboss.util.propertyeditor.PropertiesEditor.class);"). I don't know any other workaround.
        Hide
        John Mazzitelli
        added a comment -

        Just as an aside, as per http://docs.oracle.com/cd/E11882_01/java.112/e16548/oralob.htm#CHDGEIHF

        "The SetBigStringTryClob connection property of Oracle Database 10g Release 1 (10.1) is no longer used or needed."

        So if you don't support Oracle 9 and below, you can remove this setting.

        This still doesn't solve the more general problem of how do you set any XA datasource property that is translated to type Properties, but for this specific issue of SetBigStringTryClob, if you only support Oracle 10g and above, you don't need it (as per the Oracle documentation linked above).

        Show
        John Mazzitelli
        added a comment - Just as an aside, as per http://docs.oracle.com/cd/E11882_01/java.112/e16548/oralob.htm#CHDGEIHF "The SetBigStringTryClob connection property of Oracle Database 10g Release 1 (10.1) is no longer used or needed." So if you don't support Oracle 9 and below, you can remove this setting. This still doesn't solve the more general problem of how do you set any XA datasource property that is translated to type Properties, but for this specific issue of SetBigStringTryClob, if you only support Oracle 10g and above, you don't need it (as per the Oracle documentation linked above).
        Hide
        John Mazzitelli
        added a comment -

        It was brought to my attention that I might be misinterpreting that quote from the Oracle docs "The SetBigStringTryClob connection property of Oracle Database 10g Release 1 (10.1) is no longer used or needed". I read that as "Oracle 10.1 and up no longer needs it" but I think it really is saying "that property that was in 10.1 (an apparently used) is no longer needed or used in later versions". So I may be wrong that it isn't used in 10.1.

        Show
        John Mazzitelli
        added a comment - It was brought to my attention that I might be misinterpreting that quote from the Oracle docs "The SetBigStringTryClob connection property of Oracle Database 10g Release 1 (10.1) is no longer used or needed". I read that as "Oracle 10.1 and up no longer needs it" but I think it really is saying "that property that was in 10.1 (an apparently used) is no longer needed or used in later versions". So I may be wrong that it isn't used in 10.1.
        Hide
        Roger S
        added a comment -

        Yeah, with Oracle Database 11g release 2 (11.2), the property isn't needed anymore. With previous versions back to Oracle Database 10g Release 1 (10.1), the problem still persists.

        Show
        Roger S
        added a comment - Yeah, with Oracle Database 11g release 2 (11.2), the property isn't needed anymore. With previous versions back to Oracle Database 10g Release 1 (10.1), the problem still persists.
        Hide
        Owen Parrish
        added a comment -

        I'm having a similiar issue using xa-datasoure-property to set ConnectionProperties on an Oracle connection. Specifically, <xa-datasource-property name="ConnectionProperties">oracle.jdbc.ReadTimeout=30000</xa-datasource-property>

        I don't get a fatal error but, the property seems to be ignored and I never see the OracleDataSource.setConnectionProperties() method get called.

        Show
        Owen Parrish
        added a comment - I'm having a similiar issue using xa-datasoure-property to set ConnectionProperties on an Oracle connection. Specifically, <xa-datasource-property name="ConnectionProperties">oracle.jdbc.ReadTimeout=30000</xa-datasource-property> I don't get a fatal error but, the property seems to be ignored and I never see the OracleDataSource.setConnectionProperties() method get called.

          People

          • Assignee:
            Jesper Pedersen
            Reporter:
            Roger S
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: