Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Sunil Aggarwal

Greenhorn
+ Follow
since Aug 26, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sunil Aggarwal

Hi All,

I need to the following:

1. Test connection to a database/datasource using the classpath specified by the user. The classpath will be an absolute path like c:\...where the jar will be located.

I have the some question regarding that:

a. I can't set classpath at runtime, can i?
b. How can I load jars at runtime to test connection and hence load the driver class?
c. Is it possible to set the classpath temporarily with the one given by user? I guess using command line "set classpath" will not help, right?
d. URLClassloader allows loading of jars but it accepts a URL as an argument and i assume i cant specify a location like "C:\.." in the URL.
Am i right?

Please help. Any quick suggestions would be highly appreciated.

Thanka and Regards.
Hi All,

I am facing a strange problem while testing connection to a DB2 data source in Web Sphere. I follow the following steps:

1. Create a data source on WebSphere but not using the admin console but ther is another application which lets me do that.
2. Before i create a data source, i test connection to the DB2 database on which the data source will be created.
3. Since the data source doesnt exist yet, this test connection attempts a direct connection to the database.
4. While here the direct connection succeeds, once the data source is created, then later using the WebSphere admin console, the connection fails saying that username and password are invalid. If i now explicitly provide a username n password to this datasource, connection is successful.

Does anyone have any idea why this strange behaviour occurs - direct connection to database works without username/password but connection to data source via WebSphere(which is a jndi lookup) fails and asks for username/password?

Note: This strange behaviour is observed only for one particular database of DB2, for rest the behaviour is consistent.

Thanks in advance.
16 years ago
Hi All,

I need to do a test connection when the user has specfied username, passwros, url etc. While using this i can test the connection but
can someone please tell me how can i validate the CLASSPATH also entered by the user. Can i possibly temorarily set the classpath to what user has specified and test the connection?

Please help!

Thanks in advance.

Sunil.

[removed urgent from subject]
[ July 22, 2005: Message edited by: Jeanne Boyarsky ]
Hi All,

I am using "com.ibm.db2j.jdbc.DB2jXADataSource" driver class to connect to a Cloudscape database.

While the driver class gets successfully loaded, i get the following exception when DriverManager.getConnection(url):

java.sql.SQLException: No suitable driver
java.sql.DriverManager.getConnection(DriverManager.java:559)
java.sql.DriverManager.getConnection(DriverManager.java:211)
*********************

The url I specify is: jdbc erby atabaseName.

Can someone please help me with this urgently. Is this exception due to wrong URL but then shouldnt error message be for eg. connection failed etc?

Thank you.

Regards,
Sunil.
Hi,
Thanks for reply

Yes, I am using WebSphere server. But i don't think the jndi lookup is failing because i do get a DataSource object given data source's reference name.

Only when i go a dataSource.getConnection(user, passwd), i get this invalid URL exception


Could you please elaborate, what do you mean by "jndi definition"? If what you meant was setting the server props for InitialContext, then that i am already doing, thats why jndi lookup is not failing


Please help!
[ June 27, 2005: Message edited by: Sunil Aggarwal ]
Hi All,

Can someone please tell me how to create a database in Cloudscape. From what i know, a Cloudscape database is a dir of same name with several files in it. I want some help in following:

1. How to create a Cloudscape database? Does Cloudscape have an editor or something to run sql commands?

2. I guess Cloudscape doesnt have a Database Administrator,etc to create databases like Oracle does, am I right?

3. Could someone also elaborate on what "service.properties" file mean w.r.t. a Cloudscape database.

Regards.
16 years ago
Hi All,

I have a data source created on an Oracle database. While a direct connection to oracle database is successful but when I do a test connection via data source, I perform the following steps which give error:

1. Given the data source's jndi name, i obtain its DataSource object.
2. Then i do:- dataSource.getConnection(userid, pswd)
3. This action gives the following error:

***** Error message *******
java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURLDSRA0010E: SQL State = null, Error Code = 17,067DSRA0010E: SQL State = null, Error Code = 17,067
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:861)
oracle.jdbc.pool.OracleDataSource.makeURL(OracleDataSource.java:1090)
oracle.jdbc.pool.OracleDataSource.getURL(OracleDataSource.java:837)
oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:106)
***** Error message ends ******

I suppose i need to specify info like driver type(thin/oci) but where do i set these details as all i can do is a getConnection on a DataSource object obtained.

Any quick pointers on this will be highly appreciated.

Regards.
Hi All,

Could please throw some light on the following doubts that i have:

1. I am using a Oracle "ojdbc14.jar" driver jar.

a. Is it right that it a thin driver?
b. If yes, but then when i do a test connection, it passes for both thin and thick(oci) URLs. How this possible?

2. For a test connection, i want to use a URL which should not require a server name value and this possible using oci(thick) driver URL.

So can i safely use (oci)thick driver URL for thin driver "ojdbc.jar"?

Please help me on this.

Thank you.
Hi,

I need to test connection to a machine given its user name and password.
I tried using java's URL and URLConnection but is there any way by which I can just test connection to the machine without really having to specify the file name in the URL as I am not really interested in file name.

Thanks
Hi All,

Does anyone know how to disable a TabItem of a TabFolder?

A TabFolder can be disabled but i am unable to figure out how to do the same for its particular TabItem...

Thanks and Regards,
Neha.
17 years ago
Hi All,

I require a Calendar widget, which I assume is not available as part of the SWT toolkit.

Also, does SWT class library have an equivalent for a Spinner widget in Swing?

There are Calendar and spinner custom widgets in SWT available on the net but they have certaim license issues...

Regards,
Neha
17 years ago
Hi All,

I have a created a wizard using Jface. One clicking on one of the buttons in the contents area(it is not the buttonBar button like NEXT etc), I display a TitleAreaDialog. Now my problem is that:

a.) For this TitleAreaDialog I have created a new Shell, is it okay for me to create a new Shell for this Dialog or I have a better option?

b.) I want that clicking on one button of the above mentioned TitleAreaDialog should display another TitleAreaDialog on top of it, is it possible to have one Dialog displayed over another? I dont think so but what other way can I do it?

Regards,
Neha
17 years ago
Hi All

I am looking for a multiple Item Selection widget(not like combolist)like Slush Bucket widgets (also known as the Twin Box design). I had read about it in the Eclipse ui guidelines but so far have been unable to obtain its code or a download. Has anyone used it before?

Also is there any support in SWT for creating Wizards?

Thanks and Regards
Neha
17 years ago
Hi All

I am interested in knowing the limitations or loop holes in SWT based UI programming,but couldnt find any. Does anyone know?

Also can anybody please let me know any exciting features( crazy things that can be done using SWT) of SWT apart from the usual stuff like native look n feel stuff?

Thank you

Regards
Neha
17 years ago