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.

package annotated jobs does not work with tomcat war versioning

See original GitHub issue

If you use tomcat war versioning (e.g. war name: eDHTReporter##20180201-01.war / for more details please see https://objectpartners.com/2012/04/17/tomcat-v7-parallel-deployment/), package annotated jobs does not work because the directory encoding is wrong:

2018-02-01T09:02:34,452 [] [] INFO  org.quartz.core.SchedulerSignalerImpl <init>:49 - Initialized Scheduler Signaler of type: class org.quartz.core.SchedulerSignalerImpl
2018-02-01T09:02:34,463 [] [] INFO  org.quartz.core.RAMJobStore initialize:112 - RAMJobStore initialized.
2018-02-01T09:02:34,463 [] [] INFO  org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin initialize:124 - Initializing XMLSchedulingDataProcessorPlugin Plug-in.
2018-02-01T09:02:34,463 [] [] INFO  org.quartz.plugins.management.ShutdownHookPlugin initialize:99 - Registering Quartz shutdown hook.
2018-02-01T09:02:34,464 [] [] INFO  org.knowm.sundial.plugins.AnnotationJobTriggerPlugin initialize:76 - Initializing AnnotationJobTriggerPlugin Plug-in.
2018-02-01T09:02:34,468 [] [] WARN  org.quartz.plugins.xml.XMLSchedulingDataProcessor processFile:233 - File named 'jobs.xml' does not exist. This is OK if you don't want to use an XML job config file.
2018-02-01T09:02:34,469 [] [] INFO  org.quartz.plugins.xml.XMLSchedulingDataProcessor scheduleJobs:490 - Adding 0 jobs, 0 triggers.
2018-02-01T09:02:34,471 [] [] INFO  org.knowm.sundial.plugins.AnnotationJobTriggerPlugin start:86 - Loading annotated jobs from de.guhsoft.edhtreporter.server.tools.jobs.
2018-02-01T09:02:34,471 [] [] INFO  org.quartz.classloading.CascadingClassLoadHelper getJobClasses:229 - Package: 'de.guhsoft.edhtreporter.server.tools.jobs' becomes Resource: 'jar:file:/usr/local/tomcat/eDHTReporter/webapps/eDHTReporter%23%2320180201-01/WEB-INF/lib/eDHRServerScheduling.jar!/de/guhsoft/edhtreporter/server/tools/jobs/'
2018-02-01T09:02:34,472 [] [] ERROR de.guhsoft.edhtreporter.server.tools.SchedulerInitializer contextInitialized:21 - Exception while scheduling jobs.
java.lang.RuntimeException: Unexpected IOException reading JAR File '/usr/local/tomcat/eDHTReporter/webapps/eDHTReporter%23%2320180201-01/WEB-INF/lib/eDHRServerScheduling.jar'
        at org.quartz.classloading.CascadingClassLoadHelper.processJarfile(CascadingClassLoadHelper.java:276) ~[sundial-2.1.3.jar:?]
        at org.quartz.classloading.CascadingClassLoadHelper.getJobClasses(CascadingClassLoadHelper.java:232) ~[sundial-2.1.3.jar:?]
        at org.knowm.sundial.plugins.AnnotationJobTriggerPlugin.start(AnnotationJobTriggerPlugin.java:88) ~[sundial-2.1.3.jar:?]
        at org.quartz.QuartzScheduler.startPlugins(QuartzScheduler.java:1113) ~[sundial-2.1.3.jar:?]
        at org.quartz.QuartzScheduler.start(QuartzScheduler.java:211) ~[sundial-2.1.3.jar:?]
        at org.knowm.sundial.SundialJobScheduler.startScheduler(SundialJobScheduler.java:106) ~[sundial-2.1.3.jar:?]
        at org.knowm.sundial.SundialJobScheduler.startScheduler(SundialJobScheduler.java:93) ~[sundial-2.1.3.jar:?]
        at de.guhsoft.edhtreporter.server.tools.SchedulerInitializer.contextInitialized(SchedulerInitializer.java:19) [eDHRServerScheduling.jar:?]
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745) [catalina.jar:8.5.27]
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207) [catalina.jar:8.5.27]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.5.27]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) [catalina.jar:8.5.27]
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) [catalina.jar:8.5.27]
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.27]
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986) [catalina.jar:8.5.27]
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) [catalina.jar:8.5.27]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_162]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_162]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
Caused by: java.io.FileNotFoundException: /usr/local/tomcat/eDHTReporter/webapps/eDHTReporter%23%2320180201-01/WEB-INF/lib/eDHRServerScheduling.jar (No such file or directory)
        at java.util.zip.ZipFile.open(Native Method) ~[?:1.8.0_162]
        at java.util.zip.ZipFile.<init>(ZipFile.java:225) ~[?:1.8.0_162]
        at java.util.zip.ZipFile.<init>(ZipFile.java:155) ~[?:1.8.0_162]
        at java.util.jar.JarFile.<init>(JarFile.java:166) ~[?:1.8.0_162]
        at java.util.jar.JarFile.<init>(JarFile.java:103) ~[?:1.8.0_162]
        at org.quartz.classloading.CascadingClassLoadHelper.processJarfile(CascadingClassLoadHelper.java:274) ~[sundial-2.1.3.jar:?]
        ... 20 more

The file is there, but under

/usr/local/tomcat/eDHTReporter/webapps/eDHTReporter##20180201-01/WEB-INF/lib/eDHRServerScheduling.jar

not under

/usr/local/tomcat/eDHTReporter/webapps/eDHTReporter%23%2320180201-01/WEB-INF/lib/eDHRServerScheduling.jar

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
timmoltercommented, Mar 12, 2019

nice. Thanks!

0reactions
mseelecommented, Mar 12, 2019

The bug is fixed in sundial-2.2.0-20190311.152424-4.jar

Great work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How to use versioning for a war application running on ...
1 Answer 1 ... Are you building your WAR file with Ant? Maven would provide a versioning strategy for you inherently with the...
Read more >
The ultimate guide to Tomcat deployments
Learn how to create a secure, highly available, load-balanced Tomcat cluster with zero downtime deployments.
Read more >
Apache Tomcat 7 (7.0.109) - Changelog
Changelog ; fix, Switch Tomcat embedded to loading MIME type mappings from a property file generated from the default web.xml so the MIME...
Read more >
Zero-downtime Deployment (and Rollback) in Tomcat
Open a browser, enter the WAR file's URL (e.g. http://localhost:8080/foo) and watch the time tick by. Note that you do not see the...
Read more >
Deploying versioned WAR to Tomcat 7 - Google Groups
The first problem came when specifying the WAR file for the deploy ... tcadmin/.jenkins/jobs/appName-Deploy/workspace/target/appName##9.war]
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