@@ -224,7 +224,9 @@ public void extractExecutableJar(File destDirectory, boolean remotePipeline)
224
224
{
225
225
try (JarFile jar = new JarFile (verifyJar ()))
226
226
{
227
- boolean foundDistributionZip = false ;
227
+ boolean missingDistributionZip = true ;
228
+ boolean missingBootstrapJar = remotePipeline ;
229
+ boolean missingServletApiJar = remotePipeline ;
228
230
var entries = jar .entries ();
229
231
while (entries .hasMoreElements ())
230
232
{
@@ -233,22 +235,24 @@ public void extractExecutableJar(File destDirectory, boolean remotePipeline)
233
235
234
236
if ("labkey/distribution.zip" .equals (entryName ))
235
237
{
236
- foundDistributionZip = true ;
238
+ missingDistributionZip = false ;
237
239
try (var distInputStream = jar .getInputStream (entry ))
238
240
{
239
241
extractDistributionZip (distInputStream , destDirectory );
240
242
}
241
243
}
242
244
if (remotePipeline )
243
245
{
246
+ // Keep this code in sync with org.labkey.pipeline.api.PipelineServiceImpl.extractBootstrapFromEmbedded()
244
247
if (entry .getName ().contains ("labkeyBootstrap" ) && entry .getName ().toLowerCase ().endsWith (".jar" ))
245
248
{
246
249
try (var in = jar .getInputStream (entry ))
247
250
{
248
251
extractFile (in , new File (destDirectory , "labkeyBootstrap.jar" ));
249
252
}
253
+ missingBootstrapJar = false ;
250
254
}
251
- if (entry .getName ().contains ("tomcat-servlet-api " ) && entry .getName ().toLowerCase ().endsWith (".jar" ))
255
+ if (entry .getName ().contains ("tomcat-embed-core " ) && entry .getName ().toLowerCase ().endsWith (".jar" ))
252
256
{
253
257
File pipelineLib = new File (destDirectory , "pipeline-lib" );
254
258
if (!pipelineLib .exists ())
@@ -262,14 +266,23 @@ public void extractExecutableJar(File destDirectory, boolean remotePipeline)
262
266
{
263
267
extractFile (in , new File (pipelineLib , "servletApi.jar" ));
264
268
}
269
+ missingServletApiJar = false ;
265
270
}
266
271
}
267
272
}
268
273
269
- if (! foundDistributionZip )
274
+ if (missingDistributionZip )
270
275
{
271
276
throw new ConfigException ("Unable to find distribution zip required to run LabKey Server." );
272
277
}
278
+ if (missingBootstrapJar )
279
+ {
280
+ throw new ConfigException ("Unable to find labkeyServer.jar required to run LabKey Server's remote pipeline code." );
281
+ }
282
+ if (missingServletApiJar )
283
+ {
284
+ throw new ConfigException ("Unable to find Servlet API file required to run LabKey Server's remote pipeline code." );
285
+ }
273
286
}
274
287
}
275
288
catch (IOException | ConfigException e )
0 commit comments