Hi Zikrul,

All you need to fix it without having to recreate the pgcrypto extension 
using the second method is by adding it into the search path by one of 
these commands (  *psql --username=postgres dspace -c 'ALTER ROLE dspace IN 
DATABASE dspace SET search_path = "$user",public,extensions,pgcrypto;'* ) 
or (  *psql --username=postgres dspace -c 'ALTER DATABASE dspace SET 
search_path = "$user",public,extensions,pgcrypto;'* ) and then double check 
it to see if it's included by (  *psql --username=postgres dspace -c 'SHOW 
search_path;'* ).

NB: Creating the pgcrypto extension using the second method will save you 
from creating it again if you later for any reason have to clean your 
database. Please read  *Alternative method: How to enable pgcrypto via a 
separate database schema.) *found in here 
https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-PostgreSQL11.x,12.xor13.x(withpgcryptoinstalled).
 
Carefully.

Hope it help

Mo.



On Tuesday, March 28, 2023 at 2:51:55 PM UTC+3 Zikrul wrote:

> Hi, 
> I also have the same problem as Baskar while running $ant fresh_install. 
> Regarding Mohammad's reply to recreate pgcrypto, I did create successfully 
> before. If I try to recreate now then it says below as already it is there.
>
> bash-4.4$ psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
> ERROR:  extension "pgcrypto" already exists
>
> I am not sure Baskar, if you had a chance to fix it or found any solution 
> of it. Please share if possible or can someone help please?
> I have checked there is no table 
>
> Following is my current setup environment:
> ===================================
> OS: Red Hat Enterprise Linux 8.7
> OpenJDK: v17.0.6 
> Apache: v2.4.37
> Tomcat: v10.0.27
> Maven: v3.8.6
> Ant: 1.10.12
> Postgres: v15
> DSpace: v7.5 (Failing/Warning during ant fresh_install. Does not create 
> any tables after ant finishes)
>
> ant fresh_install full output:
> ----------------------------------
> $ ant fresh_install
> ...............
> init_configs:
> ............
>       [java] 2023-02-21 11:11:45,527 WARN 
>  org.dspace.servicemanager.DSpaceServiceManager @ Unable to locate bean by 
> name or id=database. Will try to look up bean by type next.
>
>      [java] 
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean 
> named 'database' available
>      [java]     at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:872)
>  
> ~[spring-beans-5.3.20.jar:5.3.20]
>      [java]     at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344)
>  
> ~[spring-beans-5.3.20.jar:5.3.20]
>      [java]     at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
>  
> ~[spring-beans-5.3.20.jar:5.3.20]
>      [java]     at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
>  
> ~[spring-beans-5.3.20.jar:5.3.20]
>      [java]     at 
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160)
>  
> ~[spring-context-5.3.20.jar:5.3.20]
>      [java]     at 
> org.dspace.servicemanager.DSpaceServiceManager.getServiceByName(DSpaceServiceManager.java:426)
>  
> [dspace-services-7.5.jar:7.5]
>      [java]     at 
> org.dspace.scripts.ScriptServiceImpl.getScriptConfiguration(ScriptServiceImpl.java:34)
>  
> [dspace-api-7.5.jar:7.5]
>      [java]     at 
> org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:125) 
> [dspace-api-7.5.jar:7.5]
>      [java]     at 
> org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98) 
> [dspace-api-7.5.jar:7.5]
>      [java] 2023-02-21 11:11:45,820 WARN 
>  org.flywaydb.core.internal.database.base.Database @ Flyway upgrade 
> recommended: PostgreSQL 15.1 is newer than this version of Flyway and 
> support has not been tested. The latest supported version of PostgreSQL is 
> 14.
>
>      [java]
>      [java] Attempting to connect to database
>      [java] Connected successfully!
>      [java]
>      [java] Database Type: postgres
>      [java] Database URL: jdbc:postgresql://localhost:5432/dspace
>      [java] Database Schema: public
>      [java] Database Username: dspace
>      [java] Database Software: PostgreSQL version 15.1
>
>      [java] Database Driver: PostgreSQL JDBC Driver version 42.4.3
>      [java] PostgreSQL 'pgcrypto' extension installed/up-to-date? true 
> (version=1.3)
>      [java] FlywayDB Version: 8.4.4
>
> install_code:
>    ............
>      [echo]
>      [echo] 
> ====================================================================
>      [echo]  The DSpace code has been installed.
>      [echo] 
> ====================================================================
>      [echo]
>
> fresh_install:
>
> copy_webapps:
>    ......
> build_webapps_wars:
>    
> check_spiders:
>
> init_spiders:
>      [echo]
>      [echo] 
> ====================================================================
>      [echo]  The DSpace code has been installed.
>      [echo]
>      [echo]  To complete installation, you should do the following:
>      [echo]
>      [echo]  * Setup your Web servlet container (e.g. Tomcat) to look for 
> your
>    ......................
>      [echo] 
> ====================================================================
>      [echo]
>
> BUILD SUCCESSFUL
> Total time: 7 seconds
>
> NO Tables CREATED in DSpace during ant fresh_install:
> #######################################
> $ psql dspace
> psql (15.1)
> Type "help" for help.
>
> dspace=> \dt
> Did not find any relations.
> On Friday, 24 March 2023 at 11:56:52 UTC Mohammad S. AlMutairi wrote:
>
>> Hi,
>>
>> I think it can not be found because it's not included into the search 
>> path. See this old post for hints on how to fix it: 
>> https://groups.google.com/g/dspace-tech/c/Hy8lxiaxH4I/m/8yrHFW5lBgAJ or 
>> better if you recreate the pgcrypto extention using the ( *Alternative 
>> method: How to enable pgcrypto via a separate database schema.) *found in
>>  here 
>> https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-PostgreSQL11.x,12.xor13.x(withpgcryptoinstalled)
>> .
>>
>>
>> Mo.
>>
>> On Friday, March 24, 2023 at 2:25:47 PM UTC+3 Baskar Selvaraj wrote:
>>
>>> Hi,
>>>
>>> OS: Ubuntu 22.04.2
>>> PostgreSQL: 14.7
>>> DSpace: 7.5
>>> pgcrypto extension: 1.3
>>>
>>> init_configs:
>>>      [copy] Copying 222 files to /home/dspace/config
>>>    [delete] Deleting directory 
>>> /dspace-7.5/dspace/target/dspace-installer/config-temp
>>>      [copy] Copying 1 file to /home/dspace/config
>>>
>>> test_database:
>>>      [java] 2023-03-24 06:55:56,440 WARN 
>>>  org.dspace.servicemanager.DSpaceServiceManager @ Unable to locate bean by 
>>> name or id=database. Will try to look up bean by type next.
>>>      [java] 
>>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean 
>>> named 'database' available
>>>      [java]     at 
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:872)
>>>  
>>> ~[spring-beans-5.3.20.jar:5.3.20]
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344)
>>>  
>>> ~[spring-beans-5.3.20.jar:5.3.20]
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
>>>  
>>> ~[spring-beans-5.3.20.jar:5.3.20]
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
>>>  
>>> ~[spring-beans-5.3.20.jar:5.3.20]
>>>      [java]     at 
>>> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160)
>>>  
>>> ~[spring-context-5.3.20.jar:5.3.20]
>>>      [java]     at 
>>> org.dspace.servicemanager.DSpaceServiceManager.getServiceByName(DSpaceServiceManager.java:426)
>>>  
>>> [dspace-services-7.5.jar:7.5]
>>>      [java]     at 
>>> org.dspace.scripts.ScriptServiceImpl.getScriptConfiguration(ScriptServiceImpl.java:34)
>>>  
>>> [dspace-api-7.5.jar:7.5]
>>>      [java]     at 
>>> org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:125)
>>>  
>>> [dspace-api-7.5.jar:7.5]
>>>      [java]     at 
>>> org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98) 
>>> [dspace-api-7.5.jar:7.5]
>>>      [java] 
>>>      [java] Attempting to connect to database
>>>      [java] Connected successfully!
>>>      [java] 
>>>      [java] Database Type: postgres
>>>      [java] Database URL: jdbc:postgresql://localhost:5432/dspace
>>>      [java] Database Schema: public
>>>      [java] Database Username: dspace
>>>      [java] Database Software: PostgreSQL version 14.7 (Ubuntu 
>>> 14.7-0ubuntu0.22.04.1)
>>>      [java] Database Driver: PostgreSQL JDBC Driver version 42.4.3
>>>      [java] PostgreSQL 'pgcrypto' extension installed/up-to-date? false 
>>> (not installed)
>>>      [java] FlywayDB Version: 8.4.4
>>>      [java] 
>>>      [java] WARNING: Required PostgreSQL 'pgcrypto' extension is NOT 
>>> INSTALLED on this database.
>>>      [java] 
>>>      [java] ** DSpace REQUIRES PostgreSQL >= 9.4 AND pgcrypto extension 
>>> >= 1.1 **
>>>      [java] 
>>>      [java] To install it, please connect to your DSpace database as a 
>>> 'superuser' and manually run the following command: 
>>>      [java] 
>>>      [java]   CREATE EXTENSION pgcrypto;
>>>      [java] 
>>>
>>> BUILD FAILED
>>> /dspace-7.5/dspace/target/dspace-installer/build.xml:770: Java returned: 
>>> 1
>>>
>>> Total time: 9 seconds
>>>
>>> -------------------------------------
>>>
>>> pgcrypto is installed and enabled
>>>
>>> psql (14.7 (Ubuntu 14.7-0ubuntu0.22.04.1))
>>> Type "help" for help.
>>>
>>> postgres=# select * from pg_available_extensions;
>>>         name        | default_version | installed_version |             
>>>                    comment                                 
>>>
>>> --------------------+-----------------+-------------------+------------------------------------------------------------------------
>>>
>>>  intagg             | 1.1             |                   | integer 
>>> aggregator and enumerator (obsolete)
>>>  tsm_system_rows    | 1.0             |                   | TABLESAMPLE 
>>> method which accepts number of rows as a limit
>>>  refint             | 1.0             |                   | functions 
>>> for implementing referential integrity (obsolete)
>>>  pgcrypto           | 1.3             | 1.3               | 
>>> cryptographic functions
>>>  file_fdw           | 1.0             |                   | foreign-data 
>>> wrapper for flat file access
>>>  hstore             | 1.8             |                   | data type 
>>> for storing sets of (key, value) pairs
>>>  pg_stat_statements | 1.9             |                   | track 
>>> planning and execution statistics of all SQL statements executed
>>>  pg_freespacemap    | 1.2             |                   | examine the 
>>> free space map (FSM)
>>>  pg_prewarm         | 1.2             |                   | prewarm 
>>> relation data
>>>
>>> (46 rows)
>>>
>>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/cd40e4b1-16df-45ee-a3ae-6df1adfeb53fn%40googlegroups.com.

Reply via email to