1

I've took care of the migration from GlassFish 2 to GlassFish Payara for an application that uses toplink.

While the application was running on GlassFish 2 the dependency for toplink was written in the pom file like this:

<dependency>
  <groupId>toplink.essentials</groupId>
  <artifactId>toplink-essentials</artifactId>
  <scope>provided</scope>
</dependency>

Now, I can see that toplink is no longer available by default in GlassFish Payara, so I've changed the dependency like this:

<dependency>
  <groupId>toplink.essentials</groupId>
  <artifactId>toplink-essentials</artifactId>
</dependency>

But, after doing so I keep receiving the following error:

Caused by: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "key" at line 1, column 8.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement42.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver42.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.iapi.jdbc.BrokeredConnection.prepareStatement(Unknown Source)
at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:586)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:255)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:52)
at com.sun.gjc.spi.ManagedConnectionImpl.prepareCachedStatement(ManagedConnectionImpl.java:992)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareStatement(ConnectionWrapper40.java:173)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1162)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:612)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:485)
... 145 more

And it looks like somehow the application tries to connect to Derby database, even though I've setup the connection for an Oracle database and the database is available and responds to ping.

It anyone has ever encountered a similar problem and can help me, I would be really grateful.

OndroMih
  • 7,280
  • 1
  • 26
  • 44
Alina Blaj
  • 11
  • 2
  • Are you unable to use Eclipselink? If you were using Oracle GlassFish, it will have features in it that are not in Payara Server, because the Payara Server project is open source and completely separate from Oracle. You could always contact the Payara team directly for assistance. – Mike Nov 08 '16 at 14:54

0 Answers0