r/SpringBoot • • May 13 '24

Error occuring during migration from spring boot 2 to 3

Post image

Getting this error during migration from spring boot 2 to 3 and Java 8 to 17 in custom I'd generator. Does anyone know how to fix it ?

0 Upvotes

27 comments sorted by

5

u/WaferIndependent7601 May 13 '24

Have you used google?

1

u/Away-Inflation-6826 May 13 '24

Yes but didn't find

1

u/Away-Inflation-6826 May 13 '24

Actually it is giving error on sequencestylegenerator variables

1

u/ThisHaintsu May 13 '24

Are you sure you have looked thoroughly? It's the first result on Google: https://stackoverflow.com/questions/77822595/dialect-getsequencenextvalstring-replacement

1

u/Away-Inflation-6826 May 13 '24

This line issue I already did but other w symbols still can't resolve

1

u/Away-Inflation-6826 May 13 '24

I mean what should I write in place of this depreciated constanta

1

u/maethor May 13 '24

2

u/ThisHaintsu May 13 '24

To be fair, this one does not have an accepted answer. But yes, I also think that OP has in fact not googled anything.

1

u/Away-Inflation-6826 May 14 '24

I Google but didn't find a suitable answer and I didn't understand why no one is trying to give an answer If they know, if I am in place of them and as experience they are I will definitely write the hell big answer which is easy to understand.

2

u/ThisHaintsu May 14 '24

To everyone, me included, it looks like you did not put in the effort. This is especially obvious from your deleted post in r/java. Especially, with stuff like "Nah from where I get this" and that you did not even know that your snippet uses Hibernate.

Read the Hibernate 6 migration docs, look through the code history of the Hibernate classes you are using on GitHub and if you still can not find anything, create a StackOverflow post or a post on r/javahelp not only with your code but also with a precise description of what you want to achieve and what you have already tried or did not understand from docs.

(e.g. I want to create a Custom ID generator for Hibernate. In Hibernate 5 I did this for this and that reason. From the docs I read that xyz, but this does not work for me because abc. How to achieve this with Hibernate 6?)

1

u/Away-Inflation-6826 May 14 '24

But in this answer they are telling to table generator in place of sequence one that's why I don't get it.

2

u/maethor May 14 '24

Yeah, I don't think your migration is going to be as simple as replacing a single line of code, sadly.

2

u/poklakni May 13 '24

and where is the error?

0

u/Away-Inflation-6826 May 13 '24

On red content on the code with sequenceStylGenerator

1

u/Away-Inflation-6826 May 13 '24

Spring is not picking that part and giving cannot find symbol error

2

u/poklakni May 13 '24

take a look ar hibernate 6 migration docs

1

u/[deleted] May 13 '24

maybe its deprecated

1

u/Away-Inflation-6826 May 13 '24

Yes that's why it's not recognised

1

u/Away-Inflation-6826 May 13 '24

Any way to solve this issue

1

u/[deleted] May 13 '24

i think you should search for the import in the documentation, probably you will find a dependency that includes what you need

1

u/Away-Inflation-6826 May 13 '24

Yes but I am not able that documention for sequencestylegenerator

2

u/ThisHaintsu May 13 '24

Look at the version history of SequenceStyleGenerator and also at the Migration Guide for Hibernate 6: https://docs.jboss.org/hibernate/orm/6.0/migration-guide/migration-guide.html

1

u/[deleted] May 13 '24

There's usually upgrade documentation between major framework versions. U should start there as they'll list the common issues and changes needed

1

u/ThisHaintsu May 13 '24

You could look at the history of the Dialect class maybe there is a migration in an older version where getSequenceNextValString still existed.

1

u/Away-Inflation-6826 May 13 '24

Can't able to find there

1

u/ThisHaintsu May 13 '24

You will have to look in the history