• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cant connect to an specific database with jConnect and Sybase ASA 8

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am working in an application writen in java, it connects to a Sybase ASA Database. That database has 3 instance, one named 'clock', another named 'sysadm' and a last one named 'clinics'.

I have a class wich has a method that provides access to the database and other methods to execute some queries, it uses jConnect 6.05 driver to connect to the database. I can connect perfectly, but i can not connect to an specific instance. At the begining i only can connect to the service named 'clock', and then i shut down that service, and i could connect to the service named 'sysadm', so i shutdown that service, but i couldnt connect to 'clinics', i dont know why... Then I reboot the database server, and i could connect directly to 'clinics'. I try to force the service name to connect to with the parameter SERVICENAME=clinics at the end of the url, but i have an error:

getConnection failed: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).

This is the code of my class:




The Configuration xml file:


I tried with diferrents sintaxs but nothing works. I tried appending the service name at the end of the url:



or passing the service name by the connection properties in the xml file



But i still having the same problem.

Any Ideas??

Thanks in advance,

JM
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Juan

I checked your URL, and it seems to be ok.

getConnection failed: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).



Does your program give more info than just this one error line?
If yes, please post the other error info,

If not please change (for debugging use only, you can change back to the original code afterwards):

from

to


Hopefully, this will return more error info.

Regards, Jan
 
Juan Manuel Diaz
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jan Cumps wrote:Hi Juan

I checked your URL, and it seems to be ok.

getConnection failed: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).



Does your program give more info than just this one error line?
If yes, please post the other error info,

If not please change (for debugging use only, you can change back to the original code afterwards):

from

to


Hopefully, this will return more error info.

Regards, Jan



Jan,

I have been doing some test yesterday, and i realized that i can connect to the first service initialized, so, in the database server, I added dependencies to the service to force to initialize first the service named 'clinics', so i could connect to it without a reference to the service name.
It is not a good solution, but it works. I dont know why i can not chose the service wich i want to connect to. I will try with your code, maybe i can get more info about the error.

Best Regards,
JM
 
Juan Manuel Diaz
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, i changed the code, trying to get more debuging info. I got this:



Nothing more than we have.

What do you think???,

Regards,

JM
 
Jan Cumps
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nothing more than we have. What do you think???,

No, it didn't help
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic