You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <ji...@apache.org> on 2010/10/06 18:06:31 UTC

[jira] Created: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
-----------------------------------------------------------------------------------------------------------

                 Key: DERBY-4835
                 URL: https://issues.apache.org/jira/browse/DERBY-4835
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.6.1.0
            Reporter: Kathey Marsden


Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.

ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
     time_stamp,min_max_size )
 VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))

java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;

	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)

	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)

	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)

	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)

	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)

	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)

	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)

	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)

	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)

	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)

	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)

	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)

	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)

	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)

	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)

	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)

	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)

	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)

	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)

	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)

	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)

	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)

	at org.apache.derby.tools.ij.main(Unknown Source)

Cleanup action completed

To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:

connect 'jdbc:derby:wombat;upgrade=true';
 
INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
ethodError'.


I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
				bootingDictionary.updateMetadataSPSes(tc);
			else
				bootingDictionary.clearSPSPlans();

Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.

To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql






-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919414#action_12919414 ] 

Knut Anders Hatlen commented on DERBY-4835:
-------------------------------------------

Thanks for writing the fix and the test case, Mamta.

Does the patch also fix the case where a database is first upgraded to 10.6.[12] and then to 10.6.3? Or would the users still need to drop and recreate the triggers in that case?

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, DERBY4835_patch1_diff.txt, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918685#action_12918685 ] 

Kathey Marsden commented on DERBY-4835:
---------------------------------------

Yes Mike, you are right.  The last digit should be bumped on the branches when this is backported so that upgrade gets triggered.

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919627#action_12919627 ] 

Knut Anders Hatlen commented on DERBY-4835:
-------------------------------------------

Thanks Mamta. My question was a bit unclear. Here's what I meant to ask:

After this fix has been backported to 10.6 and goes into a release (let's say 10.6.3.x), will it also fix the upgrade path 10.5.x -> 10.6.2.1 -> 10.6.3.x? Or will it only fix upgrades directly from 10.5.x to 10.6.3.x?

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, DERBY4835_patch1_diff.txt, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919912#action_12919912 ] 

Mamta A. Satoor commented on DERBY-4835:
----------------------------------------

Yes, if the user upgraded from 10.6.2.1->10.6.3.x, that will fix the trigger problem because they will get invalidated during the upgrade. I double checked that by trying it here in my codeline. ie I created the db with 10.5.x, upgraded it to 10.6.2.1 and saw the trigger fail. Backported the change to my 10.6 codeline and bumped the release number and then upgraded the db again with those changes and the trigger worked fine.

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.7.0.0
>
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, DERBY4835_patch1_diff.txt, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali updated DERBY-4835:
----------------------------------


will it be necessary to bump the version number once this fix is applied to catch cases where users have already passed through the "bad" upgrade path in order to force it through the minor upgrade path code again?

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-4835:
----------------------------------

    Attachment:     (was: workaround.sql)

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.7.0.0
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-4835:
-----------------------------------

    Attachment: DERBY4835_patch1_diff.txt

Attaching a patch to fix the problem.

The problem was that the clearing of stored statements during the upgrade was conditional. The clearing should happen 
unconditionally during upgrade. Unconditional clearing of SPSes has fixed the problem with this jira.

Also, added a test in upgrade suite for triggers. The test has been added to BasicSetup.java which will ensure that this trigger
test will automatically get run with even future releases.

If there are no objections, I will go ahead and commit this early next week and backport it to 10.6 and 10.5 releases(10.5 is when the SPS clearing became conditional at the uprgrade time.)

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, DERBY4835_patch1_diff.txt, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-4835:
-----------------------------------

    Fix Version/s: 10.5.3.2

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.5.3.2, 10.7.0.0, 10.6.2.3
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-4835:
-----------------------------------

    Fix Version/s: 10.7.0.0

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.7.0.0
>
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, DERBY4835_patch1_diff.txt, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-4835:
-----------------------------------

    Fix Version/s: 10.6.2.3

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.7.0.0, 10.6.2.3
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor reassigned DERBY-4835:
--------------------------------------

    Assignee: Mamta A. Satoor

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.0.0
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-4835:
----------------------------------

    Attachment:     (was: 10_6_1_work.sql)

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.7.0.0
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-4835:
----------------------------------

    Attachment:     (was: 10_5_3_work.sql)

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.7.0.0
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920014#action_12920014 ] 

Kathey Marsden commented on DERBY-4835:
---------------------------------------

I removed the scripts from the user case and am replacing with a link to the email thread.
http://old.nabble.com/Problem!-tt29737134.html#a29894020

Mamta did not need the user case to put a test in the regression suite, so no Apache grant is needed.



> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>             Fix For: 10.7.0.0
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor resolved DERBY-4835.
------------------------------------

    Resolution: Fixed

Thanks to Mamatha for providing a stand alone test case.

Also, credit for the jira really goes to Kathey since she pointed out exactly what part of the code needed to be fixed. 

The fix now is in all the affected releases so I will go ahead and resolve the issue.

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.0.0
>
>         Attachments: DERBY4835_patch1_diff.txt
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919507#action_12919507 ] 

Mamta A. Satoor commented on DERBY-4835:
----------------------------------------

Knut, I plan to backport this change to 10.6 this upcoming week. If the user upgrades to that release, then they don't need to drop and recreate the triggers. 

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, DERBY4835_patch1_diff.txt, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-4835:
----------------------------------

    Attachment: workaround.sql
                10_6_1_work.sql
                10_5_3_work.sql

scripts to recreate the issue. 
Run 10_5_3_work.sql with 10.5.3.0 release
Run 10_6_1_work.sql with 10.6.1.0 release

workaround.sql contains the commands to drop and recreate the trigger with 10.6 which will work around the problem.


> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4835) Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing java.lang.NoSuchMethodError

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919398#action_12919398 ] 

Mamta A. Satoor commented on DERBY-4835:
----------------------------------------

Wanted to mention that I have verified that the new test for trigger will fail as part of the upgrade suite if the accompanying code changes are not made. So, the patch has the needed test coverage for the code changes.

> Trigger plan does not recompile with upgrade from 10.5.3.0 to 10.6.1.0 causing  java.lang.NoSuchMethodError
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4835
>                 URL: https://issues.apache.org/jira/browse/DERBY-4835
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Kathey Marsden
>         Attachments: 10_5_3_work.sql, 10_6_1_work.sql, DERBY4835_patch1_diff.txt, workaround.sql
>
>
> Trigger plan does not recompile on upgrade from 10.5.3.0 to 10.6.1.0  causing the following exception  the first time the trigger is fired after upgrade.
> ATABASE = wombat), (DRDAID = null), Failed Statement is: INSERT INTO tidlggls(blt_number,create_date,update_date,propagation_date,glossary_status,
>      time_stamp,min_max_size )
>  VALUES ( (select max(blt_number) from tidlrblt), CURRENT_DATE,
> CURRENT_DATE, CURRENT_DATE, '00' , CURRENT_TIMESTAMP, (select min_max_size from tidlrblt where blt_number = (select max(blt_number) from tidlrblt)))
> java.lang.NoSuchMethodError: org/apache/derby/iapi/sql/execute/ResultSetFactory.getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMethod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.g0(Unknown Source)
> 	at org.apache.derby.exe.acf81e0010x012bx823cxd0d3x00000026c4a00.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.StatementTriggerExecutor.fireTrigger(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
> 	at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
> 	at org.apache.derby.tools.ij.main(Unknown Source)
> Cleanup action completed
> To reproduce, run the attached script 10_5_3_work.sql with the 10.5.3.0  release and then connect with 10.6.1.0 and insert into the table with the trigger:
> connect 'jdbc:derby:wombat;upgrade=true';
>  
> INSERT INTO tidlrblt(BLT,BLT_SIZE,MIN_MAX_SIZE) VALUES('Mamatha Testing2', 15, 20);
> ERROR XJ001: Java exception: 'org/apache/derby/iapi/sql/execute/ResultSetFactory
> .getProjectRestrictResultSet(Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;L
> org/apache/derby/iapi/services/loader/GeneratedMethod;Lorg/apache/derby/iapi/ser
> vices/loader/GeneratedMethod;ILorg/apache/derby/iapi/services/loader/GeneratedMe
> thod;IZZDD)Lorg/apache/derby/iapi/sql/execute/NoPutResultSet;: java.lang.NoSuchM
> ethodError'.
> I think this may be related to the DERBY-1107 change in handleMinorRevisionChange which has the code:
> if (fromVersion.majorVersionNumber >= DataDictionary.DD_VERSION_DERBY_10_5)
> 				bootingDictionary.updateMetadataSPSes(tc);
> 			else
> 				bootingDictionary.clearSPSPlans();
> Likely, clearSPSPlans() should not be in the else clause but rather executed unconditionally.
> To work around the issue, after connecting with 10.6.1, drop and recreate the trigger as in workaround.sql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.