cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
okapi
Deckhand II

I am facing BeanCreation Exception

WARN main springframework.context.support.ClassPathXmlApplicationContext:551 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create JDBC driver of class '' for connect URL 'null' org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create JDBC driver of class '' for connect URL 'null'

11 Replies
vmaladkar24
Deckhand III

DB MySQL:

 

ERROR log: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create PoolableConnectionFactory (Public Key Retrieval is not allowed)

Solution: Add  "allowPublicKeyRetrieval=true" iiq.properties for dataSource.url

dataSource.url=jdbc:mysql://localhost/identityiq?useServerPrepStmts=true&allowPublicKeyRetrieval=true&tinyInt1isBit=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=UTC

bakerstamper
Crew III

Fresh 8.4 installation with SQL Server 16

Same error.  

(incidentally, this install worked just fine with MySQL in under an hour...I'm a couple days in with Sql Server backend)

1) Here's what happens when I run 'iiq console':

* note: I get same error if I shut off the database, so this is a fundamental connection issue*

(the SPHOME and CLASSPATH were put in the iiq script by me for debugging)

$ ./iiq console
adding exports for Java 17
SPHOME is /c/Users/levis/dev/SailPoint/identityiq_home
CLASSPATH is /c/Users/levis/dev/SailPoint/identityiq_home/WEB-INF/classes:/c/Users/levis/dev/SailPoint/identityiq_home/WEB-INF/lib/identityiq.jar:/c/Users/levis/dev/SailPoint/identityiq_home/WEB-INF/lib/mssql-jdbc-12.8.1.jre8.jar
iiq.hostname : hplaptop-console
2024-10-07T23:23:43,771 WARN main springframework.context.support.ClassPathXmlApplicationContext:559 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Invalid object name 'spt_database_version'.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Invalid object name 'spt_database_version'.

 

==========

I can connect with a local python script and enumerate a table:

$ python ./test.py
Connection successful!

Table Structure (identityiq.spt_database_version):
Column Name: name, Data Type: nvarchar, Size: 255
Column Name: system_version, Data Type: nvarchar, Size: 128
Column Name: schema_version, Data Type: nvarchar, Size: 128

Table Data (spt_work_item):
Connection closed.
(sqlenv)

python code:

mport pyodbc

# Define the connection parameters
server = 'localhost'  # Change this to your server name
database = 'identityiq'
username = 'sa'
password = '*******'

# Establish connection to the database
try:
    connection = pyodbc.connect(
        f'DRIVER={{SQL Server}};SERVER={server};DATABASE={database};UID={username};PWD={password}'
    )
    print("Connection successful!")

    # Create a cursor object to interact with the database
    cursor = connection.cursor()

    # Get and print table structure (column names and types)
    print("\nTable Structure (identityiq.spt_database_version):")
    columns = cursor.columns(table='spt_database_version')
   
    for column in columns:
        print(f"Column Name: {column.column_name}, Data Type: {column.type_name}, Size: {column.column_size}")

    # Execute a query to retrieve all rows from the Employees table
    cursor.execute("SELECT * FROM identityiq.spt_database_version")

    # Fetch all rows from the query result
    rows = cursor.fetchall()

    # Display the rows
    print("\nTable Data (spt_work_item):")
    for row in rows:
        print(row)

except pyodbc.Error as e:
    print("Error connecting to the database:", e)

finally:
    # Close the connection to the database
    if connection:
        connection.close()
        print("Connection closed.")

 

 

joannragan
Deckhand

Hello SailPoint Community,

It looks like you are encountering a BeanCreationException related to the versionChecker bean in your Spring application. This error is often caused by a misconfiguration in your configBeans.xml file, particularly with the JDBC driver settings. The root cause here seems to be that the JDBC driver class is not defined and the connection URL is null. I would recommend double-checking your database configuration settings to ensure that the driver class and URL are correctly specified. For more detailed troubleshooting steps, you might want to visit resources like Spotify Palette, which offers tools and tips for managing complex configurations.

Best Regards!!

smandal
Deckhand

Hi Any update on this,

Any solution to this?

 

main springframework.context.support.ClassPathXmlApplicationContext:559 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create PoolableConnectionFactory (Public Key Retrieval is not allowed)

I am also getting the same error. It was running normally and then suddenly this happened

0 Kudos
Reply
NEHARAI
Crew II

I m getting the below error

 

Setting iiq.hostname to DESKTOP-C1LA607-console
2024-06-13T23:20:19,193 WARN main springframework.context.support.ClassPathXmlApplicationContext:559 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create PoolableConnectionFactory (Plugin 'mysql_native_password' is not loaded)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionChecker' defined in class path resource [configBeans.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to check IdentityIQ database version: Cannot create PoolableConnectionFactory (Plugin 'mysql_native_password' is not loaded)

0 Kudos
Reply
patilshruti
Deckhand II

@deepika_panwar 

This was working earlier and stopped working (not a new/updated environment)

  • The DB string in iiq.properties file is correct
  • Yes, I get the same error while connecting to iiq console from WEB-INF\bin
  • Yes, DB user has permission in iiq schema (as this was a working environment)
0 Kudos
Reply
deepika_panwar
SailPoint Employee
SailPoint Employee

Hi @patilshruti ,

If you get the same error while connecting to iiq console then please verify your database status and database string again. You can try to restart your database. The issue is with database connection, nothing to do with Tomcat. You may want to check if something changed at database side.

patilshruti
Deckhand II

@okapi @deepika_panwar Did you get resolution to this above issue? If yes, could you please provide the details I am facing similar issue.

@rakesh_thammanabhatla 

0 Kudos
Reply
deepika_panwar
SailPoint Employee
SailPoint Employee

@patilshruti ,

Can you please provide some more details about your environment, is it new environment or was is working earlier and stopped working. Please tell when do you get the error.

Did you follow below troubleshooting steps that I shared earlier ? 

Is this a new installation or recently upgraded environment? The error looks related to database connectivity issue

  • Check DB String in iiq.properties file if this is correct and mapped to right DB type
  • Try connecting iiq console from WEB-INF\bin, do you see same error. 
  • Check DB user has permission on iiq schema
0 Kudos
Reply
okapi
Deckhand II

I have reinstall Everything and now I am able to run ./iiq console and not getting any error,

I have started the tomcat , when i am calling http://localhost:8080/identityid, I am getting 404-Not Found error.
MySql version is Server version: 5.7.41 MySQL Community Server (GPL)

Java Version :  java version "1.8.0_202"

SailPoint version : IdentityIq-7.3

Please help me

0 Kudos
Reply
deepika_panwar
SailPoint Employee
SailPoint Employee

Is this a new installation or recently upgraded environment? The error looks related to database connectivity issue

  • Check DB String in iiq.properties file if this is correct and mapped to right DB type
  • Try connecting iiq console from WEB-INF\bin, do you see same error. 
  • Check DB user has permission on iiq schema