question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

querydsl-sql : Joda time should be optional

See original GitHub issue

I am using Java 8 so I don’t want Joda time in my classpath. Indeed it messes with the imports: if I want to use a java.time.LocalDate, I have to be careful not to import org.joda.time.LocalDate.

Currently if I try to exclude Joda time from my classpath, I cannot initialize Querydsl because in JavaTypeMapping, the CalendarType is registered and it depends on Joda time. Moreover:

  • still in JavaTypeMapping, Joda time types are registered,
  • the Configuration class is final and reference JavaTypeMapping, so there is no way around.

In a first step, the modifications that needs to be done are:

  • Refactor AbstractDateTimeType to remove the Joda time dependency,
  • In JavaTypeMapping, do the joda time initialization the same way java 8 types are registered,
  • Mark joda time as optional in the pom.xml 😃

If that is ok, I can do the change. However, it is a breaking change: libraries and projects depending on querydsl-sql and using joda time will have to explicitly add joda time in their pom.xml, gradle etc. So the version on which this development will be made has to be decided.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:17
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
jannericommented, Jun 2, 2020

Spring Boot will autoconfigure a formatter when joda-time is in classpath. The formatter wants a newer version of joda-time than querydsl. So to me, the joda-time dependency seems pretty useless in 2020 and it’s causing problems. I would greatly appreciate this fix!

p.s. Declaring joda-time as a dependency is a trivial fix. I wouldn’t worry about this as a breaking change.

4reactions
Neikiuscommented, Jun 8, 2020

Spring Boot will autoconfigure a formatter when joda-time is in classpath. The formatter wants a newer version of joda-time than querydsl. So to me, the joda-time dependency seems pretty useless in 2020 and it’s causing problems. I would greatly appreciate this fix!

p.s. Declaring joda-time as a dependency is a trivial fix. I wouldn’t worry about this as a breaking change.

Same here. Please take the joda-time out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Querydsl not translate java.time.* columns when in ...
I'm using Querydsl and have a column represented by a java.time.LocalDate . This works fine when running via the IDE but fails when...
Read more >
Release History - Querydsl
joda -time:joda-time is now an optional dependency. If your application relies on joda-time:joda-time make sure to specify it as a direct dependency rather...
Read more >
com.querydsl.sql.types.LocalDateTimeType.<init> java code ...
@Test public void jodaSet() throws SQLException { LocalDateTime value = LocalDateTime.now(); Timestamp ts = new Timestamp(value.toInstant(ZoneOffset.UTC).
Read more >
com.mysema.querydsl : querydsl-sql : 3.6.9 - Maven Central ...
Querydsl - SQL support - SQL support for Querydsl. ... com.mysema.querydsl:querydsl-sql 3.6.9. content_copy. <?xml version="1.0" encoding="UTF-8"?> ...
Read more >
Operations - ScalikeJDBC
All of them ( single , first , list and foreach ) will execute java.sql. ... You need to add the optional module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found