我已配置了此JNDI。但是我得到了下一个例外。我无法设置DSName属性
<!-- Teradata -->
<dataSource
id="com.teradata.jdbc.TeraConnectionPoolDataSource"
jndiName="jdbc/teradata">
<jdbcDriver libraryRef="TeradataLib" />
<properties databaseName="----" serverName="----" user="-----" password="-----"/>
</dataSource>
<library id="TeradataLib">
<file
name="----/TeraJDBC/terajdbc4.jar" />
</library>
前者是:
org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 16.20.00.10] [Error 606] [SQLState HY000] A valid DSName property must be specified for the DataSource, to provide the Teradata Database hostname. DSRA0010E: Estado SQL = HY000, Código de error = 606
.....
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 16.20.00.10] [Error 606] [SQLState HY000] A valid DSName property must be specified for the DataSource, to provide the Teradata Database hostname. DSRA0010E: Estado SQL = HY000, Código de error = 606
.....
Caused by: java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 16.20.00.10] [Error 606] [SQLState HY000] A valid DSName property must be specified for the DataSource, to provide the Teradata Database hostname. DSRA0010E: Estado SQL = HY000, Código de error = 606
.....
java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 16.20.00.10] [Error 606] [SQLState HY000] A valid DSName property must be specified for the DataSource, to provide the Teradata Database hostname. DSRA0010E: Estado SQL = HY000, Código de error = 606
@AlexMotley
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.teradata.tdgss.jtdgss.TdgssManager
谢谢。
答案 0 :(得分:0)
我找到了解决方案,如果有人遇到类似问题,我将其留在这里:
<!-- Teradata -->
<dataSource
id="com.teradata.jdbc.TeraConnectionPoolDataSource"
jndiName="jdbc/teradata">
<jdbcDriver libraryRef="TeradataLib" javax.sql.ConnectionPoolDataSource="com.teradata.jdbc.TeraConnectionPoolDataSource"/>
<properties serverName="IP" user="user" password="password" DSName="IP"/>
</dataSource>
<library id="TeradataLib">
<file
name="../TeraJDBC/terajdbc4.jar" />
<file name= "../TeraJDBC/tdgssconfig.jar" />
</library>
非常感谢@AlexMotley帮助我解决了这个问题。