Skip to content

NoClassDefFoundError TypedParameterValue when using eclipselink #2857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
haube opened this issue Mar 14, 2023 · 1 comment
Closed

NoClassDefFoundError TypedParameterValue when using eclipselink #2857

haube opened this issue Mar 14, 2023 · 1 comment
Assignees
Labels
type: regression A regression from a previous release

Comments

@haube
Copy link

haube commented Mar 14, 2023

Hi there,

we followed this guide (https://www.baeldung.com/spring-eclipselink) to use eclipselink instead of hibernate.
So we have following exclusion in the pom file.

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.hibernate</groupId>
					<artifactId>hibernate-entitymanager</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.hibernate</groupId>
					<artifactId>hibernate-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

Upgrading spring-boot form 2.7.7 to 2.7.8 i get the following error in one of our tests.

java.lang.NoClassDefFoundError: org/hibernate/jpa/TypedParameterValue
	at org.springframework.data.jpa.repository.query.QueryParameterSetter$NamedOrIndexedQueryParameterSetter.setParameter(QueryParameterSetter.java:95)

i guess the reason is this older issue #2544
which makes use of a hibernate dependency.

Removing the exclusion for hibernate-core makes the code run.

But i am unsure about side effects. Is it just excluded to safe some space in the artifact or does it enable some maybe unwanted spring magic by default.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 14, 2023
@mp911de mp911de added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 14, 2023
@gregturn gregturn added this to the 3.1 M3 (2023.0.0) milestone Mar 14, 2023
@gregturn
Copy link
Contributor

This should also be candidate for backporting to 3.0.x since it involves HIbernate 6.

gregturn added a commit that referenced this issue Mar 14, 2023
The Hibernate-specific version can then leverage TypedParameterValue.

Resolves #2857.
gregturn added a commit that referenced this issue Mar 14, 2023
The Hibernate-specific version can then leverage TypedParameterValue.

Resolves #2857.
gregturn added a commit that referenced this issue Mar 14, 2023
The Hibernate-specific version can then leverage TypedParameterValue.

Resolves #2857.
gregturn added a commit that referenced this issue Mar 14, 2023
The Hibernate-specific version can then leverage TypedParameterValue.

Resolves #2857.
gregturn added a commit that referenced this issue Mar 14, 2023
The Hibernate-specific version can then leverage TypedParameterValue.

Resolves #2857.
gregturn added a commit that referenced this issue Mar 14, 2023
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Resolves #2857.
gregturn added a commit that referenced this issue Mar 14, 2023
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Resolves #2857.
schauder pushed a commit that referenced this issue Mar 15, 2023
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Closes #2857
Original pull request #2859
schauder added a commit that referenced this issue Mar 15, 2023
Renamed to unwrapDate to align with the changes from #2861.
Minor JavaDoc adjustments

See #2857
Original pull request #2859
schauder added a commit that referenced this issue Mar 15, 2023
Renamed to unwrapDate to align with the changes from #2861.
Minor JavaDoc adjustments

See #2857
Original pull request #2859
schauder added a commit that referenced this issue Mar 15, 2023
Removed instanceof assert.

See #2857
Original pull request #2859
schauder added a commit that referenced this issue Mar 15, 2023
Removed instanceof assert.

See #2857
Original pull request #2859
mp911de added a commit that referenced this issue Mar 15, 2023
Reduce method visibility. Improve method naming. Avoid using var in production code.

See #2857
Original pull request #2859
mp911de added a commit that referenced this issue Mar 15, 2023
Reduce method visibility. Improve method naming. Avoid using var in production code.

See #2857
Original pull request #2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this issue Mar 24, 2023
This allows the Hibernate variant (HibernateJpaParametersParameterAccessor) to potentially unwrap TypedParameterValue.

Closes spring-projects#2857
Original pull request spring-projects#2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this issue Mar 24, 2023
Renamed to unwrapDate to align with the changes from spring-projects#2861.
Minor JavaDoc adjustments

See spring-projects#2857
Original pull request spring-projects#2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this issue Mar 24, 2023
Removed instanceof assert.

See spring-projects#2857
Original pull request spring-projects#2859
klajdipaja pushed a commit to klajdipaja/spring-data-jpa that referenced this issue Mar 24, 2023
Reduce method visibility. Improve method naming. Avoid using var in production code.

See spring-projects#2857
Original pull request spring-projects#2859
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants