Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integrating Commmercial JDBC Drivers into JDeveloper 1

Status
Not open for further replies.

userpikachu

Programmer
Apr 10, 2001
1
CA
I am having trouble getting JDeveloper to locate a commercial JDBC driver. I have done everything suggested in the help files. When I create a connection JDeveloper tell me that it is unable to find the Driver. I have checked the installation of the driver on my system and can get it to work with a tool supplied by the company who developed the driver.

It just refuses to be recognized by JDeveloper. Does anyone have any suggestions? The Driver is for an SQL Server Database.
 
You may try to add an appropriate library to project properties
 
I have exactly the same problem with the Progress JDBC driver. I have followed the manual and added what I beleive to be the library to the project, but to no avail. I have managed to get the JDBC/ODBC bridge to work, but would rather just use JDBC. To give you an idea of the layout I have

c:\dlc\java contains the java.zip file
c:\dlc\bin contains the JdbcProgress.dll and JdbcProgress_g.dll

CLASSPATH=c:\dlc\bin
PATH=c:\dlc\bin;....

Any help would be appreciated.
 
Try this from the oracle site. It worked for me.

1. Edit the JDev_Home\bin\jdeveloper.ini file's IDE_Classpath
setting to include the directory location of the Sybase driver
archive file. This is the classpath that the IDE uses during
design-time.

2. From within the IDE, select Tools|Default Project Properties
and click the Libraries button on the Paths tab.

3. Click the New button to create a new library:
a. Enter a name for the library like 'Sybase Drivers' in the
name field.
b. Click the (...) button next to the Classpath field.
c. Click Add Zip/Jar and navigate to the location of the Sybase
Driver archive file. Select that archive.
d. Click OK to exit the libraries dialog.

4. For each project that you want to use the Sybase drivers for,
add the library to that project:
a. Select Project|Project Properties from the menu.
b. Click the 'Add' button next to the list of libraries, and
select the Sybase Drivers library you created in step 3.

If you want to use the Sybase drivers for every project, then
choose Tools|Default Project Properties instead of
Project|Project Properties in step 4a. This will make sure that
your Sybase Drivers are included for every new project you
create.

The order of the libraries makes a difference. You can select a
library in the project list and drag it up or down to re-order
it.
 
First, thank you to mjge for his answer on how to get JDev to see the commercial driver at design time.

Now a variant on the problem that seems to me to be a bug. If I 1) specify a connection with a specific driver and url, then 2) make a business component that relies on that connection, then 3) make a jsp to present the results of that database call and business logic, all is fine. However, if I change the connection (both the driver class and the url) and try again, only the changed url is acknowledged and the BC4J tries use that url with the original driver class I had specified. I am using the JVM argument -Djbo.debugoutput=console to see this.

A simple way for anyone to experience this is to do the above using the odbc driver, then change the connection to use the oracle thin driver. The console will report "no suitable driver" and show that it is using the ODBC driver with the thin driver url.

Am I doing something wrong? Is the connection driver getting stored somewhere else other than connection.properties? Any help would be appreciated.

Norm

 
The answer is in the first line of mjge's reponse. This is obviously a bug in Oracle JDeveloper. All you have to do is edit the ini file because the IDE is obviously not reading .jar's correctly.
 
Though I have yet to try JDeveloper (Like VisualAge for Java and use Netbeans at work) I would think that there should be a way for you to specify various jars to be included in your project and or ways to add them to your projects class path. It seams strange that you should have to edit your ini file so much. This would seam inconvenient especially if you are using a number of 3rd party jars or your own firms jars build by some other means.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top