Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-5239][CORE]JdbcRDD throws "java.lang.AbstractMethodError: oracle.jdbc.driver.xxxxxx.isClosed()Z" #4033

Closed
wants to merge 1 commit into from

Conversation

luogankun
Copy link
Contributor

rs.isClosed() will throws:

Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.OracleResultSetImpl.isClosed()Z

Similarly,stmt.isClosed() will throws

Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.T4CPreparedStatement.isClosed()Z

Above exception is throwing because "isClosed()" is not implemented in the "OracleResultSetImpl" class which implements the ResultSet Interface in Ojdbc14.jar, I think use below condition to check whether resultset is null or not is enough

if (null != rs) { 
    rs.close()
}

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@srowen
Copy link
Member

srowen commented Jan 14, 2015

See comment in JIRA; this should not be hacked around because the JDBC driver is unsuitable.

@srowen
Copy link
Member

srowen commented Feb 6, 2015

I take it back (see https://issues.apache.org/jira/browse/SPARK-5481) Yes, there's evidence of JDBC 3 drivers in the wild, still, and because I confirmed that close()ing these three objects is required to be a no-op if already closed, so, this really can't hurt.

Similar changes should be made in JDBCRDD.scala in Spark SQL. Could you update the PR to address that too?

@srowen
Copy link
Member

srowen commented Feb 8, 2015

@luogankun do you want to augment this PR to include JDBCRDD.scala too? I can do so if you're not available but wanted to give you the opportunity.

@srowen
Copy link
Member

srowen commented Feb 8, 2015

ok to test

@SparkQA
Copy link

SparkQA commented Feb 8, 2015

Test build #27040 has started for PR 4033 at commit d8c61d6.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Feb 8, 2015

Test build #27040 has finished for PR 4033 at commit d8c61d6.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27040/
Test PASSed.

@luogankun
Copy link
Contributor Author

Close the PR.

@luogankun luogankun closed this Feb 9, 2015
@srowen
Copy link
Member

srowen commented Feb 9, 2015

@luogankun are you going to make a new PR? or are you asking me to do so? you can just reopen and add to this PR.

@luogankun
Copy link
Contributor Author

@srowen To do other things, forgot to resubmit a new PR after close the PR. Thanks for your help.

@srowen
Copy link
Member

srowen commented Feb 9, 2015

NP I will assign to you @luogankun in any event for the credit. Right now the new PR fails Hive tests, twice, which is suspicious, though I can't see how it would affect behavior. I'm waiting to see if it's just flakiness or a real problem.

@luogankun
Copy link
Contributor Author

The stacktrace message of all failure testcase are: sbt.ForkMain$ForkError: Futures timed out after [1 minute], whether related Jenkins?

asfgit pushed a commit that referenced this pull request Feb 10, 2015
…le.jdbc.driver.xxxxxx.isClosed()Z"

This is a completion of #4033 which was withdrawn for some reason.

Author: Sean Owen <sowen@cloudera.com>

Closes #4470 from srowen/SPARK-5239.2 and squashes the following commits:

2398bde [Sean Owen] Avoid use of JDBC4-only isClosed()

(cherry picked from commit 2d1e916)
Signed-off-by: Sean Owen <sowen@cloudera.com>
asfgit pushed a commit that referenced this pull request Feb 10, 2015
…le.jdbc.driver.xxxxxx.isClosed()Z"

This is a completion of #4033 which was withdrawn for some reason.

Author: Sean Owen <sowen@cloudera.com>

Closes #4470 from srowen/SPARK-5239.2 and squashes the following commits:

2398bde [Sean Owen] Avoid use of JDBC4-only isClosed()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants