I am running Spring 1.2.1.RELEASE with Liquibase in IntelliJ 14:
build.grade
compile("org.springframework.boot:spring-boot-starter-web:$springBootVersion")
compile('org.liquibase:liquibase-core')
I have a project/config/application.properties that I use to tell Liquibase to create the database and insert data:
spring.jpa.hibernate.ddl-auto=none
spring.datasource.url=jdbc:postgresql://localhost:5432/mydb
spring.datasource.username=xxx
spring.datasource.password=xxx
spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.database=POSTGRESQL
spring.jpa.hibernate.hbm2ddl.auto=none
spring.jpa.hibernate.disableConnectionTracking=true
spring.jpa.hibernate.default_schema=xxx
liquibase.change-log:classpath:/db/changelog/db.changelog-master.xml
liquibase.check-change-log-location=true
If I run from the command line:
gradle clean build
I will get all my tables and seed data in my database as expected. But if I run my main SpringBoot Application class from within IntelliJ no tables are created. I have a logging file that shows liquibase being used from the command line, but when I run from within IntelliJ, there is not mention of Liquibase in that log file. Just to be sure, I have a duplicate application.properites under project/src/resources.
Here is how my project looks i IntelliJ:
Any ideas on how to get the properties file used from within IntelliJ?
Related
I work on a Kotlin-based cloud microservice. From time to time I need to run it in the IntelliJ debugger, but we often accidentally break the "local debug flow". There is no pipeline that checks if the IntelliJ run-configuration and the somewhat complex set of cloud-simulating proxies and mock-servers are in sync with the code base.
I would like to write a script that helps me check if the local debug flow works. The script should do the following:
build the project
start up the "mock cloud"
start the service locally using an IntelliJ run-configuration
run a Postman-collection against the locally running service
I need help with step 3 (and possibly step 1): How can I start the IntelliJ run-configuration via command line? I am using IntelliJ IDEA 2021.2 and MacOS 12.3.1.
There is no built-in way to start a Run Configuration from the command line. Instead, you should execute java/kotlin binary with classpath etc.
For example, for "Application" configuration it is needed to run the command like that:
I running a Junit test from IntelliJ IDEA, but I have this error:
Error running 'BookingTest':
Command line is too long. Shorten command line for BookingTest or also for JUnit default configuration
Please change the corresponding option for the active and Template configurations you are using for the tests.
I have foo.ear that can be deployed or updated to WAS 7 without problems. foo.ear have some ext resources and group settings that i need merge when deploy to WAS and through console all works perfctly but take lage amount of time to go through all process. So I prefer automatic deploy from Intellij IDEA (2018) but when IDEA do deployment it drop all current bindings (ext resources and group settings) and i not found any option to mearge or at last save current bindings of app. So my question is could this be done from IDEA or at last from some script(e.g. maven)?
I believe that the thing is you're looking for is -bindear option.
You can manually provide build post/pre processing steps with IDEA
https://www.jetbrains.com/help/idea/pre-processing-tab.html
So you can try to invoke this with the ant task where you exec ejbDeploy command from that ant task with that option.
More about the task you can found in the documentation:
https://www.ibm.com/support/knowledgecenter/SSRTLW_9.1.0/com.ibm.ejbdeploy.doc/topics/regenc.html
I've deployed successfully Flyway plugin for command-line where i run multiple oracle db scripts using parameters in flyway.sonfig file.
Now I'm trying to implement Flyway plugin for Gradel using the IntelliJ application.
I've created a dependency for the plugin:
dependencies {
classpath "org.flywaydb:flyway-gradle-plugin:4.0.2"
}
Run the build, and it looks like it downloaded the plugin successfully, I can see the Flyway tasks.
I've added new gradle.properties file with flyway parameters and when running the build now it gives an error:
A problem occurred evaluating root project 'test'.
Failed to apply plugin [id 'org.flywaydb.flyway']
Could not create task of type 'FlywayCleanTask'.
I don't understand what it means and why it fails.
Hope you can assist.
After recent migration from HBase 0.94.13 to HBase 0.98.12 my code is failing to execute.
I am simply trying to connect to a table via dependent jar file developed by another team who uses Spring HbaseTemplate. I have manually placed all the required jar files for executing the code including hbase-client-0.98.12-mapr-1506.jar (we have MapR distribution).
I am receiving the following error:
Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/WritableByteArrayComparable
It seems to be occuring because HBase 0.96.x WritableByteArrayComparable has been renamed to ByteArrayComparable.
How can I make the old code work again?
I was able to make it work by keeping the old jar hbase-0.94.9-mapr-1308 in the classpath. It was a dirty fix but it did the job.
The other team whose dependent jar I was using to connect to M7, finally updated their code and now things are back to normal again. Thanks.