I am using
OS: Ubuntu 22.04
DB: Postgresql V14
DSPACE-CRIS: V7.5
Describe the bug
launching the command ./dspace dsrun org.dspace.app.util.InitializeEntityTypesOnly -d throw an error
To Reproduce
After successfully migrated the DB
./dspace database migrate
Database URL: jdbc:postgresql://localhost:5432/dspace
Migrating database to latest version... (Check dspace logs for details)
Done.
Steps to reproduce the behavior:
launching this command ./dspace dsrun org.dspace.app.util.InitializeEntityTypesOnly -d from terminal
then this error appear
Exception: Cannot invoke "org.dspace.core.DBConnection.getSession()" because the return value of "org.dspace.core.Context.getDBConnection()" is null
java.lang.NullPointerException: Cannot invoke "org.dspace.core.DBConnection.getSession()" because the return value of "org.dspace.core.Context.getDBConnection()" is null
at org.dspace.core.AbstractHibernateDAO.getHibernateSession(AbstractHibernateDAO.java:59)
at org.dspace.core.AbstractHibernateDAO.getCriteriaBuilder(AbstractHibernateDAO.java:394)
at org.dspace.content.dao.impl.EntityTypeDAOImpl.findByEntityType(EntityTypeDAOImpl.java:37)
at org.dspace.content.EntityTypeServiceImpl.findByEntityType(EntityTypeServiceImpl.java:57)
at org.dspace.app.util.InitializeEntityTypesOnly.assureExists(InitializeEntityTypesOnly.java:91)
at org.dspace.app.util.InitializeEntityTypesOnly.main(InitializeEntityTypesOnly.java:64)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:297)
at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:152)
at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:124)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:99)
Expected behavior
To run successfully and define Entities for dspace-cris
I am using OS: Ubuntu 22.04 DB: Postgresql V14 DSPACE-CRIS: V7.5
Describe the bug launching the command
./dspace dsrun org.dspace.app.util.InitializeEntityTypesOnly -d
throw an errorTo Reproduce After successfully migrated the DB
Steps to reproduce the behavior: launching this command
./dspace dsrun org.dspace.app.util.InitializeEntityTypesOnly -d
from terminalthen this error appear
Expected behavior To run successfully and define Entities for dspace-cris