tools-build

oly 2023-01-12T15:24:20.714549Z

not having much luck with tools.build just been diagnosing another issue, basically I can't connect to a database when using my built uberjar, depstar and even jibbit seems to work, so not sure what is different specifically in tools.build for reference I am using postgres and metabase connection pool, I have traced it down to DataSources/pooledDataSource from javax.sql.DataSource, I have dumped a prn to check that the config between the jar and running locally match which they do, in case it was state related anyone have any pointers or ideas on what could be happening ? If it was an actual can't connect issue usually I would see a failed to initialize pool error, but the system just sits there waiting for something that never happens 😞

borkdude 2023-01-12T15:30:01.553949Z

Perhaps it is possible to create a minimal public repro so the person looking at this has something to work with?

oly 2023-01-12T15:32:22.775299Z

I will see may just have to jump back to depstar for the moment spent a bit to much time on this already, I know its likely my end perhaps if I go back to depstar I can build that repo another day

Alex Miller (Clojure team) 2023-01-12T15:47:10.238849Z

if you are seeing something hang, take a thread dump to see what's hanging

Alex Miller (Clojure team) 2023-01-12T15:47:36.392489Z

ctrl-\ if in proc, or kill -3 pid or jstack pid if out of proc

Alex Miller (Clojure team) 2023-01-12T15:49:47.034159Z

possible things to consider: • are the same set of classes compiled • are the same set of classes from dependent libs included

Alex Miller (Clojure team) 2023-01-12T15:49:54.018269Z

for both: jar tf the.jar | grep class | sort and compare working/non-working

Alex Miller (Clojure team) 2023-01-12T15:50:31.552409Z

are the approx sizes of working and non-working uberjar the same? if they are drastically different, probably not good

Alex Miller (Clojure team) 2023-01-12T15:54:57.609829Z

possibly also worth comparing the META-INF/MANIFEST.MF contents or other files in META-INF

oly 2023-01-12T16:02:53.559439Z

okay great info @alexmiller got a path to explore now

oly 2023-01-16T12:54:13.783589Z

Thanks for the help I got there in the end no more freezing, I think it was actually deps related got new issues now, where one jar file works and establishes the db connection a second one fails with void "com.mchange.v2.cfg.BasicMultiPropertiesConfig.<init>(java.lang.String[], java.util.List)" which is rather odd as the startup to each application is almost identical

oly 2023-01-16T12:54:33.977459Z

slowly commenting out stuff in hope something shows up