Announcement Announcement Module
Collapse
No announcement yet.
Teradata Data access through Datasource Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Teradata Data access through Datasource

    Hi,

    I am getting an error while connecting to Teradata database from a Spring based application that I am working on. I use JDBCTemplate class to set the datasource using one of the Spring's datasource configuration files.
    The error is 'Single Sign-On NOT supported for Mechanism TD2'.

    I have created a datasource and jndi name in the EAR file application descriptor under user-defined datasource category. I have also given the userid/password under JAAS authentication list. I am using websphere server.
    ------
    Detail error message -
    Caused by: org.springframework.jdbc.CannotGetJdbcConnectionEx ception: Could not get JDBC Connection; nested exception is java.sql.SQLException: [NCR] [Teradata JDBC Driver] : Single Sign-On NOT supported for Mechanism TD2.DSRA0010E: SQL State = HY000, Error Code = 1,032
    at org.springframework.jdbc.datasource.DataSourceUtil s.getConnection(DataSourceUtils.java:82)
    at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:327)
    at org.springframework.jdbc.core.JdbcTemplate.update( JdbcTemplate.java:467)
    at com.hcsc.tpa.integration.daoimpl.jdbc.UserAccountD aoJdbcImpl.changePassword(UserAccountDaoJdbcImpl.j ava:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java(Compiled Code))
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java(Compiled Code))
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java(Compiled Code))
    at java.lang.reflect.Method.invoke(Method.java(Compil ed Code))
    .....

    Appreciate your help!

    Thanks,
    Suresh

  • #2
    Do you have more information from the Teradata documentation about that error? It looks more like a teradata issue than a Spring issue.

    Do you have a simple non-Spring example that works with Teradata? That might shed some light about what you need to do different with Spring.

    Comment


    • #3
      I am able to connect to teradata using DriverManagerDataSource class as
      mentioned in the code below. This I tried in one of the DAO classes which extends JdbcTemplate class.

      ---
      DriverManagerDataSource ds = new DriverManagerDataSource();
      ds.setDriverClassName("com.ncr.teradata.TeraDriver ");
      ds.setUrl("jdbc:teradata://EDWP/DATABASE=DBC");
      ds.setUsername("******");
      ds.setPassword("*****");
      setDataSource(ds); // Overridden this method of JdbcTemplate class to set the Datasource...
      ----

      But when tried to access from the datasource which is configured in the ear file in websphere, it doesn't work. Not sure if this is really a spring issue or am making some mistake in the datasource configuration in the application descriptor file. But I mentioned username/password in JAAS authentication list. But still not working

      Need help!

      Thanks,
      Suresh

      Comment


      • #4
        Sounds like a datasource configuration issue in the application server, since JdbcTemplate works fine with a DriverManagerDataSource.

        Comment


        • #5
          hi could you let me know what is the data source class name that you have mentioned in the application context.xml to establish the connection

          Comment

          Working...
          X