Using autopatch with Spring Boot and all-in-one jars not able to find patch files

17 views
Skip to first unread message

Scott Tatum

unread,
Sep 1, 2016, 2:51:29 PM9/1/16
to autopatch-users
Hi, 

[Currently running latest Java 8, autopatch 1.4.2, autopatch-spring 1.4.0, Spring 4.3.2, Spring Boot 1.4.0.RELEASE]

We have used autopatch for some time, and it has worked flawlessly for us. Recently we did some rearchitecting and made our web application a Spring Boot application, which is an all-in-one jar with an embedded Tomcat container in it (before it was a typical war). This change has introduced several issues, one of which being that autopatch can no longer find any of its patch files. 

Before, when the app was just a war, the patch files were in a jar under WEB-INF/lib, and the classloader had no trouble finding them. Now, that jar is inside the all-in-one jar (under WEB-INF/lib). In this configuration, when autopatch runs it seems to not know to look into these inner jars - at least, when it runs, it finds no patches:

13:43:23.725 [RS-ApplicationLauncher-Thread-1] WARN  c.i.c.s.listener.ApplicationLauncher - Running autopatch...
13:43:27.345 [RS-ApplicationLauncher-Thread-1] INFO  c.t.u.m.MigrationRunnerFactory - Strategy received 'null'
13:43:27.349 [RS-ApplicationLauncher-Thread-1] INFO  c.t.u.m.jdbc.AutoPatchService - Applying patches....
13:37:24.572 [RS-ApplicationLauncher-Thread-1] INFO  c.t.util.migration.MigrationProcess - Running post-patch tasks...
13:37:24.572 [RS-ApplicationLauncher-Thread-1] INFO  c.t.util.migration.MigrationProcess - No patch tasks were discovered in your classpath. Run with DEBUG logging enabled for patch task search details.

I turned up to debug logging, but didn't see any more logging than this.

Any thoughts on why this might not be working, and what I could do to fix it? I'm going to try moving all the patch files temporarily into the web project, so that they aren't in a jar within the jar, to see if that will help. Ultimately though, I'd like to keep the autopatch related files in their own library.

-Scott

Scott Askew

unread,
Sep 4, 2016, 6:41:22 PM9/4/16
to autopatch-users
Hi Scott,

I am the original author of AutoPatch from way back in 2004 but I've since left Tacit Knowledge and haven't been in the code for a couple of years. I'm pretty sure this is an issue with "Discovery" (https://github.com/tacitknowledge/discovery) which AutoPatch uses to find patches. It was also written back in 2004 when application packaging was much simpler so it has trouble dealing with nested classloaders, JARs inside ZIP files, etc.

I'll try and pull up the code for both projects in the next couple of days to see if I can at least find a workaround for you.

-scott

Scott Askew

unread,
Sep 15, 2016, 6:13:18 PM9/15/16
to autopatch-users
Hi Scott,

I finally have mostly-reliable internet connectivity now (Hurricane Newton did a number here) and have upgraded Autopatch to work under Java 8. I'd like to be able to reproduce the issue you're having. Can you send some more detail on exactly how you're including Autopatch in your Spring Boot project?

Thanks,

-scott

Scott Tatum

unread,
Oct 3, 2016, 4:05:57 PM10/3/16
to autopatch-users
Oh that sounds great actually. What I could do is work up a sample project that demonstrates the issue and put it on github, and you can grab it from there. Give me a couple days to get that together and I'll update you with the URL.

-Scott

Scott Askew

unread,
Oct 5, 2016, 6:02:34 PM10/5/16
to autopatch-users
That sounds great, Scott. Just so you know, in about a week I'm going off the grid for a while and won't have access to the internet.

--
You received this message because you are subscribed to the Google Groups "autopatch-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autopatch-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages