I am trying to migrate the versions of spring framework as well as that of hibernate. For spring framework I moved the version from 3.2.18 to 4.3.20. After that I have upgraded hibernate version from 3.5.6-Final to 5.4.18.Final. I did all the migration related changes to make my code compilation free and built my application successfully.
But, at the deployment time in my local JBOSS I got an issue "JdbcEnvironmentImpl Could not fetch the SequenceInformation from the database due to
com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=SYSCAT.SEQUENCES, DRIVER = 4.25.1301.... Mainly Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set".
I am having the below entry(i.e., in existing code before migration) in my project's application context xml(i.e., hibernate configuration file).
"hibernate.dialect"=org.hibernate.dialect.DB2Dialect(inside property xml tag)
I have changed this dialect name to all varieties of the DB2 dialects(e.g., DB2400Dialect, DB2390Dialect, DB297Dialect etc.), but no luck. After going through different blogs I have found that for hibernate 5 the actual DB2 dialect is "org.hibernate.dialect.DB2" instead of "org.hibernate.dialect.DB2Dialect".
After using this new dialect in my application currently I am getting -
"Unable to resolve name [org.hibernate.dialect.DB2] as Strategy [org.hibernate.dialect.Dialect]....Unable to load class [org.hibernate.dialect.DB2]".
Could anybody please help me on this. Please suggest what needs to be done to sort out this problem at JBOSS runtime so that I can deploy my application.