This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DSN problem

 
Michael Crutcher
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel like I'm flooding the board with my problems, but I'm new at this and I keep running into weird stuff (wierd at least to me). I have a java bean that is accessing a teradata database. The get methods open up a connection, perform a select statement, format the result set, and return a string representing a list box. The problem is that the connection never happens. The bean's get method never returns and hangs at this line:
Connection con = DriverManager.getConnection(url, username, password);
Where url is jdbc dbc ataSourceName, username and password should be obvious. The data source is a system dsn. The wierd part is that a tester program calling the exact same get method works just fine, returning a correctly formated list box string. Originally the data source was a user dsn. Thinking this might be the problem I changed it to a system dsn. Could this have anything to do with it? Could it be something within Teradata (I doubt this very seriously since it's just an odbc connection).
Any help would be greatly appreciated. I'm pretty much dead in the water at work until I figure out why I can't connect to the database through the bean.
Thanks,
Michael Crutcher
Texas A&M University
 
Jesse Beaumont
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You might be better on the JDBC forum with this one, but a little more information on what jdbc driver (you also mention odbc...does that mean you are using the jdbc-odbc bridge?) and other parameters, such as are the two calls (tester and bean) calling from the same machine with the same user credentials would be useful?
Jesse
 
Michael Crutcher
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is a jdbc odbc bridge. I tried to put colons between them and it got eaten by the smileys. Here's the get method in the bean:

Here's the bean call:

Here's the call from a tester program:

The tester program works fine, the bean call fails. It always locks at the commented line. It doesn't throw an exception or return from the method. It just locks.
Michael Crutcher
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic