Skip to content
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

IllegalStateException: Error trying to create the prototypeEntityBean for class #290

Closed
PromanSEW opened this issue May 13, 2022 · 1 comment

Comments

@PromanSEW
Copy link
Contributor

PromanSEW commented May 13, 2022

Original issue:
ebean-orm/ebean#2689
Crash:
https://gist.github.com/PromanSEW/c101189d0f58eba5bdfccf828643fac2
Reproducer
https:/PromanSEW/ebean_example

The problem is that sbt-play-ebean uses ebean-agent 12.16.1 in its (sbt) classpath while enhancing, when app classpath uses Ebean 13.6.0
So adding ebean.mf to play-ebean or app resources has no effect

Originally posted by @PromanSEW in ebean-orm/ebean#2689 (comment)

I set the following settings, and console prints that ebean-agent 12.16.1 is used instead of 13.6.0

playEbeanDebugLevel := 9,
playEbeanAgentArgs  := Map("debug" -> playEbeanDebugLevel.value.toString, "printversion" -> "true")

I don't know how modify SBT classpath so it will use Ebean 13.6.0 instead of sbt-play-ebean version
If you know, please help me

@PromanSEW
Copy link
Contributor Author

PromanSEW commented May 14, 2022

I fixed this issue!
plugins.sbt:

val ebeanVersion = "13.6.0"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.15")
addSbtPlugin("com.typesafe.play" % "sbt-play-ebean" % "6.2.0-RC6")

dependencyOverrides ++= Seq(
  "io.ebean" % "ebean" % ebeanVersion,
  "io.ebean" % "ebean-agent" % ebeanVersion,
  "io.ebean" % "ebean-ddl-generator" % ebeanVersion
)

build.sbt:

val ebeanVersion = "13.6.0"
dependencyOverrides ++= Seq(
  "io.ebean" % "ebean" % ebeanVersion,
  "io.ebean" % "ebean-agent" % ebeanVersion,
  "io.ebean" % "ebean-ddl-generator" % ebeanVersion
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant