You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2014/06/28 04:02:24 UTC

[jira] [Commented] (OOZIE-1907) DB upgrade from 3.3.0 to trunk fails on derby

    [ https://issues.apache.org/jira/browse/OOZIE-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14046646#comment-14046646 ] 

Hadoop QA commented on OOZIE-1907:
----------------------------------

Testing JIRA OOZIE-1907

Cleaning local git workspace

----------------------------

{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:red}-1 RAW_PATCH_ANALYSIS{color}
.    {color:green}+1{color} the patch does not introduce any @author tags
.    {color:green}+1{color} the patch does not introduce any tabs
.    {color:green}+1{color} the patch does not introduce any trailing spaces
.    {color:green}+1{color} the patch does not introduce any line longer than 132
.    {color:red}-1{color} the patch does not add/modify any testcase
{color:green}+1 RAT{color}
.    {color:green}+1{color} the patch does not seem to introduce new RAT warnings
{color:green}+1 JAVADOC{color}
.    {color:green}+1{color} the patch does not seem to introduce new Javadoc warnings
{color:green}+1 COMPILE{color}
.    {color:green}+1{color} HEAD compiles
.    {color:green}+1{color} patch compiles
.    {color:green}+1{color} the patch does not seem to introduce new javac warnings
{color:green}+1 BACKWARDS_COMPATIBILITY{color}
.    {color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations
.    {color:green}+1{color} the patch does not modify JPA files
{color:red}-1 TESTS{color}
.    Tests run: 1499
.    Tests failed: 3
.    Tests errors: 0

.    The patch failed the following testcases:

.      testActionInputCheckLatestActionCreationTime(org.apache.oozie.command.coord.TestCoordActionInputCheckXCommandNonUTC)
.      testBundleEngineKill(org.apache.oozie.servlet.TestV1JobServletBundleEngine)
.      testBundleEngineResume(org.apache.oozie.servlet.TestV1JobServletBundleEngine)

{color:green}+1 DISTRO{color}
.    {color:green}+1{color} distro tarball builds with the patch 

----------------------------
{color:red}*-1 Overall result, please check the reported -1(s)*{color}


The full output of the test-patch run is available at

.   https://builds.apache.org/job/oozie-trunk-precommit-build/1337/

> DB upgrade from 3.3.0 to trunk fails on derby
> ---------------------------------------------
>
>                 Key: OOZIE-1907
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1907
>             Project: Oozie
>          Issue Type: Bug
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>            Priority: Blocker
>         Attachments: OOZIE-1907.patch
>
>
> In OOZIE-1674, we saw that there were a few problems upgrading the database from DB version 1 (Oozie 3) to DB version 3 (trunk) with Postgres.  It looks like a problem similar to [the second problem described in this comment on OOZIE-1674|https://issues.apache.org/jira/browse/OOZIE-1674?focusedCommentId=13878240&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13878240] also applies to Derby when the database has content in it.  I must have previously tested this with an empty database, because that doesn't run into the problem.  
> Here's the error you get:
> {noformat}
> ...
> Update db.version in OOZIE_SYS table to 3
> DONE
> Converting clob columns to blob for all tables
> Error: An attempt was made to get a data value of type 'java.sql.Clob' from a data value of type 'BLOB'.
> Stack trace for the error was (for debug purposes):
> --------------------------------------
> java.sql.SQLDataException: An attempt was made to get a data value of type 'java.sql.Clob' from a data value of type 'BLOB'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedResultSet.dataTypeConversion(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedResultSet.getClob(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedResultSet.getClob(Unknown Source)
> 	at org.apache.oozie.tools.OozieDBCLI.convertClobToBlobinDerby(OozieDBCLI.java:616)
> 	at org.apache.oozie.tools.OozieDBCLI.ddlTweaksFor50(OozieDBCLI.java:679)
> 	at org.apache.oozie.tools.OozieDBCLI.upgradeDBto50(OozieDBCLI.java:239)
> 	at org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:219)
> 	at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:128)
> 	at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:76)
> Caused by: java.sql.SQLException: An attempt was made to get a data value of type 'java.sql.Clob' from a data value of type 'BLOB'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> 	... 15 more
> --------------------------------------
> {noformat}
> This happens due to the {{push_missing_dependencies}} column already being a BLOB when the update tool is expecting it to be a CLOB.  When you upgrade from Oozie 3 (DB version 1) to Oozie 4 (DB version 2), the Oozie 4 db tool creates the column as a CLOB; then when you upgrade to trunk (DB version 3), the trunk db tool converts it to a BLOB.  However, when you upgrade directly from Oozie 3 (DB version 1) to trunk (DB version 3), the trunk db tool runs through both upgrade procedures but during the "Oozie 4 (DB version 2)" upgrade, the column is created as a BLOB already.
> We can fix this in the same way we fixed in it OOZIE-1674.



--
This message was sent by Atlassian JIRA
(v6.2#6252)