[ARTEMIS-2814]: java.sql.SQLException: Couldn't access

org.postgresql.largeobject.LargeObject.

 * Fixing reflection code

Issue: https://issues.apache.org/jira/browse/ARTEMIS-2814
This commit is contained in:
Emmanuel Hugonnet 2020-06-19 14:50:38 +02:00 committed by Clebert Suconic
parent 09bd8e711b
commit 38cb05c079
1 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ public class PostgresLargeObjectManager {
public void seek(Object largeObject, int position) throws SQLException {
if (shouldUseReflection) {
try {
Method method = largeObject.getClass().getMethod("seek", Integer.class);
Method method = largeObject.getClass().getMethod("seek", int.class);
method.invoke(largeObject, position);
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
throw new SQLException("Couldn't access org.postgresql.largeobject.LargeObject", ex);
@ -152,7 +152,7 @@ public class PostgresLargeObjectManager {
public void truncate(Object largeObject, int position) throws SQLException {
if (shouldUseReflection) {
try {
Method method = largeObject.getClass().getMethod("truncate", Integer.class);
Method method = largeObject.getClass().getMethod("truncate", int.class);
method.invoke(largeObject, position);
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
throw new SQLException("Couldn't access org.postgresql.largeobject.LargeObject", ex);