Problem upgrading from 5.2 to 5.3

172 views
Skip to first unread message

ofuuzo ofuuzo

unread,
Aug 24, 2021, 5:41:29 AM8/24/21
to Dataverse Users Community
Hi,
Am get the following error message when upgrading from Dataverse 5.2 to  5.3:
remote failure: Error occurred during deployment: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.7.payara-p3): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: FATAL: database "null" does not exist
Error Code: 0. Please see server.log for more details.

What I have done.
Update the database connection (domain.xml):
/usr/local/payara5/bin/asadmin create-system-properties "dataverse.db.user=xxxuser"
/usr/local/payara5/bin/asadmin  create-system-properties "dataverse.db.host=localhost"
/usr/local/payara5/bin/asadmin  create-system-properties "dataverse.db.port=5432"
/usr/local/payara5/bin/asadmin create-system-properties "dataverse.db.name=xxxdb"

echo "AS_ADMIN_ALIASPASSWORD=xxxpassword" >  /tmp/password.txt
/usr/local/payara5/bin/asadmin create-password-alias --passwordfile /tmp/password.txt dataverse.db.password                                               
rm  -rf /tmp/password.txt

Replace  from the GF4 version of domain.xml:
   <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" name="__TimerPool" res-type="javax.sql.XADataSource">
      <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property>
      <property name="connectionAttributes" value=";create=true"></property>
    </jdbc-connection-pool>

with P5 version of domain.xml:
    <jdbc-connection-pool datasource-classname="org.h2.jdbcx.JdbcDataSource" name="__TimerPool" res-type="javax.sql.XADataSource">
      <property name="URL" value="jdbc:h2:${com.sun.aas.instanceRoot}/lib/databases/ejbtimer;AUTO_SERVER=TRUE"></property>
    </jdbc-connection-pool>


Copied  postgresql-42.2.23.jar and postgresql-42.2.12.jar to /usr/local/payara5/glassfish/lib 

The log file says:
...
[2021-08-24T02:29:21.323+0200] [Payara 5.2020.6] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=87 _ThreadName=admin-thread-pool::admin-listener(3)] [timeMillis: 1629764961323] [levelValue: 800] [[
  visiting unvisited references]]

[2021-08-24T02:29:21.324+0200] [Payara 5.2020.6] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=87 _ThreadName=admin-thread-pool::admin-listener(3)] [timeMillis: 1629764961324] [levelValue: 800] [[
  visiting unvisited references]]
...

I have tried to install dataverse 5.3 with Payara-5.2020.7 and Payara-5.2021.6 and no luck. What am I doing wrong here? I upgraded from 5.2 to 5.3 on our test server some weeks ago and everything went fine.

Cheers
Obi

Don Sizemore

unread,
Aug 24, 2021, 7:34:01 AM8/24/21
to dataverse...@googlegroups.com
Hello,

As of version 5.3 the PostgreSQL JDBC driver should be built into the warfile and you shouldn't need to copy them into lib/ any more.

I have only two small things to suggest: double-check that asadmin wrote the jvm-options into domain.xml correctly, as I expect you've already done, and be sure to stop and start Payara before deploying so that those new jvm-options get read at launch?

Don
 

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/d919430e-dad1-4dfb-8009-d58fedee181dn%40googlegroups.com.

ofuuzo ofuuzo

unread,
Aug 24, 2021, 12:20:04 PM8/24/21
to Dataverse Users Community
Thanks Don.
This works for me:
  Undeploy dataverse 5.2 & stop Payara5
  Download payara-5.2021.6.zip (new)
 Copy old Payara5's  domain1 to new Payara5's /glassfish/domains/
 rm -rf  /usr/local/payara5/glassfish/domains/domain1/generated   && rm -rf /usr/local/payara5/glassfish/domains/domain1/lib/databases/ejbtimer && rm -rf /usr/local/payara5/glassfish/domains/domain1/osgi-cache


Postgres driver (binary jar) MUST be in ../payara5/glassfish/lib/ for it to work. I have tested several times with or without Postgres jar. It fails when there is no postgres driver. I have used these two. I do not know the one doing the job. We are running postgresql-9.6.

Cheers
Obi
 

Don Sizemore

unread,
Aug 24, 2021, 12:23:14 PM8/24/21
to dataverse...@googlegroups.com
Interesting.

The PostgreSQL JDBC driver is/was supposed to be backwards compatible back to version 8(?) but I'm wondering if the version included in pom.xml only reaches back to major version 10 for whatever reason.

In any case, I'm glad to hear you're back up and running.

Don


James Myers

unread,
Aug 24, 2021, 12:29:30 PM8/24/21
to dataverse...@googlegroups.com

FWIW: At QDR, we have 5.2021.5 running Dataverse 5.6 on postgres 9.6 without any postgres jar in /usr/local/payara5/glassfish/lib. (We did do the steps to change the db configuration at v5.3.)

 

-- Jim

Reply all
Reply to author
Forward
0 new messages