[teiid-issues] [JBoss JIRA] Resolved: (TEIID-1109) NPE Connecting to a Teiid DataSource (XA) Without Setting Expected Properties

Ramesh Reddy (JIRA) jira-events at lists.jboss.org
Thu Jun 3 18:44:25 EDT 2010


     [ https://jira.jboss.org/browse/TEIID-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramesh Reddy resolved TEIID-1109.
---------------------------------

      Assignee: Ramesh Reddy  (was: Steve Hawkins)
    Resolution: Done


The validation of properties was not being done in the embedded scenario, which would have thrown a expected SQLException instead of NPE.  Fixed the code now.

> NPE Connecting to a Teiid DataSource (XA) Without Setting Expected Properties 
> ------------------------------------------------------------------------------
>
>                 Key: TEIID-1109
>                 URL: https://jira.jboss.org/browse/TEIID-1109
>             Project: Teiid
>          Issue Type: Bug
>          Components: JDBC Driver
>            Reporter: Ted Jones
>            Assignee: Ramesh Reddy
>             Fix For: 7.0
>
>
> I created a datasource for a VDB with XA sources underlying. I didn't add any of the required custom properties (server, host, etc) just used the default properties provided by the datasource template. This resulted in the following when I tried to connect:
> Caused by: java.lang.NullPointerException
> 	at java.util.Hashtable.put(Hashtable.java:394)
> 	at java.util.Properties.setProperty(Properties.java:143)
> 	at org.teiid.jdbc.BaseDataSource.buildProperties(BaseDataSource.java:194)
> 	at org.teiid.jdbc.TeiidDataSource.buildProperties(TeiidDataSource.java:106)
> 	at org.teiid.jdbc.TeiidDataSource.buildEmbeddedProperties(TeiidDataSource.java:228)
> 	at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:215)
> 	at org.teiid.jdbc.BaseDataSource$1.createConnection(BaseDataSource.java:340)
> 	at org.teiid.jdbc.XAConnectionImpl.getMMConnection(XAConnectionImpl.java:110)
> 	at org.teiid.jdbc.XAConnectionImpl.getConnection(XAConnectionImpl.java:96)
> 	at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.<init>(XAManagedConnection.java:56)
> 	at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.newXAManagedConnection(XAManagedConnectionFactory.java:475)
> 	at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:453)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list