Skip to content

Commit

Permalink
Oracle21Platform unused field removal to fix JPA remote test (#1688)
Browse files Browse the repository at this point in the history
This change fixes issue which happens if EntityManager API using a remote EntityManager and org.eclipse.persistence.platform.database.oracle.Oracle21Platform is specified.
org.eclipse.persistence.platform.database.oracle.Oracle21Platform had private final OracleJsonFactory factory; field which wasn't used but is serialized via RMI if remote EntityManager is used.
With this field following exception was thrown:

...
Internal Exception: java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: oracle.sql.json.OracleJsonFactory
[INFO] 
[ERROR] Tests run: 106, Failures: 1, Errors: 99, Skipped: 0



Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman committed Sep 5, 2022
1 parent ee3961f commit 301e95a
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.Map;

import oracle.jdbc.OracleType;
import oracle.sql.json.OracleJsonFactory;
import oracle.sql.json.OracleJsonValue;
import org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition;
import org.eclipse.persistence.internal.sessions.AbstractSession;
Expand All @@ -34,15 +33,11 @@
*/
public class Oracle21Platform extends Oracle19Platform {

// Oracle JSON factory.
private final OracleJsonFactory factory;

/**
* Creates an instance of Oracle 21c database platform.
*/
public Oracle21Platform() {
super();
this.factory = new OracleJsonFactory();
}

/**
Expand Down

0 comments on commit 301e95a

Please sign in to comment.