Forums Register Login

JDBC and Pointbase

+Pie Number of slices to send: Send
I recently installed J2EE 1.4 and this has Pointbase 4.6.
I can see that it has three jars (for Drievr, I guess):
pbclient.jar
pbembedded.jar
pbtools.jar
Now I wrote a dumbest Java program to access one of it's table called EMP.
I can see that the URL of the database is:
jdbc :pointbase ev (as displayed as node in PointBase Console) and it's on port 9092.
Please see the program below:

I'm getting various errors. First of all, it's not recognizing Driver and then it's saying that database DEV doesn't exist.
Please tell me what Settings do I need to make in CLASSPATH, javac, java etc.
And how to successfully run it...
Thanks in advance..
Rajeev.
[ May 10, 2004: Message edited by: Jeanne Boyarsky ]
+Pie Number of slices to send: Send
Why is it converting colon into faces?

(edited to remove cursing)
[ May 10, 2004: Message edited by: Jeanne Boyarsky ]
+Pie Number of slices to send: Send
Rajeev,
You need to check the disable smilies checkbox at the bottom of the posting page. (I edited it for you to do that.) In the future, you can always go back and edit your own post to do the same thing if you realize it afterwards.
+Pie Number of slices to send: Send
Rajeev,
Now on to your question:
The first thing you need to do is put all that code in one large try/catch block instead of a bunch of little ones. Otherwise, you run into a problem when an early thing fails. For example, if it can't find the driver, you don't want it trying to connect.
You need to double check that the driver is in your classpath. Are you using an IDE? Sometimes these things need to be set up in multiple places.
+Pie Number of slices to send: Send
 

Originally posted by Jeanne Boyarsky:
Rajeev,
Now on to your question:
The first thing you need to do is put all that code in one large try/catch block instead of a bunch of little ones. Otherwise, you run into a problem when an early thing fails. For example, if it can't find the driver, you don't want it trying to connect.
You need to double check that the driver is in your classpath. Are you using an IDE? Sometimes these things need to be set up in multiple places.


Thanks for the advise, I did following:
1. Changed the code to put a single try block.
2. Added pmembedded.jar in CLASSPATH. There are 2 more jars - pmclient.jar and pmtools.jar
3. Compiled source
4. When I tried to run it, it gave error that "No suitable driver".
What should I do now...
Thanks..
BTW, the code is
+Pie Number of slices to send: Send
Rajeev,
Sun has this error listed in their FAQ. It is probably a problem with your URL string.
+Pie Number of slices to send: Send
 

Originally posted by Jeanne Boyarsky:
Rajeev,
Sun has this error listed in their FAQ. It is probably a problem with your URL string.


It worked after I used pbembedded.jar instead of pbclient.jar.
I don't know why (may be the actual driver is inside this pbembedded.jar).
But is there a way to check whether a driver is in a particular jar?
+Pie Number of slices to send: Send
Rajeev,
A jar file is the same format as a zip file. So you can unjar/unzip it and look to see if the class is in the file. If you have Winzip, the preview mode lets you see an alphabetical list of all the files without having to unzip it.
+Pie Number of slices to send: Send
 

Originally posted by Jeanne Boyarsky:
Rajeev,
A jar file is the same format as a zip file. So you can unjar/unzip it and look to see if the class is in the file. If you have Winzip, the preview mode lets you see an alphabetical list of all the files without having to unzip it.



Thanks Jeanne....I saw what you are saying..

I have a related question. Are URLs different for a standalone Java program and a Java program that is deployed in Application Server? How to find what URL to use? Also, can the same driver be used for different URLs?
[ May 13, 2004: Message edited by: Rajeev Asthana ]
+Pie Number of slices to send: Send
Rajeev,
No the URLs are not different. Some drivers have specific urls. For example, Oracle has a piece of the URL that specifies if you are using a thin driver.
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1414 times.
Similar Threads
Trouble Displaying all the data
Problem using DataSource with core java app
VAJ & lotus jdbc domino database access problem
VAJ & lotus jdbc domino database access problem
DATABASE OBJECT-- URGENT URGENT
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 00:27:51.