Code Monkey home page Code Monkey logo

Comments (13)

MingNiu avatar MingNiu commented on May 24, 2024

I'm trying to solve the problem.

Any help?

solution one:
image

solution two:
image

from jodconverter.

sbraconnier avatar sbraconnier commented on May 24, 2024

I'm not sure this have anything to do with jodconverter, which doesn't use quartz, nor HikariCP.

Can you share your whole dependency tree with and without the jodconverter dependency?

Thanks.

from jodconverter.

MingNiu avatar MingNiu commented on May 24, 2024

with_jodconverter.txt
without_jodconverter.txt

from jodconverter.

sbraconnier avatar sbraconnier commented on May 24, 2024

I wasn't able to reproduce your issue with a minimal project. I don't see HikariCP-java7 dependency in my dependency tree and the application starts without problem. I'm using gradle 8.4 tho. My build.gradle.kts file is:

plugins {
    kotlin("jvm") version "1.9.21"
    id("org.springframework.boot") version "2.7.18"
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    implementation(platform("org.springframework.boot:spring-boot-dependencies:2.7.18"))

    implementation("org.jodconverter:jodconverter-spring-boot-starter:4.4.7")
    implementation("org.jodconverter:jodconverter-remote:4.4.7")

    implementation("org.springframework.boot:spring-boot-starter-quartz")

    implementation("org.springframework.boot:spring-boot-starter-actuator")
    implementation("io.micrometer:micrometer-registry-prometheus")
}

tasks.test {
    useJUnitPlatform()
}

kotlin {
    jvmToolchain(17)
}

You probably have another dependency causing this. Can you share your whole dependency config from your gradle file?

from jodconverter.

MingNiu avatar MingNiu commented on May 24, 2024

This problem occurs when using spring dependency management plugin.

springDependencyManagementVersion=1.0.15.RELEASE

image

from jodconverter.

sbraconnier avatar sbraconnier commented on May 24, 2024

Then you seem to be hitting this reported issue

It's supposed to be fixed witrh the version you are using tho so I'm not sure why you still have this problem ??... Maybe try to clear your project/gradle/maven cache.

On my end, I don't have this problem (the application starts successfully) using this minimal configuration:

plugins {
    id("java")
    id("idea")
    id("org.jetbrains.kotlin.jvm") version "1.9.21"
    id("org.jetbrains.kotlin.plugin.spring") version "1.9.21"
    id("org.springframework.boot") version "2.7.18"
    id("io.spring.dependency-management") version "1.0.15.RELEASE"
}

kotlin {
    jvmToolchain(17)
}

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-quartz")
    implementation("org.springframework.boot:spring-boot-starter-data-jpa")

    implementation("org.jodconverter:jodconverter-spring-boot-starter:4.4.7")
    implementation("org.jodconverter:jodconverter-remote:4.4.7")

    runtimeOnly("com.h2database:h2")
}

Here's my logs:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::               (v2.7.18)

2024-02-26 09:54:51.698  INFO 9408 --- [           main] org.example.MainKt                       : Starting MainKt using Java 17.0.9
2024-02-26 09:54:51.701  INFO 9408 --- [           main] org.example.MainKt                       : No active profile set, falling back to 1 default profile: "default"
2024-02-26 09:54:52.333  INFO 9408 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-02-26 09:54:52.352  INFO 9408 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 JPA repository interfaces.
2024-02-26 09:54:52.973  INFO 9408 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2024-02-26 09:54:53.255  INFO 9408 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2024-02-26 09:54:53.323  INFO 9408 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2024-02-26 09:54:53.416  INFO 9408 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.6.15.Final
2024-02-26 09:54:53.674  INFO 9408 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2024-02-26 09:54:53.896  INFO 9408 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2024-02-26 09:54:54.217  INFO 9408 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2024-02-26 09:54:54.232  INFO 9408 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-02-26 09:54:54.479  INFO 9408 --- [           main] org.quartz.impl.StdSchedulerFactory      : Using default implementation for ThreadExecutor
2024-02-26 09:54:54.494  INFO 9408 --- [           main] org.quartz.core.SchedulerSignalerImpl    : Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2024-02-26 09:54:54.494  INFO 9408 --- [           main] org.quartz.core.QuartzScheduler          : Quartz Scheduler v.2.3.2 created.
2024-02-26 09:54:54.495  INFO 9408 --- [           main] org.quartz.simpl.RAMJobStore             : RAMJobStore initialized.
2024-02-26 09:54:54.496  INFO 9408 --- [           main] org.quartz.core.QuartzScheduler          : Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

2024-02-26 09:54:54.496  INFO 9408 --- [           main] org.quartz.impl.StdSchedulerFactory      : Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance.
2024-02-26 09:54:54.496  INFO 9408 --- [           main] org.quartz.impl.StdSchedulerFactory      : Quartz scheduler version: 2.3.2
2024-02-26 09:54:54.496  INFO 9408 --- [           main] org.quartz.core.QuartzScheduler          : JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@c9b5a99
2024-02-26 09:54:54.529  INFO 9408 --- [           main] o.s.s.quartz.SchedulerFactoryBean        : Starting Quartz Scheduler now
2024-02-26 09:54:54.529  INFO 9408 --- [           main] org.quartz.core.QuartzScheduler          : Scheduler quartzScheduler_$_NON_CLUSTERED started.
2024-02-26 09:54:54.542  INFO 9408 --- [           main] org.example.MainKt                       : Started MainKt in 3.518 seconds (JVM running for 4.116)

from jodconverter.

MingNiu avatar MingNiu commented on May 24, 2024
image

jetbrains: https://www.jetbrains.com/help/idea/2023.3/run-debug-configuration-spring-boot.html#logs
image

Idea classpath:
image

gradle bootRun classpath:
image

quartz pom:
image

When I removed jodconverter dependency, the problem disappeared.
It's so strange...
There must be something that makes HikariCP-java7 "provided" scope.

from jodconverter.

sbraconnier avatar sbraconnier commented on May 24, 2024

Well, I only have the community edition of Intellij, so I can't test with the spring boot Run/Debug configuration you are using.

My tests work using the regular Run/Debug configuration or using the gradle bootRun task:

Command line:
gradlew bootRun

Can you test that ? If it works, then the problem is with the spring boot plugin for intellij.

Also, please invalidate your cache (Menu File->Invalidate Caches...) before executing your test.

from jodconverter.

MingNiu avatar MingNiu commented on May 24, 2024

“gradlew bootRun” works.
Idea Ultimate Run/Debug configuration without "Add dependencies with provided scope to classpath" works.
Idea community edition works.

from jodconverter.

sbraconnier avatar sbraconnier commented on May 24, 2024

Well that is very strange indeed. The spring-boot BOM is added as a platform implementation to every jodconverter java projects, but I cannot understand why this would impact your build/run:

dependencies {
    implementation platform("org.springframework.boot:spring-boot-dependencies:2.7.18")
}

I cannot work on this without the Ultimate intellij license. Maybe ask them (the intellij team) about this problem with the information you have. I'll try to apply for a free license but I'm not sure the jodconverter project qualifies according to their rules. I should make my local sandbox public in order to qualifies for the "at least one commit a month". I code a lot to anwser people questions!!

from jodconverter.

MingNiu avatar MingNiu commented on May 24, 2024

Answer from intellij Team: https://youtrack.jetbrains.com/issue/IDEA-348142/Add-dependencies-with-provided-scope-to-classpath-breaks-the-classpath

from jodconverter.

sbraconnier avatar sbraconnier commented on May 24, 2024

Wow! Thanks you to have reported this to their team and for the feedback here!! It seems they will fix it on their end!

from jodconverter.

MingNiu avatar MingNiu commented on May 24, 2024

Thank you very much for your help,.
Hope they fix this soon.

from jodconverter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.