This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

DataAccess using Spring...

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to setup a Spring Application in the IBM RAD 6.0. The application works fine. Then i tried to connect to databse without using the connection pool and it worked fine. The problem started when i tired using the connection pool and since then i'm not able to connect to database. The Database is Sybase.

In the config file this is what i have...

<bean id="achManDao" class="com.keybank.der.ach.dao.AchManagerDaoJdbc">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
</bean>
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName"><value>jdbc/SYBASDB</value></property>
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
</bean>
<bean id="jndiTemplate"
class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="Context.INITIAL_CONTEXT_FACTORY">
com.ibm.websphere.naming.WsnInitialContextFactory
</prop>
</props>
</property>
</bean>

The exception i'm getting is:

[6/12/07 16:26:17:293 EDT] 00000039 SystemErr R org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: JZ004: User name property missing in DriverManager.getConnection(..., Properties).DSRA0010E: SQL State = JZ004, Error Code = 0DSRA0010E: SQL State = JZ004, Error Code = 0
java.sql.SQLException: JZ004: User name property missing in DriverManager.getConnection(..., Properties).DSRA0010E: SQL State = JZ004, Error Code = 0DSRA0010E: SQL State = JZ004, Error Code = 0;

I know it looks like that i'm missing User Name. But in IBM RAD 6, i did set up User name and password for this datasource.
Below is my DataSource.

Name JNDI name Description
SYBASDB jdbc/SYBASDB New JDBC Datasource

I'm not sure whether i'm missing anything. Can anyone help me out.
 
Hold that thought. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!