You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2008/05/09 00:56:55 UTC

[jira] Created: (DERBY-3669) ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null

ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null
--------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-3669
                 URL: https://issues.apache.org/jira/browse/DERBY-3669
             Project: Derby
          Issue Type: Bug
          Components: Network Client
            Reporter: Myrna van Lunteren
            Priority: Minor


Running the test XAJNDITest (from old xaJNDI.java) with network server  fails because the XADataSource as bound to JNDI, and then fetch from JNDI are not identical.
This is what the test does to get the XADataSource & to bind & get it from JNDI:
----------------
...
            XADataSource xads = J2EEDataSource.getXADataSource();
            String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
            JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
            JDBCDataSource.setBeanProperty(xads, "createDatabase", "create");
            JDBCDataSource.setBeanProperty(xads, "description", "XA DataSource");

            Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
            // using a system property - these will have to be passed in somehow.
            env.put(Context.PROVIDER_URL, "ldap://" + ldapServer + ":" + ldapPort);
            env.put(Context.SECURITY_AUTHENTICATION, "simple");        

            ic.rebind("cn=compareDS, o=" + dnString, xads);
            javax.sql.XADataSource ads =
                (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=" + dnString);
...
-------------------


Further checking showed that the fetched datasource has a String with value "null" rather than a null value for the following properties:
dataSourceName, connectionAttributes, traceDirectory, traceFile.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-3669) ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-3669.
---------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.6.0.0
    Issue & fix info:   (was: [Patch Available])

Committed revision 792434.

> ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3669
>                 URL: https://issues.apache.org/jira/browse/DERBY-3669
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.6.0.0
>            Reporter: Myrna van Lunteren
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: d3669-1a.diff
>
>
> Running the test XAJNDITest (from old xaJNDI.java) with network server  fails because the XADataSource as bound to JNDI, and then fetch from JNDI are not identical.
> This is what the test does to get the XADataSource & to bind & get it from JNDI:
> ----------------
> ...
>             XADataSource xads = J2EEDataSource.getXADataSource();
>             String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
>             JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
>             JDBCDataSource.setBeanProperty(xads, "createDatabase", "create");
>             JDBCDataSource.setBeanProperty(xads, "description", "XA DataSource");
>             Hashtable env = new Hashtable();
>             env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
>             // using a system property - these will have to be passed in somehow.
>             env.put(Context.PROVIDER_URL, "ldap://" + ldapServer + ":" + ldapPort);
>             env.put(Context.SECURITY_AUTHENTICATION, "simple");        
>             ic.rebind("cn=compareDS, o=" + dnString, xads);
>             javax.sql.XADataSource ads =
>                 (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=" + dnString);
> ...
> -------------------
> Further checking showed that the fetched datasource has a String with value "null" rather than a null value for the following properties:
> dataSourceName, connectionAttributes, traceDirectory, traceFile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-3669) ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reassigned DERBY-3669:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3669
>                 URL: https://issues.apache.org/jira/browse/DERBY-3669
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.6.0.0
>            Reporter: Myrna van Lunteren
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>
> Running the test XAJNDITest (from old xaJNDI.java) with network server  fails because the XADataSource as bound to JNDI, and then fetch from JNDI are not identical.
> This is what the test does to get the XADataSource & to bind & get it from JNDI:
> ----------------
> ...
>             XADataSource xads = J2EEDataSource.getXADataSource();
>             String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
>             JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
>             JDBCDataSource.setBeanProperty(xads, "createDatabase", "create");
>             JDBCDataSource.setBeanProperty(xads, "description", "XA DataSource");
>             Hashtable env = new Hashtable();
>             env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
>             // using a system property - these will have to be passed in somehow.
>             env.put(Context.PROVIDER_URL, "ldap://" + ldapServer + ":" + ldapPort);
>             env.put(Context.SECURITY_AUTHENTICATION, "simple");        
>             ic.rebind("cn=compareDS, o=" + dnString, xads);
>             javax.sql.XADataSource ads =
>                 (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=" + dnString);
> ...
> -------------------
> Further checking showed that the fetched datasource has a String with value "null" rather than a null value for the following properties:
> dataSourceName, connectionAttributes, traceDirectory, traceFile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3669) ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3669:
--------------------------------------

               Urgency: Normal
     Affects Version/s: 10.6.0.0
    Bug behavior facts: [Embedded/Client difference]

Triaged for 10.5.2. Verified that it is still a problem on trunk and set Affects Version accordingly.

> ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3669
>                 URL: https://issues.apache.org/jira/browse/DERBY-3669
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.6.0.0
>            Reporter: Myrna van Lunteren
>            Priority: Minor
>
> Running the test XAJNDITest (from old xaJNDI.java) with network server  fails because the XADataSource as bound to JNDI, and then fetch from JNDI are not identical.
> This is what the test does to get the XADataSource & to bind & get it from JNDI:
> ----------------
> ...
>             XADataSource xads = J2EEDataSource.getXADataSource();
>             String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
>             JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
>             JDBCDataSource.setBeanProperty(xads, "createDatabase", "create");
>             JDBCDataSource.setBeanProperty(xads, "description", "XA DataSource");
>             Hashtable env = new Hashtable();
>             env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
>             // using a system property - these will have to be passed in somehow.
>             env.put(Context.PROVIDER_URL, "ldap://" + ldapServer + ":" + ldapPort);
>             env.put(Context.SECURITY_AUTHENTICATION, "simple");        
>             ic.rebind("cn=compareDS, o=" + dnString, xads);
>             javax.sql.XADataSource ads =
>                 (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=" + dnString);
> ...
> -------------------
> Further checking showed that the fetched datasource has a String with value "null" rather than a null value for the following properties:
> dataSourceName, connectionAttributes, traceDirectory, traceFile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3669) ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3669:
--------------------------------------

    Attachment: d3669-1a.diff

The embedded data sources only add the non-null properties to the object returned by getReference(), and there's a comment saying that the string "null" will be returned if a null is added. The attached patch makes the client data sources use the same logic and removes the workaround for the null/"null" issue in XAJNDITest.

I have only run XAJNDITest on the patch so far. Will run the rest of the regression test suite soon.

> ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3669
>                 URL: https://issues.apache.org/jira/browse/DERBY-3669
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.6.0.0
>            Reporter: Myrna van Lunteren
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3669-1a.diff
>
>
> Running the test XAJNDITest (from old xaJNDI.java) with network server  fails because the XADataSource as bound to JNDI, and then fetch from JNDI are not identical.
> This is what the test does to get the XADataSource & to bind & get it from JNDI:
> ----------------
> ...
>             XADataSource xads = J2EEDataSource.getXADataSource();
>             String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
>             JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
>             JDBCDataSource.setBeanProperty(xads, "createDatabase", "create");
>             JDBCDataSource.setBeanProperty(xads, "description", "XA DataSource");
>             Hashtable env = new Hashtable();
>             env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
>             // using a system property - these will have to be passed in somehow.
>             env.put(Context.PROVIDER_URL, "ldap://" + ldapServer + ":" + ldapPort);
>             env.put(Context.SECURITY_AUTHENTICATION, "simple");        
>             ic.rebind("cn=compareDS, o=" + dnString, xads);
>             javax.sql.XADataSource ads =
>                 (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=" + dnString);
> ...
> -------------------
> Further checking showed that the fetched datasource has a String with value "null" rather than a null value for the following properties:
> dataSourceName, connectionAttributes, traceDirectory, traceFile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3669) ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3669:
--------------------------------------

    Issue & fix info: [Patch Available]

Derbyall and suites.All ran cleanly.

> ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3669
>                 URL: https://issues.apache.org/jira/browse/DERBY-3669
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.6.0.0
>            Reporter: Myrna van Lunteren
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3669-1a.diff
>
>
> Running the test XAJNDITest (from old xaJNDI.java) with network server  fails because the XADataSource as bound to JNDI, and then fetch from JNDI are not identical.
> This is what the test does to get the XADataSource & to bind & get it from JNDI:
> ----------------
> ...
>             XADataSource xads = J2EEDataSource.getXADataSource();
>             String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
>             JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
>             JDBCDataSource.setBeanProperty(xads, "createDatabase", "create");
>             JDBCDataSource.setBeanProperty(xads, "description", "XA DataSource");
>             Hashtable env = new Hashtable();
>             env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
>             // using a system property - these will have to be passed in somehow.
>             env.put(Context.PROVIDER_URL, "ldap://" + ldapServer + ":" + ldapPort);
>             env.put(Context.SECURITY_AUTHENTICATION, "simple");        
>             ic.rebind("cn=compareDS, o=" + dnString, xads);
>             javax.sql.XADataSource ads =
>                 (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=" + dnString);
> ...
> -------------------
> Further checking showed that the fetched datasource has a String with value "null" rather than a null value for the following properties:
> dataSourceName, connectionAttributes, traceDirectory, traceFile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3669) ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3669:
--------------------------------------

    Affects Version/s: 10.5.1.1
        Fix Version/s: 10.5.1.2

Merged fix to 10.5.
Committed revision 792491.

> ClientXADataSource fetched from JNDI not identical as originally bound; some properties have String "null" instead of null
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3669
>                 URL: https://issues.apache.org/jira/browse/DERBY-3669
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.5.1.1, 10.6.0.0
>            Reporter: Myrna van Lunteren
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.5.1.2, 10.6.0.0
>
>         Attachments: d3669-1a.diff
>
>
> Running the test XAJNDITest (from old xaJNDI.java) with network server  fails because the XADataSource as bound to JNDI, and then fetch from JNDI are not identical.
> This is what the test does to get the XADataSource & to bind & get it from JNDI:
> ----------------
> ...
>             XADataSource xads = J2EEDataSource.getXADataSource();
>             String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
>             JDBCDataSource.setBeanProperty(xads, "databaseName", dbName);
>             JDBCDataSource.setBeanProperty(xads, "createDatabase", "create");
>             JDBCDataSource.setBeanProperty(xads, "description", "XA DataSource");
>             Hashtable env = new Hashtable();
>             env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
>             // using a system property - these will have to be passed in somehow.
>             env.put(Context.PROVIDER_URL, "ldap://" + ldapServer + ":" + ldapPort);
>             env.put(Context.SECURITY_AUTHENTICATION, "simple");        
>             ic.rebind("cn=compareDS, o=" + dnString, xads);
>             javax.sql.XADataSource ads =
>                 (javax.sql.XADataSource)ic.lookup("cn=compareDS, o=" + dnString);
> ...
> -------------------
> Further checking showed that the fetched datasource has a String with value "null" rather than a null value for the following properties:
> dataSourceName, connectionAttributes, traceDirectory, traceFile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.