There is nothing special about the jdbc driver library. I guess that you
have added the jar from the IDE(netbeans), but did not include the
necessary libraries(jdbc driver in this case) in the TableAccess.jar.
The standard way is to include the dependent jars in the project's jar
under the lib directory. For example:
example.jar
-> META-INF
-> com/...
-> lib/postgres.jar
-> lib/abc.jar
If your classpath is correct, check whether you call
DBConfiguration.configureDB() with the correct driver class and url.
sandhiya wrote:
Hi,
I'm using postgresql and the driver is not getting detected. How do you run
it in the first place? I just typed
bin/hadoop jar /root/sandy/netbeans/TableAccess/dist/TableAccess.jar
at the terminal without the quotes. I didnt copy any files from my local
drives into the Hadoop file system. I get an error like this :
java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.postgresql.Driver
and then the complete stack trace....
Am i doing something wrong?
I downloaded a jar file for postgresql jdbc support and included it in my
Libraries folder (I'm using NetBeans).
please help....
Fredrik Hedberg-3 wrote:
Hi,
Although it's not MySQL; this might be of use:
http://svn.apache.org/repos/asf/hadoop/core/trunk/src/examples/org/apache/hadoop/examples/DBCountPageView.java
Fredrik
On Feb 16, 2009, at 8:33 AM, sandhiya wrote:
@Amandeep
Hi,
I'm new to Hadoop and am trying to run a simple database connectivity
program on it. Could you please tell me how u went about it?? my
mail id is
"sandys_cr...@yahoo.com" . A copy of your code that successfully
connected
to MySQL will also be helpful.
Thanks,
Sandhiya
Enis Soztutar-2 wrote:
From the exception :
java.io.IOException: ORA-00933: SQL command not properly ended
I would broadly guess that Oracle JDBC driver might be complaining
that
the statement does not end with ";", or something similar. you can
1. download the latest source code of hadoop
2. add a print statement printing the query (probably in
DBInputFormat:119)
3. build hadoop jar
4. use the new hadoop jar to see the actual SQL query
5. run the query on Oracle if is gives an error.
Enis
Amandeep Khurana wrote:
Ok. I created the same database in a MySQL database and ran the same
hadoop
job against it. It worked. So, that means there is some Oracle
specific
issue. It cant be an issue with the JDBC drivers since I am using
the
same
drivers in a simple JDBC client.
What could it be?
Amandeep
Amandeep Khurana
Computer Science Graduate Student
University of California, Santa Cruz
On Wed, Feb 4, 2009 at 10:26 AM, Amandeep Khurana <ama...@gmail.com>
wrote:
Ok. I'm not sure if I got it correct. Are you saying, I should
test the
statement that hadoop creates directly with the database?
Amandeep
Amandeep Khurana
Computer Science Graduate Student
University of California, Santa Cruz
On Wed, Feb 4, 2009 at 7:13 AM, Enis Soztutar <enis....@gmail.com>
wrote:
Hadoop-2536 connects to the db via JDBC, so in theory it should
work
with
proper jdbc drivers.
It has been tested against MySQL, Hsqldb, and PostreSQL, but not
Oracle.
To answer your earlier question, the actual SQL statements might
not be
recognized by Oracle, so I suggest the best way to test this is to
insert
print statements, and run the actual SQL statements against
Oracle to
see if
the syntax is accepted.
We would appreciate if you publish your results.
Enis
Amandeep Khurana wrote:
Does the patch HADOOP-2536 support connecting to Oracle
databases as
well?
Or is it just limited to MySQL?
Amandeep
Amandeep Khurana
Computer Science Graduate Student
University of California, Santa Cruz
--
View this message in context:
http://www.nabble.com/HADOOP-2536-supports-Oracle-too--tp21823199p22032715.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.