diff --git a/derby-javacc5.patch b/derby-javacc5.patch
new file mode 100644
index 0000000000000000000000000000000000000000..3b3cb326c12ad61085045e31ee46a5771d0db556
--- /dev/null
+++ b/derby-javacc5.patch
@@ -0,0 +1,72 @@
+--- java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj.orig 2015-06-18 17:00:53.946356696 +0100
++++ java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj 2015-06-18 17:01:24.982950034 +0100
+@@ -12,6 +12,7 @@
+ CACHE_TOKENS = true;
+ UNICODE_INPUT = true;
+ JDK_VERSION = "1.5";
++ TOKEN_EXTENDS = "org.apache.derby.impl.sql.compile.TokenBase";
+ }
+
+ PARSER_BEGIN(SQLParser)
+--- java/engine/org/apache/derby/impl/sql/compile/TokenBase.java.orig 2014-06-09 14:54:14.096762143 +0100
++++ java/engine/org/apache/derby/impl/sql/compile/TokenBase.java 2014-06-09 14:54:58.672044878 +0100
+@@ -0,0 +1,35 @@
++/*
++
++Derby - Class org.apache.derby.impl.sql.compile.Token
++
++Licensed to the Apache Software Foundation (ASF) under one or more
++contributor license agreements. See the NOTICE file distributed with
++this work for additional information regarding copyright ownership.
++The ASF licenses this file to you under the Apache License, Version 2.0
++(the "License"); you may not use this file except in compliance with
++the License. You may obtain a copy of the License at
++
++http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
++
++*/
++
++package org.apache.derby.impl.sql.compile;
++
++/**
++ * Base class for the Token class generated by JavaCC.
++ */
++abstract class TokenBase {
++ /**
++ * beginOffset and endOffset are useful for siphoning substrings out of
++ * the Statement so that we can recompile the substrings at upgrade time.
++ * For instance, VIEW definitions and the Restrictions on Published Tables
++ * need to be recompiled at upgrade time.
++ */
++ int beginOffset, endOffset;
++}
+--- java/engine/org/apache/derby/impl/sql/build.xml.orig 2014-06-09 14:54:14.096762143 +0100
++++ java/engine/org/apache/derby/impl/sql/build.xml 2014-06-09 14:54:58.672044878 +0100
+@@ -57,11 +57,10 @@
+ Token.java
+ TokenMgrError.java
+
+- 3 of those files are checked into the codeline:
++ 2 of those files are checked into the codeline:
+
+ CharStream.java
+ ParseException.java
+- Token.java
+
+ We don't want generated code to clash with the checked-in versions. So
+ we delete the conflicting classes here.
+@@ -70,7 +69,6 @@
+
+
+
+-
+
+
+
+
diff --git a/derby-javacc.patch b/derby-javacc7.patch
similarity index 99%
rename from derby-javacc.patch
rename to derby-javacc7.patch
index 2e070b2f36c3afab3c7326de0e7b1c638b079c1b..7ab30f389b8b4440a8edb3ef5a7b44a6df19c4b1 100644
--- a/derby-javacc.patch
+++ b/derby-javacc7.patch
@@ -19,3 +19,4 @@
+ public boolean getTrackLineColumn() { return trackLineColumn; }
+ public void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; }
}
+
diff --git a/derby-lucene.patch b/derby-lucene.patch
index 97d74c0cae265a68fab782bd14d9ffaa0e2e6230..a24addb87f6c7383df4e924e8f0094ad9c6c09fe 100644
--- a/derby-lucene.patch
+++ b/derby-lucene.patch
@@ -1,6 +1,34 @@
---- java/optional/org/apache/derby/optional/api/LuceneUtils.java.orig 2015-06-18 17:39:57.626721793 +0100
-+++ java/optional/org/apache/derby/optional/api/LuceneUtils.java 2015-06-18 17:40:24.430371127 +0100
-@@ -108,21 +108,7 @@
+--- build.xml 2016-09-27 18:40:46.000000000 +0200
++++ build.xml 2017-09-20 17:06:06.173755242 +0200
+@@ -48,7 +48,7 @@
+
+
+
+
+@@ -1735,7 +1735,6 @@
+
+
+
+-
+
+
+ - 10.14.2.0-2
+- Fix build failure caused by javacc updated
+
* Fri Dec 1 2023 dillon chen - 10.14.2.0-1
- Update to 10.14.2.0 for fix CVE-2023-48284(patch from debian)