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

Tasks in jarmonica gradle plugin don't work anymore #153

Open
sylux6 opened this issue Sep 17, 2020 · 10 comments
Open

Tasks in jarmonica gradle plugin don't work anymore #153

sylux6 opened this issue Sep 17, 2020 · 10 comments

Comments

@sylux6
Copy link
Contributor

sylux6 commented Sep 17, 2020

Describe the bug
jarmonicaUp, jarmonicaDown and jarmonicaVersion don't work anymore

To Reproduce
Run task.

The following error is returned:

Exception in thread "main" java.lang.NoSuchMethodError: org.jetbrains.exposed.sql.Transaction.exec(Ljava/lang/String;)Lkotlin/Unit;
	at com.improve_future.harmonica.core.Connection.execute(Connection.kt:189)
	at com.improve_future.harmonica.core.Connection.<init>(Connection.kt:99)
	at com.improve_future.harmonica.task.JarmonicaTaskMain.createConnection(JarmonicaTaskMain.kt:40)
	at com.improve_future.harmonica.task.JarmonicaUpMain.main(JarmonicaUpMain.kt:34)

Kotlin 1.4.0
JDK 1.8

@sylux6 sylux6 changed the title Tasks don't work anymore Tasks in jarmonica gradle plugin don't work anymore Sep 17, 2020
@KenjiOhtsuka
Copy link
Owner

@sylux6
Sorry for inconvenience
I will research it

@viktorisacenko
Copy link

Same problem.
Something new about this issue?

@KenjiOhtsuka
Copy link
Owner

@viktorisacenko
@sylux6
I was so sorry, too busy to fix it.
Today I will solve it.

@KenjiOhtsuka
Copy link
Owner

it looks very strange. In my environment, the migration succeeded.

 % ./gradlew jarmonicaUp
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

> Task :jarmonicaUp
== [Start] Migrate up 20180714192339748 ==
Create Table: normal_table
Create Table: normal_table_for_add
Add column: normal_table_for_add integer_column
Add column: normal_table_for_add varchar_column
Add column: normal_table_for_add decimal_column
Add column: normal_table_for_add boolean_column
Add column: normal_table_for_add blob_column
Add column: normal_table_for_add date_column
Add column: normal_table_for_add time_column
Add column: normal_table_for_add date_time_column
Add column: normal_table_for_add timestamp_column
Add column: normal_table_for_add text_column
Add Index: normal_table integer_column
== [End] Migrate up 20180714192339748 ==
== [Start] Migrate up 20180714194338790 ==
Create Table: not_null_table
Create Table: not_null_table_for_add
Add column: not_null_table_for_add integer_column
Add column: not_null_table_for_add varchar_column
Add column: not_null_table_for_add decimal_column
Add column: not_null_table_for_add boolean_column
Add column: not_null_table_for_add blob_column
Add column: not_null_table_for_add date_column
Add column: not_null_table_for_add time_column
Add column: not_null_table_for_add date_tiem_column
Add column: not_null_table_for_add timestamp_column
Add column: not_null_table_for_add text_column
Add foreign key: not_null_table_for_add.integer_column - normal_table_for_add.id
== [End] Migrate up 20180714194338790 ==
== [Start] Migrate up 20180714194840311 ==
Create Table: default_table
Create Table: default_table_for_add
Add column: default_table_for_add integer_column
Add column: default_table_for_add varchar_column
Add column: default_table_for_add decimal_column
Add column: default_table_for_add boolean_column
Add column: default_table_for_add blob_column
Add column: default_table_for_add date_column_1
Add column: default_table_for_add date_column_2
Add column: default_table_for_add date_column_3
Add column: default_table_for_add time_column_1
Add column: default_table_for_add time_column_2
Add column: default_table_for_add time_column_3
Add column: default_table_for_add date_tiem_column_1
Add column: default_table_for_add date_time_column_2
Add column: default_table_for_add date_time_column_3
Add column: default_table_for_add timestamp_column_1
Add column: default_table_for_add timestamp_column_2
Add column: default_table_for_add timestamp_column_3
Add column: default_table_for_add text_column
== [End] Migrate up 20180714194840311 ==
== [Start] Migrate up 20180714203511949 ==
Create Table: other_table
Create Table: other_table_for_add
Add column: other_table_for_add integer_column
Add column: other_table_for_add varchar_column
Add column: other_table_for_add decimal_column
Add column: other_table_for_add boolean_column
Add column: other_table_for_add date_column
Add column: other_table_for_add time_column
Add column: other_table_for_add date_time_column
Add column: other_table_for_add timestamp_column
Add column: other_table_for_add text_column
== [End] Migrate up 20180714203511949 ==

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

I guess removing exposed library is the solution 🤔

@KenjiOhtsuka
Copy link
Owner

@viktorisacenko
@sylux6
Hello, I removed exposed library.
Please try 2.0.0.

@KenjiOhtsuka
Copy link
Owner

@viktorisacenko
@sylux6
I will provide a project code.
This, harmonica_test is the test project.
I wish it is helpful.

@sylux6
Copy link
Contributor Author

sylux6 commented Dec 16, 2020

@KenjiOhtsuka We cannot use Exposed in migration classes anymore ?

@KenjiOhtsuka
Copy link
Owner

@sylux6
From harmonica, I removed exposed.
But I think you can use Exposed if you add it to gradle.

@KenjiOhtsuka
Copy link
Owner

I removed exposed because it might conflict with the existing Exposed versions. I mean, when the user develops some product with harmonica and it includes Exposed library for the user's product, the Exposed version sometimes differs from the one in Harmonica.

I thought lang.NoSuchMethodError arose in such a situation so I removed exposed from Harmonica.

@sylux6
Copy link
Contributor Author

sylux6 commented Apr 5, 2021

I'm trying to figure out how to be able to use Exposed api during harmonica migrations since it got removed from the dependencies.

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

3 participants